yum -y install libxml2* libcurl* libmcrypt* make
tar xfv php-5.5.27.tar.gz
cd php-5.5.27
./configure --prefix=/usr/local/php5.5.27 --with-mcrypt=/usr/local/lib --enable-maintainer-zts --with-mysqli --with-zlib --enable-fpm --with-openssl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --enable-opcache --with-pdo-mysql --enable-mbstring --with-config-file-path=/usr/local/php5.5.27/etc -with-curl=/usr/local/curl --with-config-file-scan-dir=/usr/local/php5.5.27/lib
make && make install
cd /usr/local/php5.5.27/etc
配置php-fpm.conf
;;;;;;;;;;;;;;;;;;;;; ; FPM Configuration ; ;;;;;;;;;;;;;;;;;;;;; ;include=etc/fpm.d/*.conf ;;;;;;;;;;;;;;;;;; ; Global Options ; ;;;;;;;;;;;;;;;;;; [global] pid = run/php-fpm.pid error_log = /home/logs/php/php-fpm.log log_level = warning daemonize = yes events.mechanism = epoll rlimit_files = 51200 ;;;;;;;;;;;;;;;;;;;; ; Pool Definitions ; ;;;;;;;;;;;;;;;;;;;; [www] user = pplive group = pplive listen = /dev/shm/php-fpm.sock listen.backlog = 1024 listen.group = pplive pm = static pm.max_children = 200 pm.max_requests = 5000 pm.status_path = /php-fpm-status ping.path = /php-fpm-ping slowlog = /home/logs/php/php-fpm-slow.log request_slowlog_timeout = 3 request_terminate_timeout = 0 catch_workers_output = yes |
cd /etc/init.d/
#!/bin/sh php_opts="--fpm-config $php_fpm_CONF" start() { stop() { quit() { reload() { } configtest() {
|
chmod +x /etc/init.d/php-fpm
chkconfig --add php-fpm
chkconfig --level 235 php-fpm on