How to install PHP 5.6 on CentOS 6.9
To install PHP 5.6 on CentOS 6.9
PHP is a popular general-purpose scripting language mostly used for the web development. Since it is fast, flexible and pragmatic, PHP is capable of powering everything from your blog to the most popular websites in the world. This tutorial covers the installation procedure of PHP 5.6 on CentOS 6.9.
Installation procedure
To start with the installation procedure, add the required repositories by running the following commands.
[root@linuxhelp ~]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm Retrieving https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm warning: /var/tmp/rpm-tmp.o8ubzh: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY Preparing... ########################################### [100%] 1:epel-release ########################################### [100%] [root@linuxhelp ~]# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm Retrieving https://mirror.webtatic.com/yum/el6/latest.rpm warning: /var/tmp/rpm-tmp.m52Pqb: Header V4 DSA/SHA1 Signature, key ID cf4c4ff9: NOKEY Preparing... ########################################### [100%] 1:webtatic-release ########################################### [100%]
After adding your repositories, install PHP 5.6 using yum command and execute it.
[root@linuxhelp ~]# yum install php56w php56w-opcache
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
Determining fastest mirrors
epel/metalink | 6.2 kB 00:00
* base: ftp.iitm.ac.in
* epel: ftp.jaist.ac.jp
* extras: ftp.iitm.ac.in
* updates: ftp.iitm.ac.in
* webtatic: sp.repo.webtatic.com
base | 3.7 kB 00:00
epel | 4.3 kB 00:00
epel/primary_db | 5.9 MB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 3.6 MB 00:00
webtatic | 3.6 kB 00:00
webtatic/primary_db | 118 kB 00:00
.
.
.
.
Installing : php56w-5.6.31-1.w6.x86_64 3/4
Installing : php56w-opcache-5.6.31-1.w6.x86_64 4/4
Verifying : php56w-cli-5.6.31-1.w6.x86_64 1/4
Verifying : php56w-opcache-5.6.31-1.w6.x86_64 2/4
Verifying : php56w-5.6.31-1.w6.x86_64 3/4
Verifying : php56w-common-5.6.31-1.w6.x86_64 4/4
Installed:
php56w.x86_64 0:5.6.31-1.w6 php56w-opcache.x86_64 0:5.6.31-1.w6
Dependency Installed:
php56w-cli.x86_64 0:5.6.31-1.w6 php56w-common.x86_64 0:5.6.31-1.w6
Complete!
The PHP has been installed successfully. To see the version of the installed PHP. Run the following command.
[root@linuxhelp ~]# php -v
PHP 5.6.31 (cli) (built: Jul 7 2017 06:44:24)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
To list the modules in PHP, execute the following command as follows.
[root@linuxhelp ~]# php -m
[PHP Modules]
bz2
calendar
Core
ctype
curl
date
ereg
exif
fileinfo
filter
ftp
gettext
gmp
hash
iconv
json
libxml
mhash
openssl
pcntl
pcre
Phar
readline
Reflection
session
shmop
SimpleXML
sockets
SPL
standard
tokenizer
xml
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
Thus the installation procedure of PHP 5.6 on CentOS 6.9 is done without any glitches.
Comments ( 0 )
No comments available