Sean78Black
Member
- Joined
- May 29, 2016
- Messages
- 84
- Points
- 8
Ubuntu has expanded repository greatly, it fully supports than any other Linux distribution. So you can install any applications with the latest version on the old Ubuntu as Ubuntu 12.04.
The latest version of PHP is supported by the PPA, I feel very stable. Here we will use Ondrej PPA, is now available for PHP 5.4, 5.5, 5.6 and PHP 7. To use apt-add-repository command, you need to install the following packages before:
For Ubuntu 12.04 or earlier, you need to install python-software-properties:
For Ubuntu 12.10 or later, you need to install the software-properties-common package:
Now you need to add one of the PPA that you want below:
PPA for PHP 5.4: only works on Ubuntu 12.04
PPA for PHP 5.5:
PPA for PHP 5.6:
PPA for PHP 7.0: only works on Ubuntu 14.04 or later
To install PHP-FPM version 5.4 / 5.5 or 5.6, use the following command:
To install PHP-FPM version 7.0, use the following command:
To update PHP to a newer version, use the following command:
So you can choose to install the latest PHP version.
For servers with low memory (1GB), the selection of an OS is very important. Instead of running the latest OS to fill up our RAM, choose the lighter old OS, CentOS is lighter than Ubuntu a bit. Although old, but still install PHP 5.4, 5.5 or run the latest PHP 5.6 as well.
Good luck!
The latest version of PHP is supported by the PPA, I feel very stable. Here we will use Ondrej PPA, is now available for PHP 5.4, 5.5, 5.6 and PHP 7. To use apt-add-repository command, you need to install the following packages before:
For Ubuntu 12.04 or earlier, you need to install python-software-properties:
Code:
$ sudo apt-get install python-software-properties
Code:
$ sudo apt-get install software-properties-common
PPA for PHP 5.4: only works on Ubuntu 12.04
Code:
$ sudo apt-add-repository ppa:ondrej/php5-oldstable
Code:
$ sudo apt-add-repository ppa:ondrej/php5
Code:
$ sudo apt-add-repository ppa:ondrej/php5-5.6
Code:
$ sudo apt-add-repository ppa:ondrej/php-7.0
Code:
$ sudo apt-get update
$ sudo apt-get install php5-mysql php5-xmlrpc php5-curl php5-gd php5-cli php5-fpm php-pear php5-dev php5-mcrypt
Code:
$ sudo apt-get install php7.0-fpm
Code:
$ sudo apt-get upgrade
For servers with low memory (1GB), the selection of an OS is very important. Instead of running the latest OS to fill up our RAM, choose the lighter old OS, CentOS is lighter than Ubuntu a bit. Although old, but still install PHP 5.4, 5.5 or run the latest PHP 5.6 as well.
Good luck!