First pay attention to loading storage ah storage ah!
Check the library
rpm -q make gcc gcc-c++ zlib-devel libtool libtool-ltdl libtool-ltdl-devel bisonncurses-devel
If not, install it
yum -y install make gcc gcc-c++ zlib-devel libtool libtool-ltdllibtool-ltdl-devel bison ncurses-devel libaio
A formalThe installationAction!! ———–
1. Download the PHP package
Wget HTTP: / / http://jp2.php.net/distributions/php-5.6.30.tar.gz
Ps knock on the blackboard! PHP official website those sub site links are not valid to copy, please see the browser download directory link, the best wget 360 clear open bar, simple and direct!
2. Be sure to install this
yum -y install libxml2-devel
3, compile + installation order can not be wrong! Note that the PHP installation path should correspond to your own folder name
Decompress tar -zvxf php-5.6.30.tar.gz
CD – 5.5.0 / PHP
./configure –prefix=/usr/local/php –with-config-file-path=/usr/local/php/etc –enable-fpm –enable-sysvsem –enable-sockets –enable-pcntl –enable-mbstring –enable-mysqlnd –enable-opcache –enable-shmop –enable-zip –enable-ftp –enable-gd-native-ttf –enable-wddx –enable-soap
make && make install
The installation is complete.
4. Configuration
Backup php-fpm. Conf and php.ini is highly recommended
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
Start the PHP – FPM/usr/local/PHP/sbin/PHP – FPM
5. Apache2.4 associated PHP
Edit the Apache configuration file:
Vi/usr/local/apache/conf/HTTP. Conf # your HTTP. The conf directory
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
Let’s get rid of these two
Add these two sentences to the end of the text
ServerName 127.0.0.1
ProxyPassMatch ^ /. *. PHP) $fcgi: / / 127.0.0.1:9000 / usr/local/apache/htdocs / $1
Save and exit wq!
Restart apache!
You’re done!!
`
`
`
All right, give it a thumbs up