1, PHP compilation process Please configure the Yum source (System installation source and Epel source) after executing the following command:# yum -y groupinstall "Desktop platform development " # yum -y install bzip2-devel libmcrypt-devel2, compiling # ./ configure --prefix=/opt/php --with-mysql=/opt/mysql --with-openssl --with-mysqli=/opt/ mysql/bin/mysql_config --enable-mbstring --with-freetype-dir --with-jpeg-dir -- with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --enable-sockets - -enable-fpm --with-mcrypt --with-config-file-path=/opt/php --with-config-file-scan-dir=/ opt/php.d --with-bz2 | | tee /tmp/php.bak# make# make intall provides a configuration file for PHP: # cp php.ini-production /opt/php/php.ini3, configure php-fpm to provide sysv init scripts for php-fpm and add them to the list of services: # cp sapi/fpm/ init.d.php-fpm /etc/rc.d/init.d/php-fpm# chmod +x /etc/rc.d/init.d/php-fpm# chkconfig --add php-fpm# chkconfig php-fpm on provides configuration files for php-fpm: # cp /opt/php/etc/ php-fpm.conf.default /opt/php/etc/php-fpm.conf Edit php-fpm configuration file: # vim /opt/php/etc/ Php-fpm.conf configure FPM with the relevant options for the value you need and enable the PID file (the last line below):pm.max_children = 50pm.start_servers = 5pm.min_spare_servers = 2pm.max_spare_servers = 8pid = /opt/php/var/run/ php-fpm.pid and modify user and group information (here because of the supported Nginx applications, all the users and groups that need to be changed into Nginx compilation. If it's Apache, you don't need to change it) User = webusergroup = users next you can start PHP-FPM: # service php-fpm start uses the following command (if the command output has several PHP-FPM processes to indicate that the boot was successful): # ps aux | grep php-fpm by default, FPM listens on port 9000 of 127.0.0.1, and can also use the following command to verify that it is already listening on the appropriate socket. # netstat -tnlp | grep php-fpmtcp 0 0 127.0.0.1:9000 0.0.0.0:* &Nbsp; listen 689/php-fpm
This article is from the "struggling People" blog, please be sure to keep this source http://wodemeng.blog.51cto.com/1384120/1690807
PHP Source code Compilation