File tree 5 files changed +62
-2
lines changed 5 files changed +62
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ Currently supports the following systems:
17
17
* gentoo
18
18
* ubuntu/debian
19
19
* centos/redhat/fedora
20
+ * opensuse
21
+ * archlinux
22
+
23
+ You only to excute:
20
24
21
25
```
22
26
bash <(curl -s https://raw.github.com/douban/code/master/scripts/install_code.sh)
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Get generic function
4
+ . common.sh
5
+
6
+ echo " Install needed package.This may take some time..."
7
+ sudo pacman -S git gcc make python2-pip python2-virtualenv memcached git --noconfirm -q
8
+
9
+ echo " Install mysql..."
10
+ sudo pacman -S mysql --noconfirm -q
11
+ sudo systemctl start mysqld
12
+
13
+ echo " Setup memcached port to 11311..."
14
+ sudo sed -i " s/memcached -l/memcached -p 11311 -l/" /usr/lib/systemd/system/memcached.service
15
+ sudo systemctl start memcached
16
+
17
+ echo " Install libmemcached..."
18
+ install_libmemcached
19
+
20
+ # Use virtualenv2
21
+ sudo mv /usr/bin/virtualenv /usr/bin/virtualenv.bak
22
+ sudo ln -s /usr/bin/virtualenv2 /usr/bin/virtualenv
23
+
24
+ echo " Install code..."
25
+ install_code
26
+
27
+ echo " Start app..."
28
+ start_app
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ install_code() {
46
46
. venv/bin/activate
47
47
pip install cython # should install first
48
48
pip install -U setuptools # python-libmemcached require updated setuptools
49
+ pip install " distribute==0.6.29" # Fixed install MySQL-python for #14
49
50
pip install -r requirements.txt
50
51
}
51
52
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
- url=' https://raw.github.com/dongweiming /code/master/scripts'
3
+ url=' https://raw.github.com/douban /code/master/scripts'
4
4
5
5
if [ -f /etc/fedora-release ] ; then
6
6
file=" $url /fedora.sh"
@@ -12,8 +12,10 @@ elif [ -f /etc/debian_version ] ; then
12
12
file=" $url /ubuntu.sh"
13
13
elif [ -f /etc/gentoo-release ] ; then
14
14
file=" $url /gentoo.sh"
15
+ elif [ -f /etc/arch-release ] ; then
16
+ file=" $url /archlinux.sh"
15
17
else
16
- echo " Do not support the system!"
18
+ echo " Not yet support the system!"
17
19
exit 1
18
20
fi
19
21
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # Get generic function
4
+ . common.sh
5
+
6
+ echo " Install needed package.This may take some time..."
7
+ sudo zypper -nq install gcc gcc-c++ python-pip python-virtualenv git memcached python-devel make
8
+
9
+ echo " Install mysql..."
10
+ # After 12.3 mysql is mariadb
11
+ sudo zypper -nq install mysql libmysqlclient-devel
12
+ sudo /sbin/service mysql start
13
+
14
+ echo " Setup memcached port to 11311..."
15
+ sudo sed -i ' s/MEMCACHED_PARAMS=\"/MEMCACHED_PARAMS=\"-p 11311 /' /etc/sysconfig/memcached
16
+ sudo /etc/init.d/memcached restart
17
+
18
+ echo " Install libmemcached..."
19
+ install_libmemcached
20
+
21
+ echo " Install code..."
22
+ install_code
23
+
24
+ echo " Start app..."
25
+ start_app
You can’t perform that action at this time.
0 commit comments