血的教訓---工做中注意的事項(未完)

                                   工做中注意的事項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掉,再去修改配置文件裏參數的值

相關文章
相關標籤/搜索