coverl 发表于 2018-11-16 10:42:17

Centos7.0安装Nginx1.8.1-ITATPRO出身

  Centos7.0安装Nginx1.8.1
  一、安装Nginx依赖包
  系统环境是Centos7.0
http://blog.51cto.com/e/u261/themes/default/images/spacer.gif
  #yum –y installpcre-devel
  #yum –y install openssl-devel
  #yum –y install gcc
  #./configure --prefix=/usr/local/nginx --with-http_ssl_module--with-http_spdy_module --with-http_stub_status_module --with-pcre
  注释:
  //--with-http_stub_status_module:支持nginx状态查询--with-http_ssl_module:支持https
  --with-http_spdy_module:支持google的spdy,想了解请百度spdy,这个必须有ssl的支持
  --with-pcre:为了支持rewrite重写功能,必须制定pcre
  1.gcc-----------------必不可少的
  2.zlib-----------------gzip需要
  3.openssl(包括openssl-devel)-----SSL支持需要
  4.pcre(包括pcre-devel)----让nginx支持正则表达式
  #make
  #make install
  2、启动服务
  #/usr/local/nginx-1.8.1/sbin/nginx
  注意:
  (1)客户机测试需把Nginx服务器防火墙关闭
  #service firewalld stop
  (2)如果修改配置文件则需要重新启动服务,

  #/usr/local/nginx-1.8.1/sbin/nginx –s>http://blog.51cto.com/e/u261/themes/default/images/spacer.gif

页: [1]
查看完整版本: Centos7.0安装Nginx1.8.1-ITATPRO出身