linux nginx安装配置 nginx1.6.2

1.服务器安装nginx
  • 解压Nginx安装包到/usr/local/nginx的目录下
  • cd /usr/local/nginx
  • yum install -y pcre-devel
  • yum install -y zlib-devel
  • ./configure --prefix=/usr/local/nginx --conf-path=/usr/local/nginx/nginx.conf
  • make
  • make install
  • 配置防火墙80端口
  • 启动nginx
  • cd /usr/local/nginx/sbin
  • ./nginx (重启: ./nginx -s reload)
以上配置就完成啦~

你可能感兴趣的:(运维)