linux下nginx的安装
官网:https://github.com/nginx/nginx
下载地址:
http://nginx.org/en/download.html
安装依赖
-
yum install gcc
-
yum install pcre-devel
-
yum install zlib zlib-devel
-
yum install openssl openssl-devel
-
//一键安装上面四个依赖 yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel
- 下载nginx的tar包
-
//创建一个文件夹 cd /usr/local mkdir nginx cd nginx //下载tar包 wget http://nginx.org/download/nginx-1.13.7.tar.gz
tar -xvf nginx-1.13.7.tar.g
-
- 安装nginx
-
//进入nginx目录 cd /usr/local/nginx //执行命令 ./configure
-
//执行make命令 make //执行make install命令 make install
-
ng启动:
nginx -c /usr/local/nginx/conf/nginx.conf
重启:
[root@localhost nginx]# nginx -s reload
停止:
nginx -s stop
1、查看进程号
[root@LinuxServer ~]# ps -ef|grep nginx
2、杀死进程
[root@LinuxServer ~]# kill -QUIT 2072
3,强制停止
[root@LinuxServer ~]# pkill -9 nginx
好记性不如烂笔头

浙公网安备 33010602011771号