Upgrading Passenger Enterprise + Apache
through source tarball
This guide teaches you how to upgrade Passenger Enterprise + Apache to the latest version. It assumes that Passenger Enterprise + Apache was installed through a source tarball. Is this not the case? Go back to the upgrade guide index.
Table of contents
Step 1: download latest tarball, upload to server and extract
Go to the "Files" section in the Customer Area and download the tar.gz file of the latest Passenger Enterprise version. Copy that file to your production server, for example using
local-computer$ cd /path-to-your-local-computer-download-folder local-computer$ scp passenger-enterprise-server-X.X.X.tar.gz email@example.com:
(Replace X.X.X with the Passenger Enterprise version)
On your production server, extract the tarball to the same directory as where your current Passenger Enterprise installation is located. For example, if Passenger Enterprise was located in
/opt/passenger-enterprise-5.0.12, then extract the tarball to
/opt. Replace X.X.X with the Passenger Enterprise version you downloaded.
production-server$ tar -xzvf passenger-enterprise-server-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/bash.bashrc. Inside that file, look for something like this:
Replace it with:
When you're done, restart all your shells so that your new PATH takes effect.
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:
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
Step 5: remove old version
Remove the previous Passenger version:
$ sudo rm -rf /opt/passenger-enterprise-server-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.