使用sz -be 把nginx-1.9.9.tar.gz上传到服务器
使用tar zxvf nginx-1.9.9.tar.gz 解压安装
cd nginx-1.9.9 进入目录
执行 ./configure && make && make install
执行完这个报错了
/configure: error: the HTTP rewrite module requires the PCRE library. 等
然后执行了这一句
yum -y install pcre-devel
安装pcre-devel解决问题
执行./configure && make && make install 接着又报错
./configure: error: the HTTP gzip module requires the zlib library. You can either disable the 等
执行yum -y install openssl openssl-devel
安装openssl openssl-devel解决问题
继续执行 ./configure && make && make install
这时安装成功了
我放在user/local目录,安装成功后多了一个目录/user/local/nignx/
执行 /usr/local/nginx/sbin/nginx 启动nginx
安装完成了
备注
启动 /usr/local/nginx/sbin/nginx
停止/重启 /usr/local/nginx/sbin/nginx -s stop(quit、reload)
配置文件 vi nginx.conf