Sunday, January 16, 2011

Advanced Tweaking VPS centOS | How to Tweak your VPS with CENTOS

This tutorial explains about tweaking your VPS with CENTOS 5 on it. 
A dedicated server it costs you around 120$ = 6000 rs per month*.
So most of us would go for a VPS, Which cost very less compared to a dedicated server.

Ok we got a VPS what now ? 

We install heavy scripts in it even databases in it and try to run. We Host soo many websites that it cant really handle soo many things.

  • Try to install Vbulletin and IPB on a VPS and you would see the load it makes on your VPS is abnormal.
  • Install some databases or copy some files from remote server then while using wget also our VPS could get slow.
  • Even with Cpanel in VPS our site might run slow. 

The most frequent problem arises here.We need to restart the VPS atleast once in 4 to 5 days.That would decrease our site's SEO and traffic which would be a huge loss to us.

So what to do now ?

Well lets optimize the VPS to the core. ( can be applied to the Dedicated server to but Not Tested No Guarantee)

First Login to the SSH of your server using putty or any other client 

Now su it ( root)

Now type these commands one by one


userdel adm
userdel lp
userdel sync
userdel shutdown
userdel halt
userdel news
userdel uucp
userdel operator
userdel games
userdel gopher
userdel ftp

groupdel adm
groupdel lp
groupdel news
groupdel uucp
groupdel games
groupdel dip
groupdel pppusers

Deny the Access to some System Services


chkconfig anacron off
chkconfig apmd off
chkconfig atd off
chkconfig autofs off
chkconfig cpuspeed off
chkconfig cups off
chkconfig cups-config-daemon off
chkconfig gpm off
chkconfig isdn off
chkconfig netfs off
chkconfig nfslock off
chkconfig openibd off
chkconfig pcmcia off
chkconfig portmap off
chkconfig rawdevices off
chkconfig readahead_early off
chkconfig rpcgssd off
chkconfig rpcidmapd off
chkconfig smartd off
chkconfig xfs off
chkconfig ip6tables off
chkconfig avahi-daemon off
chkconfig firstboot off
chkconfig yum-updatesd off
chkconfig sendmail off
chkconfig mcstrans off
chkconfig pcscd off
chkconfig bluetooth off
chkconfig hidd off
chkconfig haldaemon off
chkconfig messagebus off
chkconfig mdmonitor off
chkconfig acpid off

Now Virtual Terminals only 2 are enough 

go to 
vi /etc/inittab  
and disable last 4 terminals by prepending them with a # 


# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
#3:2345:respawn:/sbin/mingetty tty3
#4:2345:respawn:/sbin/mingetty tty4
#5:2345:respawn:/sbin/mingetty tty5
#6:2345:respawn:/sbin/mingetty tty6
Now restart the server for changes to Take affect.
Filed Under :

0 comments for "Advanced Tweaking VPS centOS | How to Tweak your VPS with CENTOS"

Post a Comment

background