Upgrading Passenger + Apache
through source tarball
This guide teaches you how to upgrade Passenger + Apache to the latest version. It assumes that Passenger + Apache was installed through a source tarball. Is this not the case? Go back to the upgrade guide index.
Table of contents
- Loading...
Upgrade instructions
Step 1: download and extract latest tarball
Download the latest Passenger source tarball.
Extract the tarball to the same directory as where your current Passenger installation is located. For example, if Passenger was located in /opt/passenger-5.0.12
, then extract the tarball to /opt
. Replace X.X.X with the Passenger version you downloaded.
$ tar -xzvf passenger-X.X.X.tar.gz -C /opt
Step 2: update Passenger PATH entry
While installing the previous Passenger version, you added its bin
directory to PATH, so that your shell can locate the previous Passenger version's commands. You need to update this PATH entry to point to the latest Passenger.
Open your shell's system-wide startup file. If you're using bash, this is usually /etc/bashrc
or /etc/bash.bashrc
. Inside that file, look for something like this:
PATH=/opt/passenger-PREVIOUS-VERSION-NUMBER/bin:$PATH
Replace it with:
PATH=/opt/passenger-CURRENT-VERSION-NUMBER/bin:$PATH
When you're done, restart all your shells so that your new PATH takes effect.
useradd
instead of adduser
for example.
Step 3: re-run the Passenger Apache module installer
Re-run the Passenger Apache module installer in order to upgrade the Passenger Apache module to the latest version. Follow the on-screen instructions:
$ passenger-install-apache2-module
When done, don't forget to update the configuration snippet in your Apache config file, as instructed by the installer.
Different operating systems and Apache installations have different conventions with regard to where the Apache configuration file is and how it is organized. Please read Working with the Apache configuration file if you are not familiar with it. That page is especially of interest for macOS Server >= 10.8 users because the configuration file may be at a surprising location.
Step 4: restart Apache
Restart Apache using the following command. Note that you must stop and start Apache. Just restarting it or reloading it is not enough.
$ sudo apache2ctl stop &&
sudo apache2ctl start
apachectl
instead of apache2ctl
.
Step 5: remove old version
Remove the previous Passenger version:
$ sudo rm -rf /opt/passenger-X.X.X
Step 6: validate installation
After installation, please validate the install by running sudo passenger-config validate-install
. For example:
$ sudo passenger-config validate-install * Checking whether this Phusion Passenger install is in PATH... ✓ * Checking whether there are no other Phusion Passenger installations... ✓
All checks should pass. If any of the checks do not pass, please follow the suggestions on screen.
Finally, check whether Apache has started the Passenger core processes. Run sudo passenger-memory-stats
. You should see Apache processes as well as Passenger processes. For example:
$ sudo passenger-memory-stats Version: 5.0.8 Date : 2015-05-28 08:46:20 +0200 ---------- Apache processes ---------- PID PPID VMSize Private Name -------------------------------------- 3918 1 190.1 MB 0.1 MB /usr/sbin/apache2 ... ----- Passenger processes ------ PID VMSize Private Name -------------------------------- 12517 83.2 MB 0.6 MB Passenger watchdog 12520 266.0 MB 3.4 MB Passenger core 12531 149.5 MB 1.4 MB Passenger ust-router ...
If you do not see any Apache processes or Passenger processes, then you probably have some kind of installation problem or configuration problem. Please refer to the troubleshooting guide.