Previously i said that i just installed Ubuntu to run as a guest host under my Windows XP box via VMWare. Unfortunately even after i’ve updated my ubuntu system (completely) i’m not really that interested on using Ubuntu, i decided on using Centos 5 instead because i plan on setting up proxy server (using Squid), and any other server related tools
The primary reason why i choose centos instead of other linux distribution, is because centos widely used on various webhosting / server on VPS level (Just in case i want to move this website into VPS based hosting in the future) … and i take this as learning approach to make myself familiar with the Centos distro …
The installation process was running smoothly without problem at all (i choose to use GNome as desktop and later i switched into XFCE4), so after finished installing everything the next step of course updating the centos kernel by using Yum and continue by updating the other software installed and then configuring squid … unfortunately all of them are done via the Gnome desktop / XFCE desktop … and of course that’s not the way i want it to be (i’m sure most server which is using Centos does not use X Server beside using X Server means more memory used)
So the next step of course looking a documentation on disabling the x server or at least exiting from the GDM … because i’ve tried using gdm-stop but it just go back to the login screen
and after a while i found the answer to this question, you just need to use /sbin/init 3 if you’re already logged in into the GDM
of course it’s time consuming if i have to use that command everytime i start the virtual machine, because i just want it to be started as console (to reduce memory consumption because i want the virtual machine to always run even when i play game on windows because if the x server started it is using more than 512 MB of system memory) …
and once again i searched for an answer to this question and found one in short time. To disable GDM and X Server from autostarting you just need to edit /etc/inittab and replace the runlevel 5 into runlevel 3 … and to confirm this i need to reboot and it’s working as it should (of course) with the exception that squid process and bind wasnt started by default
and since its not convenience to enable / start squid and bind manually everytime the virtual machine started, of course i need to edit the service so squid and bind process are going to be started automatically when the virtual machines turned on
to do this, i just need to use ntsysv command and configure so squid and bind will be started automatically … and finished … and the results is the memory consumption reduced to 288 MB (a big improvement of course)
as a side note, i did not install the vmware-tools since it’s not compatible with the selinux on centos. And yes now i’m a big fan of this distro :P
Leave a response