系统相关
首页 > 系统相关> > centos7安装nginx

centos7安装nginx

作者:互联网

1、解压

tar -zxvf nginx.tar.gz

2、进入解压后的文件

cd nginx

3、执行configure文件./configure

可能会有报错:

./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命令

标签:configure,make,zlib,module,centos7,nginx,install,安装
来源: https://www.cnblogs.com/special1104/p/16603408.html