nginx及php安裝雜記

【1】php 5.3.0 編譯安裝

./configure --prefix=/usr/local/php /
--with-config-file-path=/usr/local/php /
--with-mysql=mysqlnd /
--with-mysqli=mysqlnd /
--with-pdo-mysql=mysqlnd /
--with-iconv /
--with-zlib /
--with-zlib-dir=/usr/local/zlib /
--enable-xml /
--disable-rpath /
--enable-discard-path /
--enable-safe-mode /
--enable-bcmath /
--enable-shmop /
--enable-sysvsem /
--enable-inline-optimization /
--with-curl=/usr/local/curl /
--with-curlwrappers /
--enable-mbregex /
--enable-fastcgi /
--enable-fpm /
--enable-force-cgi-redirect /
--enable-mbstring /
--with-mcrypt=/usr/local/libmcrypt /
--with-gd=/usr/local/gd2 /
--with-freetype-dir=/usr/local/freetype2 /
--enable-gd-native-ttf /
--with-openssl /
--with-mhash=/usr/local/libmhash /
--enable-pcntl /
--enable-sockets /
--with-ldap /
--with-ldap-sasl /
--with-xmlrpc /
--enable-zip /
--enable-soap  /
--enable-ftp /
--enable-static /
--enable-maintainer-zts /
--enable-zend-multibyte /
--with-jpeg-dir=/usr/local/jpeg /
--with-png-dir=/usr /
--with-xpm-dir /
--with-dom /
--disable-ipv6 /
--without-sqlite /
--disable-debug

 

make ZEND_EXTRA_LIBS='-liconv' & make install

如果提示錯誤信息:error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory
安裝libiconv庫

./configure --enable-static=yes

拷貝lib/.libs/libiconv.so.2至/lib/lib64(或者ln -s)
/usr/local/lib/
/usr/lib

 

【2】平滑重啓nginx:

kill -HUP `cat /var/run/nginx/nginx.pid`(/path/to/nginx.pid)

發佈了51 篇原創文章 · 獲贊 3 · 訪問量 10萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章