Initial Configuration Server For CentOS 6
SimpleSysAdmin.info. 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 :
and then set password for your new username like this:
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 :
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 pam_wheel.so use_uid
Initial configuration – Networking Configuration
- Set static IP to your machine :
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
Change ONBOOT to “yes”, BOOTPRONTO to “none” and then add following like above. After that you can restart the network service :
#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 :
To check the network configuration use this: