Installation
Installing Passenger for development is easy. We provide OS-specific installation packages to make your life easy.
Limited package support for non-LTS Ubuntu versions
You have selected a non-Long Term Support version of Ubuntu. We only provide .deb packages for non-LTS Ubuntu versions until the next Ubuntu version comes out. Ubuntu versions come out every 6 months.
So when the next Ubuntu version is released, you must upgrade your system to that new Ubuntu version. Otherwise you won't receive Passenger updates in the form of .deb packages from us anymore.
You can install Passenger through APT:
# Install our PGP key and add HTTPS support for APT
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7
sudo apt-get install -y apt-transport-https ca-certificates
# Add our APT repository
sudo sh -c 'echo deb https://oss-binaries.phusionpassenger.com/apt/passenger main > /etc/apt/sources.list.d/passenger.list'
sudo apt-get update
# Install Passenger
sudo apt-get install -y passenger
After installation, please validate the install by running passenger-config validate-install
. For example:
$ passenger-config validate-install * Checking whether this Phusion Passenger install is in PATH... ✓ * Checking whether there are no other Phusion Passenger installations... ✓
Notes about RPMs on Red Hat and CentOS
If you are using cPanel/WHM, note that it uses EasyApache whereas Passenger RPMs are designed for the official distro Apache. In this setup the gem installation method is likely a better fit, and you should ensure you have the correct apache tools installed: yum remove httpd-tools && yum install ea-apache24-devel
. You will also likely need to disable SELinux when using the Passenger gem.
Notes about SELinux on CentOS 7
If you experience dependency errors related to selinux-policy while installing Passenger first try yum clean all && yum update
, and if that doesn't resolve the issue, try enabling the CR repo: sudo yum update && sudo yum-config-manager --enable cr
.
Notes about SELinux on Red Hat 6 and CentOS 6
Passenger versions prior to 5.1 require kernel >= 2.6.39 if you are installing on Red Hat 6 or CentOS 6 with SELinux set to enforcing mode.
The pre 5.1 Passenger versions can also be installed without upgrading the kernel if you completely disable SELinux. Edit /etc/selinux/config
, set SELINUX=disabled
and reboot. Note that merely setting SELinux to permissive mode is not enough.
This issue does not apply to Red Hat >= 7 and CentOS >= 7, because these OS versions supply recent enough kernel versions.
You can install Passenger through YUM. But first you need to enable EPEL. The instructions differ depending on whether you are on Red Hat or CentOS. The second step is only necessary on Red Hat.
Enabling EPEL
Step 1: install EPEL package |
$ sudo yum install -y epel-release yum-utils $ sudo yum-config-manager --enable epel $ sudo yum clean all && sudo yum update -y |
step 2 (rhel only): enable the 'optional' repository |
enable the optional repository (rhel-67-server-optional-rpms). this can be done by enabling the rhel optional subchannel for rhn-classic. for certificate-based subscriptions see red hat subscription management guide. |
Repair Potential System Issues
# Ensure curl and nss/openssl are sufficiently up-to-date to talk to the repo
sudo yum update -y
date
# if the output of date is wrong, please follow these instructions to install ntp
sudo yum install -y ntp
sudo chkconfig ntpd on
sudo ntpdate pool.ntp.org
sudo service ntpd start
Install Passenger itself
# Install other prerequisites
sudo yum install -y pygpgme curl
# Add our YUM repository
sudo curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo
# Install Passenger
sudo yum install -y --enablerepo=epel passenger
After installation, please validate the install by running passenger-config validate-install
. For example:
$ passenger-config validate-install * Checking whether this Phusion Passenger install is in PATH... ✓ * Checking whether there are no other Phusion Passenger installations... ✓
You can install Passenger through Homebrew:
$ brew install passenger
After installation, please validate the install by running passenger-config validate-install
. For example:
$ passenger-config validate-install * Checking whether this Phusion Passenger install is in PATH... ✓ * Checking whether there are no other Phusion Passenger installations... ✓
Step 1: download and extract tarball
Download the latest Passenger source tarball.
Extract the tarball to some place permanent. Replace X.X.X with the Passenger version, and /somewhere-permanent
with an actual directory path.
$ tar -xzvf passenger-X.X.X.tar.gz -C /somewhere-permanent
Step 2: install Ruby
Passenger supports multiple languages and its core is written in C++, but its installer and administration tools are written in Ruby, so you must install Ruby.
Even though Ruby is required, Ruby will normally not be loaded during normal operation unless you deploy a Ruby web application on Passenger. Passenger's dependency on Ruby is very minimal. See Lightweight Ruby dependency for details.
Debian, Ubuntu |
sudo apt-get update sudo apt-get install -y ruby rake |
---|---|
Red Hat, CentOS, Fedora, ScientificLinux, Amazon Linux |
Enable EPEL, then run as root:
yum install -y ruby rubygem-rake |
Arch Linux |
sudo pacman -S ruby |
macOS | No action needed. Ruby is installed by default. |
Other operating systems | Install Ruby from the Ruby website. |
Step 3: add Passenger to PATH
Add the Passenger bin
directory to your PATH, so that your shell can locate the Passenger commands.
Open your shell's startup file. If you're using bash, this is usually /etc/bashrc
or /etc/bash.bashrc
. Inside that file, add this to the end:
PATH=/somewhere-permanent/passenger-X.X.X/bin:$PATH export PATH
Again, replace X.X.X with the Passenger version, and /somewhere-permanent
with an actual directory path.
When you're done, restart all your shells so that your new PATH takes effect.
useradd
instead of adduser
for example.
Step 4: validate installation
After installation, please validate the install by running passenger-config validate-install
. For example:
$ passenger-config validate-install * Checking whether this Phusion Passenger install is in PATH... ✓ * Checking whether there are no other Phusion Passenger installations... ✓
Installation in production
Installation in production is a bit different. We will cover that later in the deployment tutorial.
Next step
Next, we will create a sample Meteor application, which is necessary for future steps in this tutorial.