Created
October 14, 2016 15:06
-
-
Save patroqueeet/2d1cea0e89ae5b968dddc9d64f79abe8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# print status | |
git status | |
locale | |
virtualenv .ve | |
VIRTUAL_ENV_DISABLE_PROMPT=true source .ve/bin/activate | |
# os pkgs | |
# sudo aptitude remove -y postgresql-9.4 postgresql-9.4-postgis-2.1 postgresql-9.4-postgis-2.2 postgresql-9.4-postgis-scripts postgresql-client-9.4 postgresql-client-common postgresql-common postgresql-contrib-9.4 postgresql-server-dev-9.4 | |
sudo apt-get purge -y postgresql-client-* postgresql-* postgresql-contrib-* postgresql-server-dev-* libpq-dev | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
lsb_release -c | |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main" >> /etc/apt/sources.list.d/postgresql.list' | |
sudo aptitude update | |
# sudo aptitude install -y postgresql-9.3 postgresql-client-9.3 postgresql-client-common postgresql-common postgresql-contrib-9.3 postgresql-server-dev-9.3 | |
wget https://gist.githubusercontent.com/mimimalizam/2cbd11bdb061e1fe4ec33e1f763cb802/raw/pg-setup.sh && bash pg-setup.sh 9.3 | |
echo "Available PostgreSQL clusters:\n $(pg_lsclusters)" | |
sudo aptitude install -y build-essential pkg-config linux-headers-`uname -r` libffi-dev libevent-dev libjpeg-dev libfreetype6 libfreetype6-dev libpcre3-dev zlib1g-dev libxml2 libxml2-dev libxslt-dev libcap-dev libcap-ng-dev libzbar-dev imagemagick dmtx-utils | |
sudo aptitude install -y ntp ghostscript rabbitmq-server yui-compressor python-dev xvfb gettext zip exim4 | |
wget https://raw.githubusercontent.com/patroqueeet/darg/develop/exim4_internet_site_debconf.conf | |
sudo debconf-set-selections exim4_internet_site_debconf.conf | |
sudo dpkg-reconfigure exim4-config -fnoninteractive | |
sudo -- sh -c "echo 'disable_ipv6=true' > /etc/exim4/exim4.conf.localmacros" | |
sudo -- sh -c "echo 'helo_allow_chars=_' >> /etc/exim4/exim4.conf.localmacros" | |
sudo -- sh -c "sed -i 's/local/internet/g' /etc/exim4/update-exim4.conf.conf" | |
sudo update-exim4.conf | |
sudo cat /etc/exim4/update-exim4.conf.conf | |
sudo hostname -f | |
sudo /etc/init.d/exim4 restart | |
sudo exim -bP | |
# databse | |
sudo -u postgres psql -c "CREATE ROLE iws WITH password 'iws' LOGIN;" | |
sudo -u postgres psql -c "ALTER ROLE iws WITH CREATEDB;" | |
sudo -u postgres psql -c "CREATE DATABASE iws WITH OWNER iws;" | |
mkdir build_doc_storage | |
sudo mkdir -p /var/nfs/ | |
sudo ln -s "$(pwd)/build_doc_storage" /var/nfs/onlinegv | |
sudo ls -la /var/nfs/ | |
sudo mkdir /etc/onlinegv/ | |
sudo ln -s "$(pwd)/py_src/django19/conf/ubuntu/config.cfg" /etc/onlinegv/config.cfg | |
cd py_src | |
#LATEST=$(wget -q -O - http://chromedriver.storage.googleapis.com/LATEST_RELEASE) | |
#wget http://chromedriver.storage.googleapis.com/2.19/chromedriver_linux64.zip | |
#unzip chromedriver_linux64.zip | |
# debugging asked by semaphoreCI | |
curl -sS https://gist.githubusercontent.com/mimimalizam/2574668089daf2a89215fd3c4298b650/raw/setup-chromedriver-2.19.sh | bash | |
sudo ln -s /usr/local/share/chromedriver /home/runner/spy/py_src/chromedriver | |
chromedriver --version | |
# start prj | |
cd .. | |
sed -i 's/[email protected]/[email protected]/g' py_src/project/settings/*.py | |
./scripts/init.sh | |
bin/django collectstatic --noinput | |
bin/django compilemessages |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment