-
Notifications
You must be signed in to change notification settings - Fork 1
/
bootstrap.sh
38 lines (29 loc) · 1.06 KB
/
bootstrap.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
echo 'Install git'
sudo apt-get install -y git-core
# config UTF-8 for server environment
sudo localedef -v -c -i en_US -f UTF-8 en_US.UTF-8
sudo dpkg-reconfigure locales
# install postgres server
# https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-django-with-postgres-nginx-and-gunicorn
sudo apt-get install -y python-software-properties
sudo add-apt-repository ppa:pitti/postgresql
sudo apt-get update
sudo apt-get install -y libpq-dev python-dev
sudo apt-get install -y postgresql postgresql-contrib
#set password for postgres
sudo su - postgres psql && \password postgres
# check postgres server status
netstat -nlp | grep 5432
echo 'Install curl for installation tool'
sudo apt-get install -y curl
# install nvm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.26.1/install.sh | bash
source ~/.nvm/nvm.sh
# install nodejs 4.0
nvm install 4.0
nvm use 4.0
echo 'Install express'
sudo npm install -g express
sudo npm link express
echo 'Install nodejs postgresql connector'
sudo npm install pg