1) 重啟後生效 開啟: chkconfig iptables on 關閉: chkconfig iptables off 2) 即時生效,重啟後失效 開啟: service iptables start 關閉: service iptables stop 需要說明的是對於Linux下的其它服務都可以用以上命令執行開啟和關閉操作。 在開啟了防火牆時,做如下設定,開啟相關連接埠, 修改/etc/sysconfig/iptables 檔案,添加以下內容: -A
今天下午網站宕了兩次機,發工單給阿里雲,發現原因是伺服器的CPU 100%了。重啟伺服器後,使用 top 命令看看是哪些進程消耗那麼大的 CPU 使用。盯了有好十幾分鐘,主要消耗 CPU 的進程有兩個,一個是 mysql,另一個是 apache。下面的圖可以看到,mysql 佔用了很大部分的 CPU 使用。apache 單個進程雖然佔得不多,但有不少個 apache 進程同時存在,也消耗了不少 CPU 的使用。當然,這些不足以讓伺服器的 CPU 直接跑滿掛掉,後來發現了兩個大傢伙:當
在Linux的top和ps命令中,預設看到最多的是pid (process ID),也許你也能看到lwp (thread ID)和tgid (thread group ID for the thread group leader)等等,而在Linux庫函數和系統調用裡也許你注意到了pthread id和tid等等。還有更多的ID,比如pgrp (process group ID), sid (session ID for the session leader)和 tpgid
A symbolic link, also termed a soft link, is a special kind of file that points to another file, much like a shortcut in Windows or a Macintosh alias. Unlike a hard link, a symbolic link does not contain the data in the target file. It simply
*** is not in the sudoers file. This incident will be reported.” (使用者不在sudoers檔案中……)處理這個問題很簡單,但應該先理解其原理再操作首先要明白root的密碼一般使用者是不應改知道的,但一般使用者有時可能要用到root的一些許可權。這裡就有了一個 /etc/sudoers