centos6.7x86_64php7安装笔记 new
安裝系統相關的依賴庫
#yum install libicu-devel mcrypt-devel libcurl-devel?bzip2-devel zlib-devel libxml2-devel
服務器編譯配置
#./configure --prefix=/usr/local/lnmp/php --with-config-file-path=/usr/local/lnmp/php/etc --enable-fpm --enable-exif --enable-ftp --enable-intl --enable-mbstring --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-zip --enable-mysqlnd --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-libxml-dir --with-curl --with-mhash --with-zlib --with-bz2 --with-openssl --with-pdo-mysql --disable-fileinfo
根據服務器內存大小 ?添加 ?--disable-fileinfo ? ?> 1G ? 可略
#make && make install
拷貝并編輯基礎配置文件,如修改時區等等
#cp?php.ini-development /usr/local/lnmp/php/etc/php.ini
補充php-fpm至系統服務
#vi /etc/init.d/php-fpm
#!?/bin/sh###?BEGIN?INIT?INFO #?Provides:??????????php-fpm #?Required-Start:????$remote_fs?$network #?Required-Stop:?????$remote_fs?$network #?Default-Start:?????2?3?4?5 #?Default-Stop:??????0?1?6 #?Short-Description:?starts?php-fpm #?Description:???????starts?the?PHP?FastCGI?Process?Manager?daemon ###?END?INIT?INFOprefix=/usr/local/lnmp/php exec_prefix=${prefix}php_fpm_BIN=${exec_prefix}/sbin/php-fpm php_fpm_CONF=${prefix}/etc/php-fpm.conf php_fpm_PID=${prefix}/var/run/php-fpm.pidphp_opts="--fpm-config?$php_fpm_CONF?--pid?$php_fpm_PID"wait_for_pid?()?{try=0while?test?$try?-lt?35?;?docase?"$1"?in'created')if?[?-f?"$2"?]?;?thentry=''breakfi;;'removed')if?[?!?-f?"$2"?]?;?thentry=''breakfi;;esacecho?-n?.try=`expr?$try?+?1`sleep?1done}case?"$1"?instart)echo?-n?"Starting?php-fpm?"$php_fpm_BIN?--daemonize?$php_optsif?[?"$?"?!=?0?]?;?thenecho?"?failed"exit?1fiwait_for_pid?created?$php_fpm_PIDif?[?-n?"$try"?]?;?thenecho?"?failed"exit?1elseecho?"?done"fi;;stop)echo?-n?"Gracefully?shutting?down?php-fpm?"if?[?!?-r?$php_fpm_PID?]?;?thenecho?"warning,?no?pid?file?found?-?php-fpm?is?not?running??"exit?1fikill?-QUIT?`cat?$php_fpm_PID`wait_for_pid?removed?$php_fpm_PIDif?[?-n?"$try"?]?;?thenecho?"?failed.?Use?force-quit"exit?1elseecho?"?done"fi;;status)if?[?!?-r?$php_fpm_PID?]?;?thenecho?"php-fpm?is?stopped"exit?0fiPID=`cat?$php_fpm_PID`if?ps?-p?$PID?|?grep?-q?$PID;?thenecho?"php-fpm?(pid?$PID)?is?running..."elseecho?"php-fpm?dead?but?pid?file?exists"fi;;force-quit)echo?-n?"Terminating?php-fpm?"if?[?!?-r?$php_fpm_PID?]?;?thenecho?"warning,?no?pid?file?found?-?php-fpm?is?not?running??"exit?1fikill?-TERM?`cat?$php_fpm_PID`wait_for_pid?removed?$php_fpm_PIDif?[?-n?"$try"?]?;?thenecho?"?failed"exit?1elseecho?"?done"fi;;restart)$0?stop$0?start;;reload)echo?-n?"Reload?service?php-fpm?"if?[?!?-r?$php_fpm_PID?]?;?thenecho?"warning,?no?pid?file?found?-?php-fpm?is?not?running??"exit?1fikill?-USR2?`cat?$php_fpm_PID`echo?"?done";;*)echo?"Usage:?$0?{start|stop|force-quit|restart|reload|status}"exit?1;;esac#chkconfig --add php-fpm
#
轉載于:https://blog.51cto.com/vsfor/1705759
總結
以上是生活随笔為你收集整理的centos6.7x86_64php7安装笔记 new的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2016第25周二
- 下一篇: JSP中嵌入java代码方式以及指令