下载地址:http://nginx.org/download/1.进入文件夹cd/usr/local/src2.下载wgethttp://nginx.org/download/nginx-1.6.2.tar.gz3、安装依赖如果“需要安装”教程中没有安装,请执行下面这句yum-yinstallgcczlibzlib-develpcre-developensslopenssl-devel4、解决方法压缩tar-zxvfnginx-1.6.2.tar.gz5.进入解压后的文件夹cdnginx-1.6.2/6.执行配置文件./configure--prefix=/usr/local/nginx--with-http_stub_status_module--with-http_ssl_module--with-http_realip_module7.编译安装(默认安装在/usr/local/nginx中)如果提示如下语句。是否安装了“需要安装”一文中的依赖?然后执行./configure//make:***Notargetspecifiedandmakefilenotfound。停止。下面执行make,执行安装命令make&&makeinstall八、命令安装程序的位置在/usr/local/nginx目录下,也就是说启动服务器的配置文件也在里面/usr/local/nginx/sbin/nginxreload配置文件/usr/local/nginx/sbin/nginx-sreload重启Nginx/usr/local/nginx/sbin/nginx-sreopen停止Nginx/usr/local/nginx/sbin/nginx-s站【原文地址】:https://lolku.cn/web/details/posts/37
