centos7怎么安装nginx
发布网友
发布时间:2022-04-22 20:24
我来回答
共3个回答
懂视网
时间:2022-05-02 10:05
本文出自 “实践出真知” 博客,请务必保留此出处http://m51cto.blog.51cto.com/53087/1959151
centos7+php+nginx+mysql安装
标签:mysql nginx php
热心网友
时间:2022-05-02 07:13
安装环境为:最小化安装的centos7,关闭seliunx。
最小化安装centos:
关闭selinux
sed –i ‘s/SELINUX=enforcing/SELINUX=disabled/g’ /etc/selinux/config
开始安装nginx1.7.8
创建群组
groupadd www
创建一个用户,不允许登陆和不创主目录
useradd -s /sbin/nologin -g www -M www
#下载最新版nginx
wget -C
tar zxvf nginx-1.7.8.tar.gz
#编译基本能运行的nginx
./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_mole --with-http_ssl_mole --with-http_gzip_static_mole
make
make install
如果有错误提示:
./configure: error: C compiler cc is not found
解决方法:
yum install gcc gcc-c++
如果有错误提示:
./configure: error: the HTTP rewrite mole requires the PCRE library.
You can either disable the mole by using –without-http_rewrite_mole
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using –with-pcre=<path> option.
解决方法:
yum install pcre-devel
如果有错误提示:
./configure: error: SSL moles require the OpenSSL library.
热心网友
时间:2022-05-02 08:31
谜底是刨笔机