centOS 6.5 安装Nginx
安装前准备
yum install gcc-c++ yum install -y pcre pcre-devel yum install -y zlib zlib-devel yum install -y openssl openssl-devel
下载nginx并解压
下载地址:https://nginx.org/download/nginx-1.10.2.tar.gz
tar -zxvf nginx-1.10.2.tar.gz
使用默认配置
cd /nginx-1.10.2 ./configure
编译和安装
make make install
查找安装位置
whereis nginx
启动、停止nginx
cd /usr/local/nginx/sbin/ ./nginx ./nginx -s stop ./nginx -s quit ./nginx -s reload ./nginx -s quit:此方式停止步骤是待nginx进程处理任务完毕进行停止。 ./nginx -s stop:此方式相当于先查出nginx进程id再使用kill命令强制杀掉进程。
设置开机自启动 vi /etc/rc.local 增加一行 /usr/local/nginx/sbin/nginx chmod 755 rc.local
相关推荐
张立军的架构之路 2020-09-28
yongzhang 2020-07-19
nginxs 2020-11-14
Guanjs0 2020-11-13
小木兮子 2020-11-11
yserver 2020-11-11
ssihc0 2020-11-11
windle 2020-11-10
HanksWang 2020-11-10
liuchen0 2020-11-10
Freshairx 2020-11-10
ccschan 2020-11-10
liwf 2020-11-10
Guanjs0 2020-11-09
AderStep 2020-11-09
zrtlin 2020-11-09