New users and user groups
-G WebUser WebUser
Download php-5.5
: Http://pan.baidu.com/s/1o6I6Lnk
Unpack
TarZXVF php-5.5.4.Tar. GZCD php-5.5.4./configure--prefix=/server/php5--enable-Sockets--with-apxs2=/server/apache2/bin/Apxs--with-mysql=/server/MySQL--with-mysqli--with-mysqli=/server/mysql/bin/Mysql_config--with-pdo-mysql=/server/MySQL--with-jpeg-dir=/usr/lib64--with-Curl--enable-mbstring= All--with-config-file-path=/server/php5/etc--enable-Soap--with-freetype-dir=/usr/local/Lib--with-GD--with-gettext
Compiling and installing
Make Make Install VI /server/apache2/conf/httpd.conf
Add AddType Line
AddType application/x-httpd-php. phpcp ./php.ini-production/server/php5/etc/php.ini
Edit Include_path
VI /server/php5/etc/".:/ php/includes:/server/php5/lib/php"cgi.fix_pathinfo=1date. TimeZone = Asia/shanghai
A system with SELinux enabled requires the following line operation
Chcon-t texrel_shlib_t/server/apache2/modules/libphp5.so
Restart Apache
/server/apache2/bin/apachectl restart