nginx的一些鬼操作

 

ps -ef |grep redis检查后台进程是否正在运行

暂时关闭防火墙:# systemctl stop firewalld

排除nginx页面不能正常访问:
 https://blog.csdn.net/qq_29767317/article/details/78579800?locationNum=7&fps=1

 

1.linux下看有没有成功安装某xx: # rpm -qa|grep vsftpd(某xx)


2.l inux怎么开启端口参考:https://zhidao.baidu.com/question/391000457913903645.html
2.1 打开端口
    iptables -A INPUT -p tcp --dport 111 -j ACCEPT
2.2 开发不连续端口(包括单个):
iptables -A INPUT -p tcp -m multiport --dport 21,20 -j ACCEPT
2.3 #service iptables stop #关闭防火墙

2.4 检查当前开发的端口 #netstat -an
2.5 查找端口对应的服务 #lsof -i :631

 

 

·查看虚拟机ip:   # ifconfig

·centos7关闭防火墙:# systemctl stop firewalld


·在/nginx建logs文件夹:    # mkdir /usr/local/nginx/logs


·找到nginx可执行文件  :

 

[root@localhost sbin]# cd /usr/local/
[root@localhost local]# ll
总用量 0
drwxr-xr-x. 2 root root  6 11月  5 2016 bin
drwxr-xr-x. 2 root root  6 11月  5 2016 etc
drwxr-xr-x. 2 root root  6 11月  5 2016 games
drwxr-xr-x. 2 root root  6 11月  5 2016 include
drwxr-xr-x. 2 root root  6 11月  5 2016 lib
drwxr-xr-x. 2 root root  6 11月  5 2016 lib64
drwxr-xr-x. 2 root root  6 11月  5 2016 libexec
drwxr-xr-x. 5 root root 42 7月  12 01:12 nginx
drwxr-xr-x. 2 root root  6 11月  5 2016 sbin
drwxr-xr-x. 5 root root 49 7月  12 04:09 share
drwxr-xr-x. 2 root root  6 11月  5 2016 src
[root@localhost local]# cd nginx/
[root@localhost nginx]# ll
总用量 4
drwxr-xr-x. 2 root root 4096 7月  12 01:12 conf
drwxr-xr-x. 2 root root   40 7月  12 01:12 html
drwxr-xr-x. 2 root root   19 7月  12 01:12 sbin
[root@localhost nginx]# cd sbin/
[root@localhost sbin]# ll
总用量 3248
-rwxr-xr-x. 1 root root 3324560 7月  12 01:12 nginx

·启动nginx:   # ./nginx
·关闭nginx:   # ./nginx -s stop
·重新刷新nginx: # ./nginx -s reload

 

 

 

 

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值