1. Overview
Status View and monitoring, fault handling, system capacity expansion, data backup/recovery/Site migration
2. Status View and monitoring
(1). System Resource Consumption
123 |
系统负载和磁盘I /O 进程的总数,其中httpd进程数统计 TCP连接数,TIME_WAIT 等 |
(2). Operation of the servicecan users access
1 |
tail -f 查看apache访问日志与错误日志 |
View System Log/var/log/messages
View the server's connection to the MySQL database
3. Fault Handling
(1). PHP class Dynamic Web site
1234567891011121314 |
服务不能启动、运行中不响应用户请求…… a.apache 配置文件错误 b.动态模块lib PHP5_mod 未能正确编辑 c.网站根目录设置不正确 d.端口冲突 e.系统负载过高,资源耗尽 f.Apache 配置参数不合理 g.防火墙配置不正确 h.数据库故障 i.系统崩溃 j.文件系统损坏 k.磁盘分区耗尽 / /usr /var l.NFS失效 m.负载均衡下,Apache监听地址不是127.0.0.1 |
(2). JSP Type Web site
123 |
a.系统环境变量设置错误或没设置 b.Apache与Tomcat的网站根目录设置不一致 c.JSP 运行中一直不能释放内存 |
4. Problem handling (case 1)Apache Virtual Host does not have access to resolve
Method: Set Directory Permissions
5. Troubleshooting process (slow opening of Forum) (case 2)(1). Uptime--top-to-system load(2). VIM/ETC/PASSWD--View System account(3). Iptables-l----View firewall(4). mysql Client connection database
1 |
mysql> show processlist; |
(5). View the number of Apache connections
1 |
ps aux | grep httpd | grep - v grep | wc -l |
(6). View the number of connections to TCP and summarize
1 |
netstat -an | awk ‘/^tcp/ {++ S[$NF]} END {for (a in S) print a,S[a]}‘ |
(7). View Port Requests
1 |
netstat -anp | grep - v unix |
(8). Restart Apache
1 |
/usr/local/apache/bin/apachectl restart |
(9). Re-view the number of processes
1 |
ps aux | grep httpd | grep - v grep | wc -l |
(10). Modify the maximum number of Apache connections
123456789101112131415161718 |
<IfModule prefork.c>
StartServers 10
MinSpareServers 10
MaxSpareServers 15
ServerLimit 2000
MaxClients 1000
MaxRequestsPerChild 10000
<
/IfModule
>
<IfModule worker.c>
StartServers 3
MaxClients 2000
ServerLimit 25
MinSpareThreads 50
MaxSpareThreads 200
ThreadLimit 200
ThreadsPerChild 100
MaxRequestsPerChild 0
<
/IfModule
>
|
6.Mysql Fault (case 3)
12 |
mysql 客户端连接数据库 mysql> show processlist; |
Dynamic Site Maintenance Basic commands