CentOS server setup guide for people from debian

This guide is outdated and unmaintained. I have not used CentOS for a decade.

A basic server setup guide for people from debian to CentOS.


yum is apt-get/aptitude on CentOS.

Remove not necessary software:

yum grouplist
yum groupremove <wildcards>
yum list installed
yum remove <wildcards>

Upgrade system: (equivalent to apt-get update && apt-get upgrade on debian)

yum update

Add more packages:

Unlike Debian, Centos's official package repo is very limited.


Check what is running:

chkconfig --list |grep '3:on' |awk '{print $1}' |sort

Use chkconfig <service> off to disable unnecessary services.

chkconfig is included as default in Centos. In Debian, you can install it via apt-get install chkconfig, though Debian people are likely to use sysv-rc-conf instead.


Make sure your /etc/hosts file have a line like:               <your-hostname> <your-hostname> localhost.localdomain localhost

And /etc/sysconfig/network have a line like:

Then run hostname <your-hostname>

Debian doesn't use /etc/sysconfig/network. In Debian, you change hostname in /etc/hostname:

echo 'your-hostname' > /etc/hostname

Debian prefers to not include the part.


Same to Debian.


CentOS may enable iptables by default. You may want to disable it via service iptables stop or /etc/init.d/iptables stop. And disable its startup at boot time via chkconfig.

If you want to mess up with it, its configuration file is located at /etc/sysconfig/iptables, different to Debian.