1、解压
tar -zxvf Nginx.tar.gz
2、进入解压后的文件
cd Nginx
可能会有报错:
./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with Nginx by using --with-zlib=path option.
yum安装依赖yum -y install make zlib zlib-devel gcc-c++ libtool openssl openssl-devel
4、执行make
命令
5、执行make install
命令
make PREFIX=[路径] install
可以指定安装位置
6、执行whereis Nginx
命令
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。