準(zhǔn)備工作
主要從事網(wǎng)頁設(shè)計(jì)、PC網(wǎng)站建設(shè)(電腦版網(wǎng)站建設(shè))、wap網(wǎng)站建設(shè)(手機(jī)版網(wǎng)站建設(shè))、成都響應(yīng)式網(wǎng)站建設(shè)、程序開發(fā)、微網(wǎng)站、小程序設(shè)計(jì)等,憑借多年來在互聯(lián)網(wǎng)的打拼,我們?cè)诨ヂ?lián)網(wǎng)網(wǎng)站建設(shè)行業(yè)積累了豐富的網(wǎng)站建設(shè)、成都做網(wǎng)站、網(wǎng)絡(luò)營銷經(jīng)驗(yàn),集策劃、開發(fā)、設(shè)計(jì)、營銷、管理等多方位專業(yè)化運(yùn)作于一體,具備承接不同規(guī)模與類型的建設(shè)項(xiàng)目的能力。
1.yum安裝所需軟件包
# yum install -y gcc gcc-c++ make zlib zlib-devel pcre pcre-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers1
2.yum源沒有l(wèi)ibmcrypt包,采用源碼安裝。
# cd /usr/local/src/# wget http://ncu.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz# ./configure prefix=/usr/local/libmcrypt# make && make install # echo$?12345
3.下載php源碼包,解壓
# wget http://am1.php.net/distributions/php-5.6.29.tar.bz2# tar jxvf php-5.6.29.tar.bz2# cd php-5.6.29123
安裝過程
1.創(chuàng)建用戶php-fpm
# useradd -s /sbin/nologin php-fpm
準(zhǔn)備工作
1.yum安裝所需軟件包
# yum install -y gcc gcc-c++ make zlib zlib-devel pcre pcre-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers1
2.yum源沒有l(wèi)ibmcrypt包,采用源碼安裝。
# cd /usr/local/src/# wget http://ncu.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz# ./configure prefix=/usr/local/libmcrypt# make && make install # echo$?12345
3.下載php源碼包,解壓
# wget http://am1.php.net/distributions/php-5.6.29.tar.bz2# tar jxvf php-5.6.29.tar.bz2# cd php-5.6.29123
安裝過程
1.創(chuàng)建用戶php-fpm
# useradd -s /sbin/nologin php-fpm
3.編譯和安裝
# make && make install# echo $?12
4.修改配置文件
# cp php.ini-production /usr/local/php/etc/php.ini# vim /usr/local/php/etc/php-fpm.conf# /usr/local/php/sbin/php-fpm -t123
php-fpm.conf修改項(xiàng)如下: [global] pid = /usr/local/php/var/run/php-fpm.pid error_log = /usr/local/php/var/log/php-fpm.log [www] listen = /tmp/php-fcgi.sock user = php-fpm group = php-fpm pm = dynamic pm.max_children = 50 pm.start_servers = 20 pm.min_spare_servers = 5 pm.max_spare_servers = 35 pm.max_requests = 500 rlimit_files = 1024 運(yùn)行/usr/local/php/sbin/php-fpm -t,若結(jié)果為“test is successful”,則配置正確。
5.拷貝php-fpm啟動(dòng)腳本到/etc/init.d/,更改權(quán)限
# cp /usr/local/src/php-5.6.29/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm# chmod 755 /etc/init.d/php-fpm# service php-fpm start123
若使php-fpm開機(jī)啟動(dòng),運(yùn)行chkconfig --add php-fpm;chkconfig php-fpm on。 查看服務(wù)是否啟動(dòng),運(yùn)行ps aux | grep php。