lnmp安装管理运行
############################################################################
lnmp安装步骤很简单
安装后
查看php nginx mysql 是否启动成功
ps aux | grep php
ps aux | grep nginx
ps aux | grep mysql
############################################################################
找到nginx.conf
whereis nginx.conf
重新将nginx.conf.default覆盖nginx.conf
cp conf/nginx.conf.default conf/nginx.conf
############################################################################
nginx.conf文件解读:
全局块
事件块
http块
server块
查看nginx是否启动
ps -ef|grep nginx
平滑停止进程
eg:nginx pid为3245
kill -QUIT 3245
查看某个端口是否存在
netstat -ano|grep 80
启动nginx服务器 两个方法:
service nginx restart
nginx -s reload
############################################################################
nginx 新增新端口,需要在防火墙也要开启指定端口,不然无法访问
/sbin/iptables -I INPUT -p tcp --dport 8088 -j ACCEPT 修改8088端口状态写入
/etc/init.d/iptables save 保存修改
service iptables restart 重启防火墙,修改生效
访问:
ip:8088即可访问
192.168.*.*:8088