How To Install PHP 7 on CentOS/RHEL 6x
Step: 1. You must add the Webtatic & EPEL yum Repository :
For CentOS/RHEL 7.x :
# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
CentOS/RHEL 6.x :
# rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
Step: 2. Now you can install PHP 7.0 (along with an opcode cache) by doing :
# yum install -y --enablerepo=webtatic-testing php70w php70w-opcache php70w-bcmath php70w-cli php70w-common php70w-dba php70w-devel php70w-embedded php70w-enchant php70w-fpm php70w-gd php70w-imap php70w-interbase php70w-intl php70w-ldap php70w-mbstring php70w-mcrypt php70w-mysql php70w-mysqlnd php70w-odbc php70w-pdo php70w-pdo_dblib php70w-pgsql php70w-process php70w-pspell php70w-recode php70w-snmp php70w-soap php70w-tidy php70w-xml php70w-xmlrpc --skip-broken
Step: 3. Changes on the Module File for Php :
# vi /etc/httpd/conf.d/php.conf
-- Line no. 6 & 10 replace with these Lines.
LoadModule php7_module modules/libphp7.so (replace with line nuber 6)
LoadModule php7_module modules/libphp7-zts.so (replace with line number 10)
AddHandler php7-script .php (replace with line number 16)
-- Save & Quit (:wq)
Step: 4. Create a php info file & Check :
# vi /var/www/html/info.php
<?php
phpinfo ();
?>
-- Save & Quit (:wq)
# service httpd restart
Check on Browser http://IP-Address/info.php
or Check through CLI :
# php -v
PHP 7.0.0RC2 (cli) (built: Sep 4 2015 21:04:20)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
Thanks For Visiting on My Blog, For More Tutorials Keep Visiting My Blog
0 comments:
Post a Comment