您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

centos7 安装nginx

2024/12/9 20:33:34发布18次查看
安装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
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教程有兴趣的朋友有所帮助。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product