Installing PHP 7 and MySQL 5.7 on Ubuntu 14.04

Linode Staff

How can I install PHP 7.1 and MySQL 5.7 on Ubuntu 14.04?

1 Reply

Often times when trying to install more up-to-date versions of software via apt, you will find that only the older versions of said software are available. This is because the apt repositories for older versions of Ubuntu are not always updated with the latest packages, so you will have to rely on PPAs (Personal Package Archives) to install newer software packages.

For PHP, the most commonly used PPA is ondrej/php, and you can add the PPA to your apt repository list like so:

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update

From there, you can use apt-cache search php7.1 to find the packages that you need to install and install them.

As for MySQL, they have their own documentation for adding their repositories and installing other versions of MySQL:
https://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct