动物总动员电影免费观看,国产一线天在线观看,亚洲成人精品久久,www.夜色av.com,caoporn国产一区二区,国产精品毛片一区视频播不卡,91av456

龍巖易富通網絡科技有限公司

龍巖小程序開發(fā),龍巖分銷系統(tǒng)

CentOS 6 編譯安裝Nginx1.3.9+PHP5.4

2015.09.10 | 1860閱讀 | 0條評論 | 服務器配置

[1].安裝Nginx

1,添加一個不能登錄且沒有主目錄的用戶:


1 # useradd www -M -s /sbin/nologin


2,必要的組件


# yum -y install gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers libtool-ltdl-devel pcre-devel


3,編譯nginx并安裝

# wget http://www.nginx.com.cn/download/nginx-1.3.9.tar.gz

# tar -zxvf nginx-1.3.9.tar.gz

# cd nginx-1.3.9

# ./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-http_ssl_module

# make 

# make install

[2].安裝PHP


1,安裝必要的組件


# yum -y install libjpeg-devel libpng-devel

# wget ftp://mcrypt.hellug.gr/pub/crypto/mcrypt/libmcrypt/libmcrypt-2.5.7.tar.gz

# tar -zxvf libmcrypt-2.5.7.tar.gz

# cd libmcrypt-2.5.7

# ./configure

# make 

# make install


==64位系統(tǒng)==


1 # ln -s /usr/lib64/mysql/ /usr/lib/mysql


==64位系統(tǒng)==


2,編譯php并安裝

# wget http://cn2.php.net/get/php-5.4.13.tar.gz/from/this/mirror


# tar -zxvf php-5.4.13.tar.gz


# cd php-5.4.13



 #./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/lib--with-iconv --with-zlib --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-mysql --with-mysqli --with-pdo-mysql --enable-ftp --with-jpeg-dir --with-freetype-dir --with-png-dir --enable-fpm --with-fpm-user=www --with-fpm-group=www


如果在32位機器上裝到時候可能會碰到checking size of char... configure: error: cannot compute sizeof (char)這個問題。需要去掉--disable-rpath


如果直接編譯出錯,執(zhí)行以下兩行在進行編譯

# mv configure configure.bak

# ./buildconf --force


#make 

#make install


3,拷貝和修改php配置文件


# cp php.ini-production /usr/local/php/lib/php.ini 或是/usr/local/lib/php.ini

 # cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf

 # /usr/local/php/bin/php --ini //測試ini文件是否加載


修改php.ini


[PHP]

safe_mode = On

register_globals = Off

magic_quotes_gpc = Off

allow_url_fopen = Off

allow_url_include = Off

expose_php=Off

disable_functions = shell_exec,system,exec,passthru,show_source,curl_exec,curl_multi_exec,get_cfg_var

[Date]

date.timezone = "Asia/Shanghai"


修改php-fpm.conf


[global]

pid = run/php-fpm.pid

error_log = log/php-fpm.log

log_level = notice

emergency_restart_threshold = 0

emergency_restart_interval = 0

[www]

pm.max_children = 256

pm.start_servers = 20

pm.min_spare_servers = 5

pm.max_spare_servers = 256

pm.max_requests = 500


贊 (

發(fā)表評論

万年县| 平凉市| 云梦县| 五莲县| 海原县| 蕲春县| 阳新县| 会同县| 沅江市| 应用必备| 揭东县| 凤山市| 蒲江县| 怀宁县| 台北市| 花垣县| 呼伦贝尔市| 南和县| 宜良县| 连南| 合川市| 蓝山县| 浮梁县| 大庆市| 新乐市| 林芝县| 兴宁市| 长海县| 星座| 玉门市| 赣州市| 平定县| 安宁市| 辽源市| 高陵县| 常宁市| 文安县| 峨眉山市| 新干县| 祥云县| 安阳市|