You are on page 1of 4

Hello today I will be walking you through the initial configuration of a Centos Server, I will be

covering what I like to configure when I setup a new box so I hope you find this information useful

Add a User: Create a Common User Account
useradd user ( Creates User) passwd user ( Set password for user)

We can give the above user the ability to switch to root by completing the following.
usermod -a -G wheel user (user is the username created above)

We now need to ensure the wheel module is activated in PAM
vi /etc/pam.d/su

Uncomment the following line #auth required pam_wheel.so use_uid and save the file.


You can now become root by logging in as the user account you created and issuing the following
command.





Updating System
yum -y install yum-plugin-fastestmirror
yum -y update

Enhancing the Minimal Install with Administration and Dev Tools
yum y groupinstall Base Development Libraries Development Tools
shutdown r now (reboot)

Adding GNOME desktop environment
Yum groupinstall Desktop X Window System Fonts Desktop Platform

Before you can run the graphical user interface at boot you will need to change the run level of the
system.
Run Level Explained


Check Current Runlevel
As you can see my current runlevel is set to 3: full multi-user mode command line only.


Change The Run level
vi /etc/inittab

Scroll down to the bottom of the file and set the run level save the file and reboot the server

Disable SElinux
SElinux is a advanced form of security and is beyond the scope of a basic administration
level.
vi/etc/sysconfig/config
Set SElinux to disabled save the file and reboot the server

Installing YUM priorities
We are going to be adding more repositories to the system so that we can install
additional software if we wish. We will be working with third party repositories and will
use YUM priorities to avoid conflicts with package management.
yum install yum-plugin-priorities

Confirm the installation and when it completes type

vim /etc/yum/pluginconf.d/priorities.conf

ensure that the plugin is enabled this file show show the instruction enabled = 1



Vim /etc/yum.repos.d/Centos-Base.repo

Add the following line at the end of the [base] section priority=1
Do the same for [updates] [extras]
Save the file
Run yum update



Yum priorities is a simple plug-in that enables YUM to decide what repositories will assume the
highest priority when installing and updating new packages.

So now we have added yum priorities we are now going to enable extra third party
repositories so we can add more software to the system if we wish.

Adding EPEL and Remi Repositories
Yum install wget

From your home directory /home type the following commands one at a time

wget http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-7.noarch.rpm

wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

rpm Uvh remi-release-6*.rpm epel-release-6*.rpm

Open the Remi Repository file

vim /etc/yum.repos.d/remi.repo

change enabled=0 to enabled=1
add the line priority=10

Open the EPEL repository file

vim /etc/yum.repos.d/epel.repo

change enabled=0 to enabled=1
add the line priority=10

To finish update yum

yum update




Configure Network
http://linuxplanet1.blogspot.co.uk/2014/08/centos-6-how-to-
configure-static-ip.html

You might also like