cpanel低内存消耗配置

关闭 SpamAssassin

这个程序对于阻挡spam并不是太过重要,建议用csf监测效果更明显,可这样子关闭:

到 WHM > Server Configuration > Tweak Settings > Disable Spamd(即Enable BoxTrapper spam trap设为off,Enable SpamAssassin spam filter设为off)

及:

到 WHM > Service Manager > Disable Spamd(把spamd的Enabled Monitor的勾都去掉)

关闭 Mailman

如果您或者您的客户在cpanel里没有使用任何邮件列表,可以关闭Mailman。
到 WHM > Server Configuration > Tweak Settings > Disable Mailman(即Enable Mailman mailing lists设为off)

绝不使用Tomcat

除非一定要使用到或者资源比较多,否则绝不使用Tomcat,因为占用内存特别高。

停用 CatchAll

如果您正在遭受邮件攻击,catch all将会使用掉非常多的资源跟存储。可以这么停用它:
到 WHM > Server Configuration > Tweak Settings > Change to :fail:(Initial default/catch-all forwarder destination设为Fail)

调整 Apache

如果设置不好,Apache本身将会是一个内存消耗怪物。可以这么调整:

到 WHM >> Service Configuration >> Apache Configuration >> Global Configuration
Start Servers 设为 3
Minimum Spare Servers 设为 2
Maximum Spare Servers 设为 5
Server Limit 设为 100
Max Clients 设为 80
Max Requests Per Child 设为 2000
Keep-Alive 建议设为off,如果是设置为on的话,
Keep-Alive Timeout 设为 2
Max Keep-Alive Requests 设为 100
Timeout 设为 100
然后按“Save”,再按“Rebuild Configuration and Restart Apache”

当然还有一些您也可以采用,比如可以把邮局mail服务跟nameserver的给去掉,用户不给开shell权限,要开也只开Jailed Shell,同样也可以节省部分内存,另外内存比较低的话,不建议安装ClamAV Scanner。当然即使内存再低也建议安装csf,这个对spam的监控效果好些。

Leave a Reply