-
Notifications
You must be signed in to change notification settings - Fork 12
/
ruby-install.txt
45 lines (37 loc) · 1.86 KB
/
ruby-install.txt
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
44
45
# requirements already installed
# build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev
# install rvm
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc
echo 'export rvm_pretty_print_flag=1' >> ~/.rvmrc.
source ~/.bashrc
# requirements to compile ruby1.9
sudo apt-get install -y libssl-dev libreadline5-dev
rvm install 1.9.2 # ruby-1.9.2-p180 [ x86_64 ]
gem install goliath thin unicorn
rvm install ree # ree-1.8.7-2011.03 [ x86_64 ]
# rvm install rbx # rbx-head (Sat Mar 12 09:05:08 PST 2011)
rvm use ree
gem install passenger --no-rdoc --no-ri
# install libs needed for passenger
sudo apt-get install -y libcurl4-openssl-dev
# the automated installer (passenger-install-nginx-module)
# had problems finding passenger files as root or installing with permission as user
# this can be fixed by installing ree as the system ruby instead of through rvm
#
# it ends up doing the following steps, recompiling and configuring nginx with passenger module
# note that we are installing to /opt/nginx, giving us a separate nginx install there
cd nginx-0.8.54
sh ./configure --prefix='/opt/nginx' --with-http_ssl_module --add-module='/home/ubuntu/.rvm/gems/ree-1.8.7-2011.03/gems/passenger-3.0.5/ext/nginx'
sudo make install
# Change config file: /opt/nginx/conf/nginx.conf
# use nginx config as per: http://pastie.org/867442
#
# add to nginx config the output of passenger-config --root
passenger_root /home/ubuntu/.rvm/gems/ree-1.8.7-2011.03/gems/passenger-3.0.5
# change server config
server {
root /home/ubuntu/benchmarks/passenger;
passenger_enabled on;
listen 80;
}