http://stackoverflow.com/questions/7791505/phusion-passenger-ubuntu-11-10
http://hafizbadrie.wordpress.com/2011/07/07/set-up-ruby-on-rails-at-linux-ubuntu-using-rvm/
apt-get install gcc-4.4 g++-4.4 libstdc++6-4.4-dev build-essential
openssl libreadline5 libreadline-dev git-core curl zlib1g zlib1g-dev
build-essential 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
automake libtool bison subversion
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
vi ~/.bashrc
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
gem install passenger
Successfully installed passenger-3.0.9
1 gem installed
Installing ri documentation for passenger-3.0.9...
Installing RDoc documentation for passenger-3.0.9...
root@silver:/usr/local/src/nginx-1.0.5# rvmsudo CC=gcc-4.4 passenger-install-nginx-module
bash: rvmsudo: command not found
root@silver:/usr/local/src/nginx-1.0.5# /usr/local/rvm/bin/rvmsudo CC=gcc-4.4 passenger-install-nginx-module
sudo: unable to resolve host silver
Welcome to the Phusion Passenger Nginx module installer, v3.0.9.
This installer will guide you through the entire installation process. It
shouldn't take more than 5 minutes in total.
Here's what you can expect from the installation process:
1. This installer will compile and install Nginx with Passenger support.
2. You'll learn how to configure Passenger in Nginx.
3. You'll learn how to deploy a Ruby on Rails application.
Don't worry if anything goes wrong. This installer will advise you on how to
solve any problems.
Press Enter to continue, or Ctrl-C to abort.
nginx-1.0.6/auto/lib/openssl/makefile.bcc
nginx-1.0.6/auto/lib/openssl/makefile.msvc
nginx-1.0.6/auto/lib/md5/conf
nginx-1.0.6/auto/lib/md5/make
nginx-1.0.6/auto/lib/md5/makefile.bcc
nginx-1.0.6/auto/lib/md5/makefile.msvc
nginx-1.0.6/auto/lib/md5/makefile.owc
nginx-1.0.6/auto/lib/libxslt/conf
nginx-1.0.6/auto/lib/libgd/conf
nginx-1.0.6/auto/lib/libatomic/conf
nginx-1.0.6/auto/lib/libatomic/make
nginx-1.0.6/auto/lib/google-perftools/conf
nginx-1.0.6/auto/lib/geoip/conf
nginx-1.0.6/auto/cc/acc
nginx-1.0.6/auto/cc/bcc
nginx-1.0.6/auto/cc/ccc
nginx-1.0.6/auto/cc/conf
nginx-1.0.6/auto/cc/gcc
nginx-1.0.6/auto/cc/icc
nginx-1.0.6/auto/cc/msvc
nginx-1.0.6/auto/cc/name
nginx-1.0.6/auto/cc/owc
nginx-1.0.6/auto/cc/sunc
--------------------------------------------
Where do you want to install Nginx to?
Please specify a prefix directory [/opt/nginx]:
--------------------------------------------
Compiling Passenger support files...
# /usr/bin/ruby1.9.1 /usr/bin/rake nginx:clean nginx RELEASE=yes
rm -rf ext/common/libboost_oxt.a ext/common/libboost_oxt
rm -rf ext/common/libpassenger_common.a ext/common/libpassenger_common
rm -f agents/PassengerWatchdog agents/PassengerLoggingAgent
rm -rf agents/nginx/PassengerHelperAgent
mkdir -p ext/common/libboost_oxt
make[1]: Leaving directory `/tmp/root-passenger-5072/nginx-1.0.6'
--------------------------------------------
Nginx with Passenger support was successfully installed.
Please edit your Nginx configuration file (probably /opt/nginx/conf/nginx.conf),
and set the passenger_root and passenger_ruby configuration options in the
'http' block, like this:
http {
...
passenger_root /usr/lib/ruby/gems/1.9.1/gems/passenger-3.0.9;
passenger_ruby /usr/bin/ruby1.9.1;
...
}
After you (re)start Nginx, you are ready to deploy any number of Ruby on Rails
applications on Nginx.
Press ENTER to continue.
Please edit your Nginx configuration file (probably /opt/nginx/conf/nginx.conf),
and set the passenger_root and passenger_ruby configuration options in the
'http' block, like this:
http {
...
passenger_root /usr/lib/ruby/gems/1.9.1/gems/passenger-3.0.9;
passenger_ruby /usr/bin/ruby1.9.1;
...
}
After you (re)start Nginx, you are ready to deploy any number of Ruby on Rails
applications on Nginx.
Press ENTER to continue.
--------------------------------------------
Deploying a Ruby on Rails application: an example
Suppose you have a Ruby on Rails application in /somewhere. Add a server block
to your Nginx configuration file, set its root to /somewhere/public, and set
'passenger_enabled on', like this:
server {
listen 80;
server_name www.yourhost.com;
root /somewhere/public; # <--- be sure to point to 'public'!
passenger_enabled on;
}
And that's it! You may also want to check the Users Guide for security and
optimization tips and other useful information:
/usr/lib/ruby/gems/1.9.1/gems/passenger-3.0.9/doc/Users guide Nginx.html
Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-)
http://www.modrails.com/
Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.
root@silver:/usr/local/src/nginx-1.0.5# which passenger
/usr/bin/passenger
root@silver:/usr/local/src/nginx-1.0.5# ls /usr/bin/passenger -v
/usr/bin/passenger
root@silver:/usr/local/src/nginx-1.0.5# ls /usr/bin/passenger -l
-rwxr-xr-x 1 root root 389 Nov 5 11:25 /usr/bin/passenger
root@silver:/usr/local/src/nginx-1.0.5# date
Sat Nov 5 11:29:15 PDT 2011
root@silver:/usr/local/src/nginx-1.0.5# passenger -v
Phusion Passenger version 3.0.9
"Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
root@silver:/usr/local/src/nginx-1.0.5#
Please edit your Nginx configuration file (probably /opt/nginx/conf/nginx.conf),
and set the passenger_root and passenger_ruby configuration options in the
'http' block, like this:
http {
...
passenger_root /usr/lib/ruby/gems/1.9.1/gems/passenger-3.0.9;
passenger_ruby /usr/bin/ruby1.9.1;
...
}
After you (re)start Nginx, you are ready to deploy any number of Ruby on Rails
applications on Nginx.
Press ENTER to continue.
--------------------------------------------
Deploying a Ruby on Rails application: an example
Suppose you have a Ruby on Rails application in /somewhere. Add a server block
to your Nginx configuration file, set its root to /somewhere/public, and set
'passenger_enabled on', like this:
server {
listen 80;
server_name www.yourhost.com;
root /somewhere/public; # <--- be sure to point to 'public'!
passenger_enabled on;
}
And that's it! You may also want to check the Users Guide for security and
optimization tips and other useful information:
/usr/lib/ruby/gems/1.9.1/gems/passenger-3.0.9/doc/Users guide Nginx.html
Enjoy Phusion Passenger, a product of Phusion (www.phusion.nl) :-)
http://www.modrails.com/
Phusion Passenger is a trademark of Hongli Lai & Ninh Bui.
root@silver:/usr/local/src/nginx-1.0.5# which passenger
/usr/bin/passenger
root@silver:/usr/local/src/nginx-1.0.5# ls /usr/bin/passenger -v
/usr/bin/passenger
root@silver:/usr/local/src/nginx-1.0.5# ls /usr/bin/passenger -l
-rwxr-xr-x 1 root root 389 Nov 5 11:25 /usr/bin/passenger
root@silver:/usr/local/src/nginx-1.0.5# date
Sat Nov 5 11:29:15 PDT 2011
root@silver:/usr/local/src/nginx-1.0.5# passenger -v
Phusion Passenger version 3.0.9
"Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
root@silver:/usr/local/src/nginx-1.0.5#
root@silver:/opt/nginx/conf# CC=gcc-4.4 passenger package-runtime
rm -rf /opt/nginx/conf/passenger-standalone/3.0.9-x86-ruby1.9.2-linux-gcc4.6.1-1002/support
rm -rf /opt/nginx/conf/passenger-standalone/3.0.9-x86-ruby1.9.2-linux-gcc4.6.1-1002/nginx-1.0.6
Nginx core 1.0.6 isn't installed
Phusion Passenger Standalone will automatically install it into:
/opt/nginx/conf/passenger-standalone/3.0.9-x86-ruby1.9.2-linux-gcc4.6.1-1002/nginx-1.0.6
This will only be done once. Please sit back and relax while installation is
in progress.
Checking for required software...
* GNU C++ compiler... found at /usr/bin/g++
* GNU make... found at /usr/bin/make
* A download tool like 'wget' or 'curl'... found at /usr/bin/wget
* Ruby development headers... found
* OpenSSL support for Ruby... found
* RubyGems... found
* Rake... found at /usr/bin/rake
* rack... found
* Curl development headers with SSL support... found
* OpenSSL development headers... found
* Zlib development headers... found
* daemon_controller >= 0.2.5... found
Downloading Nginx...
# wget -O /tmp/root-passenger-standalone-22719/nginx-1.0.6.tar.gz http://nginx.org/download/nginx-1.0.6.tar.gz
--2011-11-05 12:40:48-- http://nginx.org/download/nginx-1.0.6.tar.gz
Resolving nginx.org... 206.251.255.63
Connecting to nginx.org|206.251.255.63|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 670835 (655K) [application/octet-stream]
Saving to: `/tmp/root-passenger-standalone-22719/nginx-1.0.6.tar.gz'
100%[======================================>] 670,835 281K/s in 2.3s
2011-11-05 12:40:51 (281 KB/s) - `/tmp/root-passenger-standalone-22719/nginx-1.0.6.tar.gz' saved [670835/670835]
Installing Phusion Passenger Standalone...
[*********************************************] Copying files...
All done!
cd /opt/nginx/conf/passenger-standalone/3.0.9-x86-ruby1.9.2-linux-gcc4.6.1-1002/support
tar -c . | gzip --best > ../support.tar.gz
cd /opt/nginx/conf/passenger-standalone/3.0.9-x86-ruby1.9.2-linux-gcc4.6.1-1002/nginx-1.0.6
tar -c . | gzip --best > ../nginx-1.0.6.tar.gz
cd /opt/nginx/conf/passenger-standalone/3.0.9-x86-ruby1.9.2-linux-gcc4.6.1-1002
rm -rf /opt/nginx/conf/passenger-standalone/3.0.9-x86-ruby1.9.2-linux-gcc4.6.1-1002/support
/opt/nginx/conf/passenger-standalone/3.0.9-x86-ruby1.9.2-linux-gcc4.6.1-1002/nginx-1.0.6
root@silver:/opt/nginx/conf#
|