小编Kha*_*led的帖子

尽管有 maxclient 和其他限制,apache 还是产生了太多进程

这是我的 MPM 约束:

<IfModule mpm_prefork_module>
    StartServers         10
    MinSpareServers      10
    MaxSpareServers      10
    MaxClients           10
    MaxRequestsPerChild  2000
</IfModule>
Run Code Online (Sandbox Code Playgroud)

然而尽管如此,我目前有 20 多个 apache 进程在运行,在过去一两个小时内,有多达 40-50 个。MaxClient 和 MaxSpareServers 不应该控制进程数(即大约 10 个)吗?

有什么我想念的吗?

configuration apache-2.2

5
推荐指数
1
解决办法
8871
查看次数

如何排除 /etc/logrotate.d/ 下的服务以与主 logrotate 作业一起运行

我在 logrotate.d 下有一个文件,我不想在主 logrotate 运行时运行该文件。我为此创建了一个单独的工作/etc/crontab

45 23   * * *   root    mv /var/log/RemoteSystems/*/*.log /var/log/Archiv/ && logrotate /etc/logrotate.d/test  
Run Code Online (Sandbox Code Playgroud)

该作业会将文件从一个目录移动到另一个目录,然后应用 logrotate。我希望这项工作与/etc/crontab. 问题是,因为“测试”在 下/etc/logrotate.d/,它将使用主 logrotate 再次运行。我可以在 logrotate.conf 中插入任何可以排除“测试”运行的命令吗?我知道如果我有“测试”文件/etc/logrotate.d,这不会发生,但我想让“测试”保持在同一路径。

linux logrotate cron exclude

5
推荐指数
2
解决办法
4182
查看次数

尝试在 ubuntu 上重新启动网络时出现错误“SIOCADDRT:文件存在”

错误/标准输出

 /etc/init.d/networking restart
 * 重新配置网络接口...
SIOCADDRT:文件存在
无法启动 eth0。
   ...完毕。
netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.0.1.0        0.0.0.0         255.255.255.0   U         0 0          0 eth0
0.0.0.0         10.0.1.1        0.0.0.0         UG        0 0          0 eth0
0.0.0.0         10.0.1.1        0.0.0.0         UG        0 0          0 eth0


ip route list
10.0.1.0/24 dev eth0  proto kernel  scope link  src 10.0.1.14  metric 1 
default via 10.0.1.1 dev eth0  proto static 
default via 10.0.1.1 dev eth0  metric 100 


/etc/network# more interfaces 
auto eth0 …
Run Code Online (Sandbox Code Playgroud)

ubuntu ip net

4
推荐指数
1
解决办法
2万
查看次数

Ping 主机名在输出中返回另一个主机名:这是什么意思?

当我 ping 服务器 sip3.voip-centrex.net 时,我得到以下输出:

PING sip3.voip-centrex.net (194.98.81.144) 56(84) bytes of data.
64 bytes from mpfrrelay.michaelpage.fr (194.98.81.144): icmp_req=1 ttl=50 time=35.7 ms
64 bytes from mpfrrelay.michaelpage.fr (194.98.81.144): icmp_req=2 ttl=50 time=38.1 ms
64 bytes from mpfrrelay.michaelpage.fr (194.98.81.144): icmp_req=3 ttl=50 time=34.6 ms
Run Code Online (Sandbox Code Playgroud)

域名不匹配。这是什么意思 ?

networking domain-name-system ping reverse-dns

4
推荐指数
1
解决办法
2674
查看次数

ZFS 和绿色驱动器/TLER

我正在建立一个基于 freenas 和 ZFS 的 NAS 盒。

我读过很多职位(这样的一个关于“)深回收使用RAID-5时,”绿色驱动器。

ZFS(vs Raid-5)是否意味着这个问题会消失,或者我仍然应该查看红色或黑色驱动器以放入我的 NAS?

raid network-attached-storage hard-drive

4
推荐指数
1
解决办法
5561
查看次数

iptables 的 PF 与 -m

如您所知,iptables 具有-m (match)例如:

-m string 
-m state 
-m -iplimit 
and so on...
Run Code Online (Sandbox Code Playgroud)

我的问题:是否PF也有类似的功能,如-miptables

iptables pf

4
推荐指数
1
解决办法
504
查看次数

在 Ubuntu 10.10 上设置 PostGIS

我遵循了本手册:http : //www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/ 我使用 aptitude 安装:

postgis
postgresql-8.4-postgis
Run Code Online (Sandbox Code Playgroud)

但是 .sql 文件中没有脚本 lwpostgis.sql /usr/share/postgresql-8.4-postgis/

postgresql ubuntu postgis

3
推荐指数
1
解决办法
1583
查看次数

在 shell 脚本中使用 sed 替换文件中的 IP 地址

我有一个脚本,它在文件中找到一个字符串并将其替换为一个新字符串。

$ sed -i 's/$old_string'/'$new_string'/g' $FILENAME
Run Code Online (Sandbox Code Playgroud)

现在我需要条件是一个正则表达式,它还检查旧字符串后面是否有除数字以外的任何内容。

我试过这个,但没有用:

$ sed -i -r 's/$old_string(^[0-9])+/$new_string/g' $FILENAME
Run Code Online (Sandbox Code Playgroud)

任何的想法?

linux shell centos sed regular-expressions

3
推荐指数
1
解决办法
2万
查看次数

yum 在我使用 el6 时尝试安装 el5

当我运行以下 yum 命令时,出现此错误:

Package: git-1.7.10.1-1.el5.rf.x86_64 (rpmforge)
           Requires: libcurl.so.3()(64bit)"
Run Code Online (Sandbox Code Playgroud)

我读到这个错误是由于运行 el5 rpmforge 或安装了一些 el5 软件包。

我怎么解决这个问题?

$ yum install git
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.kiewel-online.ch
 * epel: fedora.kiewel-online.ch
 * extras: centos.kiewel-online.ch
 * rpmforge: mirror.de.leaseweb.net
 * updates: centos.kiewel-online.ch
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package git.x86_64 0:1.7.10.1-1.el5.rf will be installed
--> Processing Dependency: perl-Git = 1.7.10.1-1.el5.rf for package: git-1.7.10.1-1.el5.rf.x86_64
--> Processing Dependency: perl(Git) for package: git-1.7.10.1-1.el5.rf.x86_64
--> Processing Dependency: libexpat.so.0()(64bit) …
Run Code Online (Sandbox Code Playgroud)

yum rpm rhel6

3
推荐指数
1
解决办法
3313
查看次数

回声 $? 远程执行时不起作用

当我执行如下命令时,它会按预期给我一个输出,但是当我在远程服务器上运行相同的命令时,它总是给我echo $?作为0.

locally
# <some command>
# echo $?

Remotely
# ssh server " <some command >; echo $? "
Run Code Online (Sandbox Code Playgroud)

现在,在远程执行的情况下,我总是得到0echo $?输出。

scripting bash shell-scripting

3
推荐指数
1
解决办法
824
查看次数