Let's reduce the Mysql server memory requirements
# nano /etc/my.cnf
inside section [mysqld] add:
skip-innodb skip-bdb skip-locking port = 3306 key_buffer = 16K max_allowed_packet = 1M table_cache = 4 sort_buffer_size = 64K read_buffer_size = 256K read_rnd_buffer_size = 256K net_buffer_length = 2K thread_stack = 64K
at the end of the same file add:
[mysqldump] quick max_allowed_packet = 16M [mysql] no-auto-rehash # Remove the next comment character if you are not familiar with SQL # safe-updates [isamchk] key_buffer = 8M sort_buffer_size = 8M [myisamchk] key_buffer = 8M sort_buffer_size = 8M [mysqlhotcopy] interactive-timeout
Let's reduce the Apache server memory requirements
nano /etc/httpd/conf/httpd.conf
We change the KeepAliveTimeout value into:
KeepAliveTimeout 3
We need to modify the IfModule prefork.c section with the following values:
StartServers 1 MinSpareServers 1 MaxSpareServers 5 ServerLimit 50 MaxClients 50 MaxRequestsPerChild 5000
Then we better comment out the unnecessarily loaded modules, such as:
#LoadModule authn_dbm_module modules/mod_authn_dbm.so #LoadModule authz_dbm_module modules/mod_authz_dbm.so #LoadModule ldap_module modules/mod_ldap.so
or whatever you may not need.
Finally, let's verify the Apache configuration:
/usr/sbin/apachectl -t
and apply the new configurations:
/etc/init.d/mysqld restart /etc/init.d/httpd restart