File tree 5 files changed +21
-11
lines changed 5 files changed +21
-11
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ You only to excute:
26
26
bash <(curl -s https://raw.github.com/douban/code/master/scripts/install_code.sh)
27
27
```
28
28
29
+ Notes: The install script in ` code/scripts ` subdirectory, for example ubuntu/debian,
30
+ You can see ` code/scripts/ubuntu.sh `
31
+
29
32
Prepare
30
33
-------
31
34
- mysql # default port
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ echo "Install needed package.This may take some time..."
7
7
sudo yum install -y -q git python-virtualenv python-devel memcached gcc gcc-c++
8
8
9
9
echo " Install mysql..."
10
- sudo yum install mysql-server mysql
10
+ sudo yum install -y -q mysql-server mysql mysql-devel
11
11
sudo /etc/init.d/mysqld start
12
12
13
13
echo " Setup memcached port to 11311..."
Original file line number Diff line number Diff line change @@ -4,14 +4,16 @@ modify_sudo_time() {
4
4
}
5
5
6
6
install_libmemcached () {
7
- wget -c https://github.com/xtao/douban-patched/raw/master/libmemcached-douban-1.0.18.tar.gz
8
- tar zxf libmemcached-douban-1.0.18.tar.gz
9
- cd libmemcached-1.0.18
10
- ./configure && make && sudo make install
11
- cd ..
12
- rm -rf python-libmemcached
13
- rm -rf libmemcached*
14
- sudo /sbin/ldconfig
7
+ # check libmemcached has installed
8
+ if [ ! -f /usr/local/bin/memping ] ; then
9
+ curl -L https://github.com/xtao/douban-patched/raw/master/libmemcached-douban-1.0.18.tar.gz | tar zx
10
+ cd libmemcached-1.0.18
11
+ ./configure && make && sudo make install
12
+ cd ..
13
+ rm -rf libmemcached-1.0.18
14
+ echo " /usr/local/lib" | sudo tee -a /etc/ld.so.conf
15
+ sudo /sbin/ldconfig
16
+ fi
15
17
}
16
18
17
19
check_virtualenv () {
@@ -46,7 +48,9 @@ install_code() {
46
48
. venv/bin/activate
47
49
pip install cython # should install first
48
50
pip install -U setuptools # python-libmemcached require updated setuptools
49
- pip install " distribute==0.6.29" # Fixed install MySQL-python for #14
51
+ if [ -f /etc/arch-release ] ; then
52
+ pip install " distribute==0.6.29" # Fixed install MySQL-python on archlinux for #14
53
+ fi
50
54
pip install -r requirements.txt
51
55
}
52
56
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ echo "Install needed package.This may take some time..."
7
7
sudo yum install -y -q git python-virtualenv python-devel memcached gcc gcc-c++
8
8
9
9
echo " Install mysql..."
10
- sudo yum install mysql-server mysql
10
+ sudo yum install mysql-server mysql mysql-devel
11
11
# fedora only this method
12
12
sudo service mysqld start
13
13
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
+ # Check Python version > 2.7
4
+ test ` python -c ' import sys; print sys.version_info < (2, 7)' ` = " True" && echo ' CODE requires Python 2.7.' ; exit 1
5
+
3
6
url=' https://raw.github.com/douban/code/master/scripts'
4
7
5
8
if [ -f /etc/fedora-release ] ; then
You can’t perform that action at this time.
0 commit comments