centos7yum安装nginx yum安装nginx
小源今天给分享centos7yum安装nginx的知识,其中也会对yum安装nginx进行解释,希望能解决你的问题,请看下面的文章阅读吧!
1、安装环境为:小化安装的centos7,关闭seliunx。
2、小化安装centos:关闭selinuxsed –i ‘s/SELINUX=enforcing/SELINUX=disabled/g’ /etc/selinux/config开始安装nginx1.7.8创建群组groupadd www创建一个用户,不允许登陆和不创主目录useradd -s /in/nologin -g www -M www#下载新版nginxwget -Ctar zxvf nginx-1.7.8.tar.gz#编译基本能运行的nginx./configure --user=www --group=www --prefix=/usr/local/nginx --with-_stub_status_module --with-_ssl_module --with-_gzip_static_modulemakemake install如果有错误提示:./configure: error: C compiler cc is not found解决方法:yum install gcc gcc-c++如果有错误提示:./configure: error: the HTTP rewrite module requires the PCRE library.You can either disable the module by using –without-_rewrite_moduleoption, or install the PCRE library into the , or build the PCRE librarystatically from the source with nginx by using –with-pcre= option.解决方法:yum install pcre-dl如果有错误提示:./configure: error: SSL modules require the OpenSSL library.谜底是刨笔机。
本文到这结束,希望上面文章对大家有所帮助。
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系 836084111@qq.com 删除。