nginx配置說明

依賴

zlib,pcre,   ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ 

openssl     http://www.openssl.org/source/ 

./configure --prefix=/usr/local/nginx--with-openssl=/usr/include (啓用ssl)--with-pcre=/usr/include/pcre/ (啓用正規表達式)--with-http_stub_status_module (安裝可以查看nginx狀態的程序)--with-http_memcached_module (啓用memcache緩存)--with-http_rewrite_module (啓用支持url重寫) 

php 

依賴

libiconv, http://ftp.gnu.org/pub/gnu/libiconv/ 

libmcrypt, http://sourceforge.net/projects/libmcrypt/ 

libltdl, http://www.gnu.org/s/automake/manual/libtool/Using-libltdl.html 

mhash, http://sourceforge.net/projects/mhash/ 

mcrypt,libxml2,http://xmlsoft.org/downloads.html 

zlib,libpng, http://www.libpng.org/pub/png/libpng.html 

jpeg6,  http://www.ijg.org/ 

freetype, http://freetype.sourceforge.net/download.html#stable 

gd,  https://bitbucket.org/pierrejoye/gd-libgd/overview 

curl, http://curl.haxx.se/download.htmllibtool-ltdl 


#ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config#export LD_LIBRARY_PATH=/usr/local/lib: LD_LIBRARY_PATH#LD_LIBRARY_PATH=/usr/local/lib

 ./configure 

./configure --prefix=/usr/local/php --with-mysql --with-mysqli --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --enable-xml --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --enable-zip --enable-soap --enable-calendar --with-dom 


vi Makefile找到下面這行:EXTRA_LIBS = -lcrypt ...在最後添加-liconv保存後make通過;

make install


通過直接yum 

163源 

cd /etc/yum.repos.d/ 

wget http://mirrors.163.com/.help/CentOS-Base-163.repo 

yum makecache  //生成緩存 

yum update

 搜狐源 http://mirrors.sohu.com/help/CentOS-Base-sohu.repo yum源   /etc/yum.repos.d 

上海交通大學:http://ftp.sjtu.edu.cn/centos/ 

清華大學:http://mirror.lib.tsinghua.edu.cn/centos/ 

中國科技大學:http://centos.ustc.edu.cn/centos/    (推薦,比較快) 

上海電信:http://mirrors.shlug.org/centos/ 

山東電信:http://mirrors.ta139.com/centos/ 

福建電信:http://mirror.be10.com/centos/ 


安裝 

yum -y install nginx 

yum -y install mysql mysql-server mysql-devel 

yum -y install php-fpm php-cli php-devel php-mysql php-gd php-imap php-ldap php-xml php-xmlrpc php-mbstring php-mcrypt php-snmp php-soap 

 配置

 vim /etc/php-fpm.conf 

vim /etc/php.ini 

vim /etc/my.cnf 

vim /etc/nginx/nginx.conf 

 開啓服務

service mysql start 

service nginx start 

service php-fpm start 

 開機啓動 

chkconfig mysqld on 

chkconfig nginx on 

chkconfig php-fpm on

', '

依賴

zlib,pcre,   ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/ 

openssl     http://www.openssl.org/source/ 

./configure --prefix=/usr/local/nginx--with-openssl=/usr/include (啓用ssl)--with-pcre=/usr/include/pcre/ (啓用正規表達式)--with-http_stub_status_module (安裝可以查看nginx狀態的程序)--with-http_memcached_module (啓用memcache緩存)--with-http_rewrite_module (啓用支持url重寫) 

php 

依賴

libiconv, http://ftp.gnu.org/pub/gnu/libiconv/ 

libmcrypt, http://sourceforge.net/projects/libmcrypt/ 

libltdl, http://www.gnu.org/s/automake/manual/libtool/Using-libltdl.html 

mhash, http://sourceforge.net/projects/mhash/ 

mcrypt,libxml2,http://xmlsoft.org/downloads.html 

zlib,libpng, http://www.libpng.org/pub/png/libpng.html 

jpeg6,  http://www.ijg.org/ 

freetype, http://freetype.sourceforge.net/download.html#stable 

gd,  https://bitbucket.org/pierrejoye/gd-libgd/overview 

curl, http://curl.haxx.se/download.htmllibtool-ltdl 


#ln -s /usr/local/bin/libmcrypt-config /usr/bin/libmcrypt-config#export LD_LIBRARY_PATH=/usr/local/lib: LD_LIBRARY_PATH#LD_LIBRARY_PATH=/usr/local/lib

 ./configure 

./configure --prefix=/usr/local/php --with-mysql --with-mysqli --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --enable-xml --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --enable-zip --enable-soap --enable-calendar --with-dom 


vi Makefile找到下面這行:EXTRA_LIBS = -lcrypt ...在最後添加-liconv保存後make通過;

make install


通過直接yum 

163源 

cd /etc/yum.repos.d/ 

wget http://mirrors.163.com/.help/CentOS-Base-163.repo 

yum makecache  //生成緩存 

yum update

 搜狐源 http://mirrors.sohu.com/help/CentOS-Base-sohu.repo yum源   /etc/yum.repos.d 

上海交通大學:http://ftp.sjtu.edu.cn/centos/ 

清華大學:http://mirror.lib.tsinghua.edu.cn/centos/ 

中國科技大學:http://centos.ustc.edu.cn/centos/    (推薦,比較快) 

上海電信:http://mirrors.shlug.org/centos/ 

山東電信:http://mirrors.ta139.com/centos/ 

福建電信:http://mirror.be10.com/centos/ 


安裝 

yum -y install nginx 

yum -y install mysql mysql-server mysql-devel 

yum -y install php-fpm php-cli php-devel php-mysql php-gd php-imap php-ldap php-xml php-xmlrpc php-mbstring php-mcrypt php-snmp php-soap 

 配置

 vim /etc/php-fpm.conf 

vim /etc/php.ini 

vim /etc/my.cnf 

vim /etc/nginx/nginx.conf 

 開啓服務

service mysql start 

service nginx start 

service php-fpm start 

 開機啓動 

chkconfig mysqld on 

chkconfig nginx on 

chkconfig php-fpm on

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