L1g3r Logo           SignalQ Sites: NetAdminTools - Coprolite - SpotBridge - NAW
RoboCoop - AreWeDown - SolarPower - SysAdminTools
Xfig - Gold Loaf - GeekPapa - FixGMC - FixRambler
Solar Energy - Energy Efficiency - Solar Panels
Home Energy Savings
getting passenger running
Topic:operations   Date: 2011-11-05
Printer Friendly: Print   



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# 


Moving On
Topic:blog   Date: 2011-11-01
Printer Friendly: Print   

Subject

There is a split, now, on L1G3R. I've moved to rails 3.1 vs. the latest MCJ root filesystem, and am using Ubuntu 11.10. From a persistence perspective, this is arguably more so. I was able to rip out the GUI and run with Enlightenment 16, which I enjoy. I will continue to maintain the reference OS as of 3.10.


Sound Stuff
Topic:operations   Date: 2011-10-18
Printer Friendly: Print   

amixer sset 'Headphone' 100



Recent Entries:
getting passenger running2011-11-05
Moving On2011-11-01
Sound Stuff2011-10-18


Keywords:
---------------------People ------------------
james cook General Description - MCJ Perspective2009-12-05
---------------------Places ------------------
---------------------Things ------------------
apache General Description - Tools Used2009-12-06
firefox General Description - Tools Used2009-12-06
gimp General Description - Tools Used2009-12-06
gnu/linux L1G3R Information Systems: Baroque knowledge management2006-01-01
gtk Design Details - Technology Architecture2009-12-11
hld Introduction - Hybrid HLD2009-12-01
imagemagick General Description - Tools Used2009-12-06
lyx General Description - Tools Used2009-12-06
mac L1G3R Information Systems: Baroque knowledge management2006-01-01
mcj Introduction - Hybrid HLD2009-12-01
nginx General Description - Tools Used2009-12-06
pdf Part F - PDF Controller2010-01-08
Don't claim much2010-11-06
rails L1G3R Information Systems: Baroque knowledge management2006-01-01
General Description - Tools Used2009-12-06
ruby L1G3R Information Systems: Baroque knowledge management2006-01-01
General Description - Tools Used2009-12-06
sqlite General Description - Tools Used2009-12-06
windows L1G3R Information Systems: Baroque knowledge management2006-01-01
xfig General Description - Tools Used2009-12-06
--------------------- Times------------------


None of this would be possible without the diligent work of the Linux From Scratch (LFS) project. A tip o' the hat to those intrepid hackers. Much of the OS buld configuration is taken directly from LFS and BLFS.
Get Mountain Climbing Journal at SourceForge.net. Fast, secure and Free Open Source software downloads