Initial Configuration Server For CentOS 6

Initial Configuration

0 100 In this article i assumming that you all already install centos 6 on your computer or on your machine. If you don’t, please refer to this article “How To Install CentOS 6“. Ok, let’s start it.


If you have fresh centos installation on your computer, the first thing to do is create a user. Because if you just using root as your user login on your computer or your server, and later on your server get compromised, it will be easier to trace back your system. After create user, you should configure your firewall, network, repositories etc.


Here the following examples of initial configuration server for CentOS 6 :

Initial configuration – Create User

  • Create a new user

Using this command :

#useradd yourusername

and then set password for your new username like this:

#passwd yourusername

Initial Configuration - Create User
Create User

In this case, i using “dei” as my new user.

  • Add new user to wheel group

The purpose of this act is to make any new users can switch to root and recognized by sudoers file. Use this command :

# vi /etc/group

Add this new user like this :

Initial Configuration - wheel group
Add new users to wheel group

Or simply by command :

#usermod -G wheel username

Make users on the wheel group  be only a user who can switch to root as an administration user.

# vi /etc/pam.d/su

Uncomment the following line :

# auth  required   use_uid

Initial configuration – Networking Configuration

  • Set static IP to your machine :

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

Initial Configuration - Network Configuration
Network configuration ip static

Change ONBOOT to “yes”, BOOTPRONTO to “none”  and then add following like above. After that you can restart the network service :

#/etc/rc.d/init.d/network restart


#chkconfig network on

  • Disable IPV6

You can disable IPV6 if you think you don’t need it.

Open file configuration /etc/sysctl.conf andd add this following lines :

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

Save that configuration and apply it with :

#sysctl -p

To check the network configuration use this:





You might also like More from author