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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值