Reputation: 909
I recently created a Linode server with Ubuntu 12.04 LTS
as the admin user aurelien I installed rbenv (in my case 1.9.3-p194 for my older rails 3.2 app).
Afterwhich I ran gem install passenger
and was placed in the directory ~/.rbenv/shims
After that I ran rbenv rehash
and to install nginx:
I couldn't run passenger-install-nginx-module
because it asked to use with sudo
. When I tried sudo passenger-install-nginx-module
it told me command not found
.
Then I found this post PhilT's answer
and tried running sudo bash -c "source ~/.bashrc && passenger-install-nginx-module"
/home/aurelien/.rbenv/shims/passenger-install-nginx-module
I went through the entire passenger/nginx installation and pressed "enter" when it asked for the prefix directory.
in my root directory cd ~/home/aurelien
and I can't find /opt/nginx
.
Did it correctly create these directories?
The only directories/files I have on the root are these:
. .. apps .bash_history .bash_logout .bashrc .cache .gem .gitconfig .profile .rbenv .ssh .viminfo
EDIT: My .bashrc file
export RBENV_ROOT="${HOME}/.rbenv"
if [ -d "${RBENV_ROOT}" ]; then
export PATH="${RBENV_ROOT}/bin:${PATH}"
eval "$(rbenv init -)"
fi
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
Upvotes: 0
Views: 951
Reputation: 12495
The answer posted before by PhilT had the correct code for installing nginx together with passenger:
gem install passenger rbenv rehash sudo bash -c "source ~/.bashrc && passenger-install-nginx-module"
The fault in your explanation above is that /opt/nginx is not in user's home directory (~/home/aurelien/opt/nginx), but in the root directory (plainly /opt/nginx.), as nginx is a system-wide install.
(Note: In some other systems nginx also has config files placed in /etc/nginx instead)
Upvotes: 1