Php dependency
Yum install-y libxml2-devel openssl-devel libcurl-devel libjpeg-devel libpng-devel libicu-devel openldap-devel
Download: php-5.5.23.tar.gz
. /Configure -- prefix =/root/tools/php5.5 -- with-config-file-path =/root/tools/php5.5/etc -- enable-fpm -- enable-xml -- disable-rpath -- enable-bcmath -- enable-shmop -- enable-sysvsem -- enable-inline-optimization -- with-curl -- enable-mbregex -- enable-fpm -- enable-mbstring -- with-gd -- enable -gd-native-ttf -- with-openssl -- with-mhash -- enable-pcntl -- enable-sockets -- with-xmlrpc -- enable-zip -- enable-soap -- enable-opcache -- -pdo-mysql -- enable-maintainer-zts -- disable-fileinfo
Cp/root/tools/php-5.5.23/php. ini-production/root/tools/php5.5/php. ini
Modify the php. Ini file register_globals = On
Make: *** [ext/fileinfo/libmagic/apprentice. lo] Error 1
An error occurred while compiling PHP5.5 make.
Make: *** [ext/fileinfo/libmagic/apprentice. lo] Error 1
Solution
This is because the memory is less than 1 GB.
Add the following options to./configure:
-- Disable-fileinfo
Disable fileinfo support Disable fileinfo
Configure php:
Cp php. ini-production/usr/local/php-5.5.0/etc/php. ini
Cp/usr/local/php-5.5.0/etc/php-fpm.conf.default/usr/local/php-5.5.0/etc/php-fpm.conf
/Usr/local/php-5.5.0/sbin/php-fpm
Determine whether PHP is enabled through the port
# Netstat-lnt | grep 9000
Tcp 0 0 127.0.0.1: 9000 0.0.0.0: * LISTEN