Forked from arbabnazar/Install PHP 5.3 on Ubuntu 14.04(trusty)
Created
June 28, 2019 08:08
-
-
Save MuruganChandrasekar/bfe2681a1178b083760f9f3c84914609 to your computer and use it in GitHub Desktop.
How to install PHP 5.3 on Ubuntu 14.04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Add the Ubuntu 12.04(precise) repositories | |
cat <<EOF >> /etc/apt/sources.list | |
deb http://archive.ubuntu.com/ubuntu precise main restricted universe | |
deb http://archive.ubuntu.com/ubuntu precise-updates main restricted universe | |
deb http://security.ubuntu.com/ubuntu precise-security main restricted universe multiverse | |
EOF | |
# Update the repos | |
apt-get update | |
#Install necessary packages | |
apt-get install \ | |
apache2-mpm-prefork=2.2.22-1ubuntu1.11 \ | |
apache2.2-bin=2.2.22-1ubuntu1.11 \ | |
apache2.2-common=2.2.22-1ubuntu1.11 \ | |
apache2-utils=2.2.22-1ubuntu1.11 \ | |
libapache2-mod-php5=5.3.10-1ubuntu3.26 \ | |
php5-common=5.3.10-1ubuntu3.26 \ | |
php5-cli=5.3.10-1ubuntu3.26 \ | |
php5-curl=5.3.10-1ubuntu3.26 \ | |
php5-dev=5.3.10-1ubuntu3.26 \ | |
php5-gd=5.3.10-1ubuntu3.26 \ | |
php5-mcrypt=5.3.5-0ubuntu1 \ | |
php5-imagick=3.1.0~rc1-1 \ | |
php5-mysql=5.3.10-1ubuntu3.26 | |
#(Optionally) – Prevent installed packages from updating with apt-get upgrade command | |
apt-mark hold \ | |
apache2-mpm-prefork \ | |
apache2.2-bin \ | |
apache2.2-common \ | |
apache2-utils \ | |
libapache2-mod-php5 \ | |
php5-common \ | |
php5-cli \ | |
php5-curl \ | |
php5-gd \ | |
php5-mcrypt \ | |
php5-imagick \ | |
php5-mysql | |
# Check the PHP version | |
root@ip-192-168-168-137:~# lsb_release -a | |
No LSB modules are available. | |
Distributor ID: Ubuntu | |
Description: Ubuntu 14.04.5 LTS | |
Release: 14.04 | |
Codename: trusty | |
root@ip-192-168-168-137:~# | |
root@ip-192-168-168-137:~# php -v | |
PHP 5.3.10-1ubuntu3.26 with Suhosin-Patch (cli) (built: Feb 13 2017 20:37:53) | |
Copyright (c) 1997-2012 The PHP Group | |
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies | |
root@ip-192-168-168-137:~# | |
root@ip-192-168-168-137:~# dpkg -l | grep -i "php5" | |
hi libapache2-mod-php5 5.3.10-1ubuntu3.26 amd64 server-side, HTML-embedded scripting language (Apache 2 module) | |
hi php5-cli 5.3.10-1ubuntu3.26 amd64 command-line interpreter for the php5 scripting language | |
hi php5-common 5.3.10-1ubuntu3.26 amd64 Common files for packages built from the php5 source | |
hi php5-curl 5.3.10-1ubuntu3.26 amd64 CURL module for php5 | |
hi php5-gd 5.3.10-1ubuntu3.26 amd64 GD module for php5 | |
hi php5-imagick 3.1.0~rc1-1 amd64 ImageMagick module for php5 | |
hi php5-mcrypt 5.3.5-0ubuntu1 amd64 MCrypt module for php5 | |
hi php5-mysql 5.3.10-1ubuntu3.26 amd64 MySQL module for php5 | |
root@ip-192-168-168-137:~# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment