Author: Ricky Bryce (Montgomery County, Illinois)
| Click here to learn why Christ came to this Earth for us! | Get 10% off VPSLink! Enter REFERRAL code MJDCDJ |
Configure Services (for startup)
Next, we'll configure some essential services to start when the system starts. Since the VPS will default to Run Level 3 (text mode only), this is the run level we will configure. The Run Levels for CentOS are as follows:
Run Level 0 – Halt (shutdown)
Run Level 1 – Single-user Text Mode
Run Level 2 – Multi-User without NFS
Run Level 3 – Full Multi-User Text Mode
Run Level 4 – Not used (User Defined)
Run Level 5 – Full Multi-User Graphical Mode (With graphical login screen)
Since we can't actually be at the VPS, we can just stay in Run Level 3, and the graphical interface will not start on the local system when the computer boots, although we will still have web pages we can administer the server through.
We don't need to go there right now, but the run level configuration can be edited in the /etc/inittab file on your VPS system. Since a graphical interface is not installed, and we definitely need networking, we will NOT edit the file at this time.

Let's configure the services.
Login as a standard user
Type su to become the root user
Type cd /etc/rc.d
type ls to list the subdirectories

Since we are editing run level 3, we need to go into the rc3.d folder. Type cd rc3.d
Type ls to see how the services are configured.

Services beginning with a K are killed during this run level. Services beginning with an S are started during this run level. It's important to know the K and S are capitalized. The number immediately following the K or S indicates what order the service is Killed or Started. We need several services to start which are not already configured, so we will use the mv (move) command to rename some of the services, so they will be started instead of killed during this run level.
Type mv K05saslauthd S05saslathd (This will authenticate smtp messages if you are using a mail server)
Type mv K30spamassassin S30spamassassin (This will check and mark messages for spam)
Type mv K35dovecot to S05dovecot (This will allow users to receive email through their email client)
Type mv K50vsftpd S50vsftpd (This is the FTP server, which will allow users to upload web pages.)
Now type ls to verify all needed services will run at startup.

Now you can reboot your machine, and all needed services (so far) should be running. Just type reboot.