Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to install phusion passenger.

passenger-install-nginx-module

Eventually I got an error

Permission problems

This installer must be able to write to the following directory:

  /opt/nginx

But it can't do that, because you're running the installer as alex.
Please re-run this installer as root.

I tried to do to

sudo passenger-install-nginx-module

but it says

sudo: passenger-install-nginx-module: command not found

How do I solve it?

share|improve this question

2 Answers 2

up vote 8 down vote accepted

From Passenger installation with nginx fails in Stack Overflow:

The correct way of running the Phusion Passenger installer for nginx, when using RVM, is to use rvmsudo as in:

rvmsudo passenger-install-nginx-module

Credits go to this blog post.

share|improve this answer

open your terminal and type this to create a user as deploy .

sudo adduser deploy

then do Update and install required dependencies with this command

sudo apt-get -y update
sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev libcurl4-openssl-dev curl git-core python-software-properties

then we have to install Ruby

wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
tar -xvzf ruby-1.9.3-p194.tar.gz
cd ruby-1.9.3-p194/
./configure
make
sudo make install
echo "gem: --no-ri --no-rdoc" >> ~/.gemrc
sudo gem install bundler

Then now we are able to install Nginx with Passenger , with these commands

sudo gem install passenger
sudo passenger-install-nginx-module

Hope that helps .

Source: http://excid3.com/blog/setting-up-ubuntu-12-04-with-ruby-1-9-3-nginx-passenger-and-postgresql-or-mysql/

share|improve this answer
    
E: Unable to locate package passenger-install-nginx-module –  Alex Malex Jul 29 '12 at 7:59
    
@AlexMaslakov answer edited –  Raja Jul 29 '12 at 8:07
    
I don't need to install ruby, curl, etc. I already have them! I just need to install passenger as root. –  Alex Malex Jul 29 '12 at 8:11
    
I used rvmsudo instead. It works. –  Alex Malex Jul 29 '12 at 8:17
    
you can edit my Answer to improve the answer . Glad u got it . –  Raja Jul 29 '12 at 8:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.