Apache 服务起步不了
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><strong style="color: blue;">{我是新手,从未遇到此问题,请各位大大勿喷}</strong></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">事由:今天早上上班<span style="color: black;">忽然</span><span style="color: black;">发掘</span><span style="color: black;">机构</span>网站<span style="color: black;">显现</span>问题。经过排查,<span style="color: black;">发掘</span>是Apache<span style="color: black;">显现</span>问题。<span style="color: black;">首要</span><span style="color: black;">检测</span>配置文件<span style="color: black;">无</span>出问题后,<span style="color: black;">起步</span>服务<span style="color: black;">发掘</span>Apache服务能<span style="color: black;">起步</span>,<span style="color: black;">然则</span>没法关闭,没法重启。这是什么<span style="color: black;">原由</span>呢?</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">处理</span>办法:(<span style="color: black;">显现</span>任何问题<span style="color: black;">首要</span><span style="color: black;">想要</span>到的<span style="color: black;">便是</span>日志)</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">查看httpd日志:</p>tail -f /var/log/httpd/error_log<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">果然,<span style="color: black;">表示</span>了以下报错:</p> suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
Digest: generating secret for digest authentication ...<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">既然找到问题了,那<span style="color: black;">咱们</span>就来<span style="color: black;">处理</span>呗!</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">关键字:suEXEC</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">处理</span>办法:</p>输入:ipcs -s 看有<span style="color: black;">无</span>超过5个
这命令是<span style="color: black;">表示</span>信号量集的,什么是信号量集呢?
哈哈 我<span style="color: black;">亦</span>解释不清楚,自己百度吧<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">而后</span><span style="color: black;">表示</span>以下结果:</p>------ Semaphore Arrays --------
key semid owner perms nsems
0x00000000 0 root 600 1
0x00000000 32769 root 600 1
0x00000000 3604482 4294967295 600 1
0x00000000 3637251 4294967295 600 1
0x00000000 4784132 4294967295 600 1
0x00000000 4816901 4294967295 600 1
0x00000000 1048582 4294967295 600 1
0x00000000 229383 4294967295 600 1
0x00000000 262152 4294967295 600 1
0x00000000 491529 4294967295 600 1
0x00000000 524298 4294967295 600 1
0x00000000 557067 4294967295 600 1
0x00000000 589836 4294967295 600 1
0x00000000 1081357 4294967295 600 1
0x00000000 1114126 4294967295 600 1
0x00000000 1146895 4294967295 600 1
0x00000000 1245200 4294967295 600 1
0x00000000 1277969 4294967295 600 1
0x00000000 1638418 4294967295 600 1<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">执行后,<span style="color: black;">表示</span>结果把我看懵了,怎么会这么多?</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">哎 那就<span style="color: black;">处理</span>呗!</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">运用</span>以下命令:</p>ipcs -s | grep apache | perl -e while (<STDIN>) { @a=split(/\s+/); print `ipcrm sem $a`}<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">而后</span>再重启Apache服务就<span style="color: black;">处理</span>了。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">以下是ipcs参数的详解与用法:(自己用请勿喷)</p>ipcs可用来<span style="color: black;">表示</span>当前Linux系统中的共享内存段、信号量集、<span style="color: black;">信息</span>队列等的<span style="color: black;">运用</span><span style="color: black;">状况</span>。
命令示例:
ipcs -a或ipc <span style="color: black;">表示</span>当前系统中共享内存段、信号量集、<span style="color: black;">信息</span>队列的<span style="color: black;">运用</span><span style="color: black;">状况</span>;
ipcs -m <span style="color: black;">表示</span>共享内存段的<span style="color: black;">运用</span><span style="color: black;">状况</span>;
ipcs -s <span style="color: black;">表示</span>信号量集的<span style="color: black;">运用</span><span style="color: black;">状况</span>;
ipcs -q <span style="color: black;">表示</span><span style="color: black;">信息</span>队列的<span style="color: black;">运用</span><span style="color: black;">状况</span>;
ipcrm可用来删除对应的共享内存段、信号量、<span style="color: black;">信息</span>队列;
命令示例:
ipcrm -s semid 删除对应的信号量集
ipcrm -m shmid 删除对应的共享内存段
ipcrm -q msqid 删除对应的<span style="color: black;">信息</span>队列
ipcrm本身只能实现单个资源的删除,利用以下命令可实现批量删除(zhangsj版权所有,呵呵):
1.ipcs -s|grep 用户名|cut -d" " -f2|xargs -n1 ipcrm -s
2.ipcs -s|awk /用户名/{print $2}|xargs -n1 ipcrm -s
3.ipcs -s|awk /用户名/{system("ipcrm -s "$2)}
4.for i in echo `ipcs|grep 用户名|cut -d" " -f2`; do ipcrm -s $i; done
在遇到你之前,我对人世间是否有真正的圣人是怀疑的。 顶楼主,说得太好了!
页:
[1]