You need to SSH to your VPS at first.
Now if you don't already have "nano" you can install it like this :
yum install nano
now that you have nano, you should make a copy of the file we're modifying [in case something goes wrong], with this line :
cp /etc/my.cnf /etc/my.cnf.old
now you can modify the file using nano simply like this :
nano /etc/my.cnf
now you can edit your file, as if you are in a GUI text editor.
find [mysqld] which is at the beginnig and right after that insert :
skip-bdb
skip-innodb
That's it ! Press Ctrl+X and then Press Y and then Enter
Now you have to restart mysql :
service mysqld restart
check your RAM Memory usage now and no problem, you are welcome !
![]() |
MySQL, a Data Base Management System |
2. Migrate from Apache to Lighttpd
Lighttpd is way faster than Apache and consumes less RAM. It's highly recommended. However it'll mess up your .htaccess a bit. You can find solution for that too, of course.
I installed Lighttpd in SSH first and then switched from apache to lighttpd in Kloxo Panel. But I guess it's still fine if you switch it in Kloxo in the first place without installing it via SSH. Kloxo will install Lighttpd, itself.
Here's the line you should use to install lighttpd in SSH :
yum install lighttpd
Now, in order to swtich programs in Kloxo, login to your Kloxo Admin Page, Find "Server : linux" box and click on "Switch Program".
Simply under the "Web" choose lighttpd insted of apache and click on Update. [Don't close it yet, you need to do one other thing]
![]() |
Apache vs. Lighttpd Completion Time |
3. In the same page that you changed your Web program from apache to lighttpd, change your Dns program from bind to djbdns.
You are done ! Check out your RAM Memory usage. Mine is now at 80MB (Used to be at 300MB, I just freed 220MB RAM Memory)
Now if you host any WordPress blogs on your server, in order to make all the links work properly do this [ Lighttpd + Wordpress = 404 Not Found Error ] :
in /wp-content/themes/[name of your theme]/404.php you should add this code right in the beginning :
<?php header("HTTP/1.1 404 Not Found"); ?>
Now there's one other file you're going to have to modify and that is/etc/lighttpd/lighttpd.conf :
nano /etc/lighttpd/lighttpd.conf
find
#server.error-handler-404 = "/error-handler.php"
change it to
server.error-handler-404 = "/index.php"All you have to do now is to restart lighttpd :
service lighttpd restart