centos7 安装nginx
程序员文章站
2022-06-02 13:28:35
...
安装nginx
下载安装包
http://nginx.org/en/download.html 下载最新的 nginx-1.9.6.tar.gz
放入 centos 7 /usr/local 中
解压 tar -zxvf nginx-1.9.6.tar.gz
创建nginx目录 mkdir /usr/local/nginx
进入解压目录 cd /usr/local/nginx-1.9.6
安装nginx
接下来安装,使用--prefix参数指定nginx安装的目录,make、make install安装
./configure $默认安装在/usr/local/nginx
如果有错误提示:./configure: error: the HTTP cache module requires md5 functions
from OpenSSL library. You can either disable the module by using
--without-http-cache option, or install the OpenSSL library into the system,
or build the OpenSSL library statically from the source with nginx by using
--with-http_ssl_module --with-openssl= options.
解决办法:
yum -y install pcre-devel openssl openssl-devel
./configure --prefix=/usr/local/nginx
继续安装
make
下载安装包
http://nginx.org/en/download.html 下载最新的 nginx-1.9.6.tar.gz
放入 centos 7 /usr/local 中
解压 tar -zxvf nginx-1.9.6.tar.gz
创建nginx目录 mkdir /usr/local/nginx
进入解压目录 cd /usr/local/nginx-1.9.6
安装nginx
接下来安装,使用--prefix参数指定nginx安装的目录,make、make install安装
./configure $默认安装在/usr/local/nginx
如果有错误提示:./configure: error: the HTTP cache module requires md5 functions
from OpenSSL library. You can either disable the module by using
--without-http-cache option, or install the OpenSSL library into the system,
or build the OpenSSL library statically from the source with nginx by using
--with-http_ssl_module --with-openssl=
解决办法:
yum -y install pcre-devel openssl openssl-devel
./configure --prefix=/usr/local/nginx
继续安装
make
make install
nginx的启动命令是:
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
重启
/usr/local/nginx/sbin/nginx -s reload
以上就介绍了centos7 安装nginx,包括了require方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
上一篇: 有关在Vue2.x中父组件与子组件双向绑定(详细教程)
下一篇: php解压缩zip文件实例代码
推荐阅读