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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值