-
About Passenger
- What is Passenger?
- Fundamental concepts
-
Getting started
- Quickstart
- Installation
- The ‘passenger’ command
- Process management
- Reloading code
- The --help option
-
Deployment
- Deploy to production
This documentation website doesn’t support Internet Explorer. Please visit our old documentation to find what you’re looking for.
Installation
Relevant selection for this article:
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-get install -y dirmngr gnupg apt-transport-https ca-certificates curl
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 561F9B9CAC40B2F7
curl https://oss-binaries.phusionpassenger.com/auto-software-signing-gpg-key.txt | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/phusion.gpg >/dev/null
# 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 Enterprise Linux (Red Hat, CentOS, Rocky, Alma)
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: dnf remove httpd-tools && dnf install ea-apache24-devel
. You will also likely need to disable SELinux when using the Passenger gem.
Notes about SELinux on Enterprise Linux (Red Hat, CentOS, Rocky, Alma) ≥ 7
If you experience dependency errors related to selinux-policy while installing Passenger first try dnf clean all && dnf update
, and if that doesn't resolve the issue, try enabling the CR repo: sudo dnf update && sudo dnf config-manager --enable cr
.
You can install Passenger through DNF. But first you need to enable EPEL. The instructions differ depending on whether you are on Red Hat or another Enterprise Linux. The second step is only necessary on Red Hat.
Enabling EPEL
Step 1: install EPEL package |
$ sudo dnf install -y dnf-utils $ sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(< /etc/redhat-release tr -dc '0-9.'|cut -d \. -f1).noarch.rpm $ sudo dnf config-manager --enable epel $ sudo dnf clean all && sudo dnf update -y |
step 2 (rhel only): enable the 'optional' repository |
enable the optional repository (rhel-89-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 dnf update -y
date
# if the output of date is wrong, please follow these instructions to install ntp
sudo dnf -y install chrony
sudo systemctl enable chronyd
sudo firewall-cmd --permanent --add-service=ntp
sudo firewall-cmd --reload
sudo systemctl restart chronyd
Install Passenger itself
# Install other prerequisites
sudo dnf install -y pygpgme curl
# Add our RPM repository
sudo curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo
# Install Passenger
sudo dnf 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, Rocky, Alma, Fedora, Scientific Linux, 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: The 'Passenger' command
Learn about the new features: Generic Language Support. Or jump straight to the GLS guides.