7 Apr 2012
This works with Amazon EC2 with its original OS
Here is the steps:
Warning: sometimes Rubygems mysteriously doesn't include
`. This causes the command
passenger-install-nginx-module`` to fail.
Use Root to run the script
Run it with
`nohup ./ror_install.sh &`.
#!/bin/bash # Ruby stuff yum erase -y ruby rubygems # Ruby 1.9.3 dependencies (MUST NOT FORGET, otherwise many gems will be error at their installation) yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel make bzip2 autoconf automake libtool bison iconv-devel yum install -y ruby19-devel ln -s /usr/bin/ruby1.9 /usr/bin/ruby ln -s /usr/bin/gem1.9 /usr/bin/gem yum install -y aws-amitools-ec2 # Install Passenger gem gem install passenger # Install Nginx dependencies yum install -y curl-devel # Reload bash for passenger-related binary source ~/.bashrc # Install Nginx with Passenger # with a sequence of key # 1. Enter (Skip Intro) # 2. 1 and Enter (Install Nginx) # 3. Enter (Install PCRE) # 4. Enter (Use default dir) # 5. Enter (Skip the end) echo -e "\n1\n\n\n\n" | /usr/local/bin/passenger-install-nginx-module # Install Git yum install -y git # Now don't forget to configure Nginx. That's it.