-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.sh
26 lines (21 loc) · 892 Bytes
/
setup.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
#!/bin/bash
apt-add-repository -y ppa:brightbox/ruby-ng
add-apt-repository -y ppa:chris-lea/node.js
echo "deb http://nginx.org/packages/ubuntu/ precise nginx" | tee /etc/apt/sources.list.d/nginx.list
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ABF5BD827BD9BF62
apt-get update
apt-get upgrade
apt-get install -y python g++ python-software-properties git-core ruby2.1 ruby2.1-dev openssl postgresql postgresql-contrib postgresql-server-dev-9.3 build-essential ufw nginx nodejs
# Configure Firewall
# echo "Configuring Firewall"
# ufw allow ssh
# ufw allow http
# ufw allow https
# ufw allow 3000
# ufw default deny
# ufw --force enable
# Configure postgresql
sudo -u postgres psql -c"CREATE ROLE rails_user WITH LOGIN CREATEDB SUPERUSER PASSWORD '{{PUT YOUR PASSWORD HERE}}'"
echo "Installing Compass"
gem install compass --no-ri --no-rdoc
gem install rails --no-ri --no-rdoc