ArticleDirectory
- Change Password
- Add IP addresses to the NIC
- Restart
- Apache
Change Password
Passwd Root
Add IP addresses to the NIC
Ifconfig eth0: 1 184.82.167.219 netmask 255.255.255.255.248Ifconfig eth0:2 184.82.167.220 netmask 255.255.255.248
Restart
Rebotshutdown-R now#Restart immediately (used by the root user)Shutdown-R 10#Restart automatically in 10 minutes (used by root users)Shutdown-r 20:35#Restart at (for root users)
If you use the shutdown command to set the restart, you can use the shutdown-C command to cancel the restart.
Shutdown
Halt#Shut down immediatelyPoweroff#Shut down immediatelyShutdown-H now#Shut down immediately (used by root users)Shutdown-H 10#Automatically shut down in 10 minutes
Apache
Service httpd startapachectl-Vapachectl startapachectl stopapachectl restart
/Etc/httpd/CONF/extra
/Var/log/httpd/
Tail/etc/httpd/logs/ Access_logtail -F /Etc/httpd/logs/ Access_logcat /Etc/httpd/logs/access_log | awk '{print $1 } '| Sort | uniq-c | sort-Nr | Lesscat /Etc/httpd/logs/access_log | grep '02/APR/100' | awk '{print $1 } '| Sort | uniq-c | sort-Nr | Less Netstat -N | grep TCP | WC- Lnetstat -N | grep UDP | WC- LPS -Aux | grep httpd | WC- LPS -Ef | grep httpd | WC- Lnetstat -N | awk '/^ TCP/{++ s [ $ NF ]}End { For ( In S) print a, s [a]}'
At the same time, a command is found during data query:
Netstat-N | awk '/^ TCP/{++ s [$ NF]} end {for (a in S) print a, s [a]}'
The returned results of this statement are as follows:
Last_ack 5syn_recv 30 established 1597fin_wait1 51fin_wait2 504time_wait 1057
Syn_recv indicates the number of requests waiting for processing, established indicates the normal data transmission status, and time_wait indicates the number of requests waiting for timeout. The returned result is very concise and straightforward, that is, the sentence is a little long -_-
Disable IP Access
Rewritecond % {http_host }!^ Www.abc.com [Nc] rewritecond% {Http_host }!^ Abc.com [Nc] rewriterule (.*) Http: // 127.0.0.1 [R = 301, l]
MySQL
Start/etc/rc. d/init. d/mysqld start
Restart/etc/rc. d/init. d/mysqld restart
Stop/etc/rc. d/init. d/mysqld stop
Service mysqld start
Netstat-N | grep 'mysql. Sock '| WC-L