CentOS7.5下安装nginx –项目部署

1、安装ngnix一些依赖包

[root@VM_39_157_centos ~]# yum -y install gcc gcc-c++ openssl-devel pcre-devel httpd-tools

2、下载nginx-1.16.0

[root@VM_39_157_centos ~]# wget http://nginx.org/download/nginx-1.16.0.tar.gz

3、解压二进制包

[root@VM_39_157_centos ~]# tar -zxf nginx-1.16.0.tar.gz

4、执行配置文件,指定需要的模块

[root@VM_39_157_centos nginx-1.14.0]# useradd nginx

[root@VM_39_157_centos nginx-1.14.0]# ./configure --prefix=/usr/local/nginx --user=nginx --group=nginx --with-http_ssl_module --with-http_mp4_module --with-http_flv_module

5、执行编译和安装

[root@VM_39_157_centos nginx-1.14.0]# make && make install

6、建立软链接

ln -s /usr/local/nginx/sbin/nginx /usr/sbin

7、启动nginx

[root@VM_39_157_centos ~]# nginx

8、查看nginx占用的端口

[root@VM_39_157_centos ~]# netstat -anptu | grep nginx

9、关闭nginx

[root@instance-mtfsf05r nginx-1.16.0]# nginx -s stop

10、查看nginx日版本

[root@instance-mtfsf05r nginx-1.16.0]# nginx -v

 

 

原文链接: https://www.cnblogs.com/qikeyishu/p/10601138.html

欢迎关注

微信关注下方公众号,第一时间获取干货硬货;公众号内回复【pdf】免费获取数百本计算机经典书籍

    CentOS7.5下安装nginx --项目部署

原创文章受到原创版权保护。转载请注明出处:https://www.ccppcoding.com/archives/295188

非原创文章文中已经注明原地址,如有侵权,联系删除

关注公众号【高性能架构探索】,第一时间获取最新文章

转载文章受原作者版权保护。转载请注明原作者出处!

(0)
上一篇 2023年2月15日 下午4:39
下一篇 2023年2月15日 下午4:39

相关推荐