How do I prepare my site for Ubuntu Bionic?

The following provides information to help you prepare your site for the Ubuntu upgrade from Trusty Tahr to version 18.04.1 LTS (aka Bionic).

What to expect

DreamHost will contact you via email in advance of the upgrade.

The time frame of an upgrade can vary from server to server, however the timing ensures that there are several highly trained engineers on hand should any major issues arise. The upgrade itself should take no longer than an hour to complete.

Any services that rely on the availability of your MySQL server (WordPress or any other database-driven websites, applications, and so on) will not be reachable until the upgrade is complete. This will NOT affect cloud or email services.

Checking the version of Ubuntu

As mentioned above, you will receive an email notifying you of your server's upgrade. However, you can manually check via SSH.

The following command confirms the server is still running Ubuntu 14.

[server]$ cat /etc/issue
Ubuntu 14.04.5 LTS \n \l

And this shows a server running Ubuntu 18.

[server]$ cat /etc/issue
Ubuntu 18.04.1 LTS \n \l

MySQL

Server changes

DreamHost MySQL servers will be upgraded to MySQL version to 5.7 as part of the Ubuntu upgrade.

Reserved words

MySQL 5.7 includes list of "reserved" words (such as ‘SELECT’, ‘DELETE’, ‘BIGINT’, and ‘VIRTUAL’) that cannot be used as a database name and must be escaped. These words are reserved and require special treatment for use as identifiers such as table and column names. Please see the MySQL Keywords and Reserved Words article for more information.

Web server changes

Apache version change (from 2.2 to 2.4)

Apache is upgrading to version 2.4 (from 2.2). Although this should not cause any major issues to your hosting environment, you can view a list of changes in the following article:

require valid-user

If you're using an .htaccess file to password protect your site, make sure you add this line to your .htaccess file:

require valid-user

If you do not add this, your site will throw a 500 error and the following line will display in your site's error.log:

AH01627: AuthType configured with no corresponding authorization directives

WebDAV file listing hidden if index is present

On Apache 2.4, you must add the following text to the .htaccess file in order to access the directory of an index file using WebDAV (not a browser), since it won't show the file list in Windows Explorer:

DirectoryIndex disabled

Boto-rsync

Because boto-rsync is outdated software and is no longer maintained, it is also removed from the latest version of Ubuntu Bionic. DreamHost recommends using S3cmd instead. You can find out more about how to use S3cmd (or AWS CLI) at DreamHost in the following articles:

FFmpeg and Libav

Both of these libraries are changing in the Bionic upgrade of Ubuntu.

In Ubuntu Trusty, Libav replaced FFmpeg, and FFmpeg was removed from Trusty entirely. With the Bionic upgrade, this is being reversed: FFmpeg is back, and Libav has been removed. Please make sure you update your file settings accordingly.

FilterProvider syntax change

In Apache 2.4, the syntax for FilterProvider has changed.

Sample old version:

FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html

Sample new version:

FilterProvider COMPRESS DEFLATE "%{Content_Type} = 'text/html'"

You can read more about this in the Apache 2.4 mod_filter documentation:

GCC version change to 7

Bionic includes gcc-7, which means versions of Ruby earlier than 2.4 are no longer supported as they require gcc-6.

Sites relying on versions of Ruby earlier than Ruby 2.4 must be migrated to a newer version.

Java version change (from 7u151 to 8u171)

Ubuntu Bionic includes a new version of Java version 8, 8u171.

This is the first major upgrade in quite some time, so it's definitely a good idea to make sure any Java dependencies you may have are compatible with version 8.

For more information on the latest versions of Java, visit the following link:

OpenSSL version change (1.0.1f to 1.1.0g)

Bionic includes version 1.1.0g of OpenSSL.

Passenger

To enable Passenger error-friendly pages (which helps troubleshoot upgrade issues), add the following to an .htaccess file within the application:

PassengerFriendlyErrorPages on

Perl version change (from 5.18.4 to 5.26)

Ubuntu Bionic includes a new version of Perl, 5.26. Among the many changes, this update removes the current directory (".") from @INC for security reasons. You can read about this in more detail here.

For more information on updating your version of Perl, visit the following article:

Python version changes

The following Python versions are changing:

  • Python 2 (from 2.7.5 to 2.7.15)
  • Python 3 (from 3.4.3 to 3.6.5)

Since Bionic includes a new kernel and operating system, it no longer supports custom compiled versions of Python older than 2.7.15. If you are running an application that uses a version of Python that is older than 2.7.15, you must upgrade your code so it is compatible with at least 2.7.15 when applicable.

If you need to use an older-than-2.7.15 version of Python, you can consider using DreamCompute to set up a customized environment that allows sudo access. For more information on DreamCompute, please see the following article:

Ubuntu Bionic includes a new version of Python 2 (2.7.15) and Python 3 (3.6.5). If you used a version older than 2.7.15 when creating your virtualenv, you may need to reinstall your virtualenv and all modules with a newer version:

For more information on the latest versions of Python, visit the following links:

Python virtual environment

If your website is using a Python virtual environment and you notice any errors after the upgrade, reinstall your virtual environment and all modules. This helps to ensure everything is compatible with the new libraries on the server.

Examples of errors you may see are Django, Passenger, or Python errors/warnings.

Ruby version change (from 1.9.3.4 to 2.5.1)

The Ruby version on the server is changing to 2.5.1. If you would like more control over this, DreamHost strongly recommends using RVM.

If you are using Bundler, you only need to run:

[server]$ bundle exec gem pristine

Then, reload passenger so that the changes take effect by touching a restart.txt file from your apps 'tmp' directory:

[server]$ touch  tmp/restart.txt

SSH version change to 7.6p1

The version of SSH on Bionic servers is 7.6p1. Please note that DSA keys are not available on this version.

Telnet

Because Telnet is a deprecated protocol, it is removed from the latest version of Ubuntu Bionic in order to help keep your server secure. If you require telnet, DreamHost recommends running it on your local computer instead.

How can I find support?

If you have any questions or concerns, please feel free to contact support.

Did this article answer your questions?

Article last updated PST.