CentOS system comes with a low PHP version, if we need to use a high version of PHP, can not be compiled installation, directly with Yum installation will be very time-saving.
650) this.width=650; "title=" "alt=" centos_php_02 "class=" Alignnone size-full wp-image-11223 "src=" http:// Www.linuxprobe.com/wp-content/uploads/2016/05/centos_php_02.jpg "width=" "height=" "style=" Vertical-align: middle;height:auto;margin:10px auto; "/>
Brief introduction
PHP (Hyper-text preprocessor) is a common open source scripting language. The grammar absorbs the C language, Java and Perl features, is conducive to learning, widely used, mainly for the field of web development. PHP's unique syntax mixes the syntax of C, Java, Perl, and PHP's own creation.
Dynamic pages made in PHP are compared to other programming languages, and PHP is executed in HTML (an application under the standard Universal Markup Language), which is much more efficient than CGI, which generates HTML markup entirely; PHP can also execute post-compilation code, Compilation can achieve encryption and optimize code execution, making code run faster.
Installation
1. Check if PHP is currently installed
Rpm-qa|grep PHP
If you have PHP installed, remove the installation packages first:
Yum Remove php*
2. Install the PHP source
Centos 5 Install PHP Source:
RPM-IVH http://mirror.webtatic.com/yum/el5/latest.rpm
CentOs 6 Install PHP Source:
RPM-IVH http://mirror.webtatic.com/yum/el6/latest.rpm
CentOs 7 installs PHP source and epel extension sources:
RPM-IVH HTTPS://MIRROR.WEBTATIC.COM/YUM/EL7/EPEL-RELEASE.RPMRPM-IVH https://mirror.webtatic.com/yum/el7/ webtatic-release.rpm
3. Start installing PHP now
Install the basic installation package for php5.5:
Yum install php55w php55w-gd php55w-mbstring php55w-mysql php55w-fpm
Install the basic installation package for php5.6:
Yum install php56w php55w-gd php56w-mbstring php56w-mysql php56w-fpm
Install the basic installation package for php7.0:
Yum install php70w php70w-gd php70w-mbstring php70w-mysql php70w-fpm
After installing PHP, you need to restart Apache:
Service httpd Restart
4. Testing the Web page
I installed the php7.0, take php7.0 write a Web test
vim/var/www/html/index.php<?php phpinfo ();?>
650) this.width=650; "title=" "alt=" centos_php "class=" Alignnone size-full wp-image-11220 "src=" http:// Www.linuxprobe.com/wp-content/uploads/2016/05/centos_php.png "width=" 1162 "height=" 898 "style=" Vertical-align: middle;height:auto;margin:10px auto; "/>
This article is reproduced from:http://www.linuxprobe.com/centos-yum-php/
free to provide the latest Linux technology tutorials Books, for open-source technology enthusiasts to do more and better:650) this.width=650; "src=" Http://linux130.blog.51cto.com/e/u261/themes/default/images/spacer.gif "alt=" Spacer.gif "style=" padding:0px;margin:0px;vertical-align:top;border:1px solid rgb (221,221,221); Background:url (" Http://linux130.blog.51cto.com/e/u261/lang/zh-cn/images/localimage.png ") no-repeat 50% 50%;/>http://www.linuxprobe.com/
This article is from the "Linux_ Tauwujie" blog, be sure to keep this source http://linux130.blog.51cto.com/11532920/1769803
CentOS Install PHP High version