Nginx了解

特点

Nginx安装

1)安装Nginx

apt-get install -y build-essential libssl-dev libtool libpcre3 libpcre3-dev make openssl zlib1g-dev
apt-get install nginx -y

2)检查效果

netstat -tnulp | grep nginx

3)服务相关命令

# 启动停止
systemctl start|stop|reload|... nginx
/etc/init.d/nginx start|stop|reload|...
/usr/sbin/nginx ... -s stop|reload

# 查看信息
nginx -V
nginx -v

# 检查配置文件
nginx -t                 # 检查默认配置文件
nginx -t -c file.conf    # 指定配置文件进行检查

4)移除相关命令

# 查看和nginx相关软件
dpkg --get-selections|grep nginx

# 移除nginx,包括相关文件
apt-get --purge remove nginx
apt-get --purge remove nginx-common
apt-get --purge remove nginx-core

猜你喜欢

转载自www.cnblogs.com/oklizz/p/11336132.html