forked from PnX-SI/GeoNature-atlas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_env.sh
executable file
·45 lines (29 loc) · 1.24 KB
/
install_env.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
if [ "$(id -u)" == "0" ]; then
echo -e "\e[91m\e[1mThis script should NOT be run as root\e[0m" >&2
exit 1
fi
sudo apt-get update
sudo apt-get -y upgrade
# Go to folder of install_env.sh
cd "$(dirname "$0")"
sudo apt-get install -y apache2
sudo apt-get install -y libapache2-mod-wsgi
sudo apachectl restart
sudo apt-get install -y postgresql-9.4 postgis
sudo apt-get install -y python-setuptools
sudo apt-get install -y libpq-dev python-dev
sudo apt-get install -y python python-pip
sudo apt-get install -y python-gdal
sudo apt-get install -y gdal-bin
sudo apt-get install -y python-virtualenv
virtualenv ./venv
. ./venv/bin/activate
pip install -r requirements.txt
cp ./main/configuration/config.py.sample ./main/configuration/config.py
cp ./main/configuration/settings.ini.sample ./main/configuration/settings.ini
cp ./static/custom/templates/footer.html.sample ./static/custom/templates/footer.html
cp ./static/custom/templates/introduction.html.sample ./static/custom/templates/introduction.html
cp ./static/custom/templates/presentation.html.sample ./static/custom/templates/presentation.html
cp ./static/custom/custom.css.sample ./static/custom/custom.css
cp ./static/custom/glossaire.json.sample ./static/custom/glossaire.json