nginx安装依赖包

nginx安装依赖包,第1张

nginx安装依赖包

nginx安装依赖包

(推荐学习:nginx教程)

  • nginx安装依赖GCC、openssl-devel、pcre-devel和zlib-devel软件库。

  • Pcre全称(Perl Compatible Regular Expressions),中文perl兼容正则表达式,pcre官方站点。

yum install  pcre pcre-devel -y 
yum install openssl openssl-devel -y

编译命令

tar -zxf nginx-1.10.1.tar.gz 
cd nginx-1.10.1/
./configure --prefix=/data/nginx-1.10.1 --user=nginx --group=nginx  --with-http_ssl_module  --with-http_stub_status_module

useradd nginx -M -s /sbin/nologin 
make && make install 
ln -s /data/nginx-1.10.1 /data/nginx

测试nginx配置文件是否正常

/data/nginx/sbin/nginx -t 
nginx: the configuration file /data/nginx-1.10.1/conf/nginx.conf syntax is ok
nginx: configuration file /data/nginx-1.10.1/conf/nginx.conf test is successful

启动nginx服务器

/data/nginx/sbin/nginx  -t  ##检查配置文件
/data/nginx/sbin/nginx      ##确定nginx服务
netstat -lntup |grep nginx      ## 检查进程是否正常
curl http://localhost           ## 确认结果

以上就是nginx安装依赖包的详细内容,

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/707841.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-24
下一篇 2022-04-24

发表评论

登录后才能评论

评论列表(0条)

保存