forked from jiangnianshun/django-mdict
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit_server_yum.sh
27 lines (27 loc) · 867 Bytes
/
init_server_yum.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python3
cd `dirname $0`
echo "installing dependencies..."
yum install -y python3 python3-devel python3-pip epel-release lzo-devel lzo-minilzo zlib-devel libjpeg-turbo-devel
#pip3 install -r requirements1.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
#pip3 install -r requirements2.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install -r requirements1.txt
pip3 install -r requirements2.txt
file="db.sqlite3"
if [ ! -f $file ]
then
echo "initializing db.sqlite3..."
python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py makemigrations mdict
python3 manage.py migrate mdict
python3 manage.py makemigrations mynav
python3 manage.py migrate mynav
python3 manage.py createsuperuser
else
echo "db.sqlite3 already exists..."
fi
chmod 777 db.sqlite3
cd mdict/readlib/pyx
echo "cython compiling..."
source build.sh
cd ../../../