血的教训---工做中注意的事项(未完)

                                   工做中注意的事项node



一、 千万不要执行:yum -y remove python 或者 rpm -e python --nodepspython

       由于yum是使用python编写的,若是把python卸载了,则yum将不能再继续使用了mysql

       若是想本身编译安装新版本的python,也千万不要卸载掉centos自带的python,不用管它就好sql




二、 千万不要执行:iptables -Fcentos

       由于若是你的filter表中的INPUT链默认的规则是全部的请求都拒绝的话,就完了app

       [root@scj ~]# iptables -Lssh

       Chain INPUT (policy DROP)socket

       target     prot opt source               destination         tcp

       ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssh ide

       ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:http 

       ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:zabbix-trapper 

       ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:zabbix-agent 


       Chain FORWARD (policy ACCEPT)

       target     prot opt source               destination         


       Chain OUTPUT (policy ACCEPT)

       target     prot opt source               destination         

       ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:zabbix-agent

       如上:若是是INPUT (policy DROP),当咱们执行iptables -F,清空全部的规则后,默认INPUT链全部请求都拒绝的,因此22端口也会被拒绝,就没法远程登陆了

       正确作法先iptables -L,若不是DROP再iptables -F;如果先执行iptables -P INPUT ACCEPT,再iptables -F清空





三、 修改配置文件里pid进程文件相关,socket文件相关的参数时,必定要记得先把服务stop掉

    尤为对于mysql服务,在my.cnf配置文件里修改pid-file参数的值时,必定要先把mysql服务stop掉,再去修改配置文件里参数的值

相关文章
相关标签/搜索