After fresh installation of CentOS 7, the following are list of things that you may consider doing to get your server ready for any kind of setup. The list is not  comprehensive but it’s enough for new Server. We had talked about:
Top things to do after Fresh Installation of Fedora 23
Top Ten Must Do Things After Installing Kali Linux

1. If you installed the OS as root user and didn’t add any standard user account, do it here.

useradd "username"
passwd "username"

Give user a privilege to switch to root as administator.

usermod -G wheel "username"
vim  /etc/pam.d/su

Uncomment line 6 to look like one shown below.

auth            required use_uid

Transfer root privilege to a user you added, here the username is “username”.


# add to the end of the file  the user added to use use all root privileges.

username  ALL=(ALL)       ALL

2. Disable SELinux (Security-Enhanced Linux) if you don’t need it.

sed -i 's/(^SELINUX=).*/SELINUX=disabled/' /etc/selinux/config

If you reboot your system and type


You should get the output saying selinux have been disabled. See below

SELinux status:                 disabled

3. If you don’t need a firewall, disable it using commands below.

systemctl stop firewalld 
systemctl disable firewalld rolekit

4. Configure hostname for the server.

hostnamectl set-hostname "yourhostname"

5. Configure timezone for the server with the command below. Replace Africa/Nairobi with your correct timezone.

timedatectl list-timezones 
timedatectl set-timezone Africa/Nairobi

Confirm with


If you Love what we do, support us by downloading this tutorial as pdf from the link below:
download as pdf button Tags.
6. Configure Ethernet network connection to give it ip address and other network parameters.
First, you need to check the name of the Ethernet device before modifying its configurations. Use command below

 nmcli device

My Ethernet adapter is eno1.
I will configure my eno1 with ip address, subnet mask, gateway, DNS server . The method of configuration will be set to manual.

nmcli connection modify eno1 ipv4.addresses
nmcli connection modify eno1 ipv4.gateway
nmcli connection modify eno1 ipv4.dns
nmcli connection modify eno1 ipv4.manual method

Make changes take effect by restarting the interface.

nmcli connection down eno1
nmcli connection up eno1

Confirm that the changes have been committed:

 ip addr show

7. If your network doesn’t use ipv6, you can disable it by opening grub configuration file and adding  ipv6.disable=1 to GRUB_CMDLINE_LINUX on Line 6.

vim  /etc/default/grub

Your results should look like one shown below.

GRUB_CMDLINE_LINUX=" ipv6.disable=1    wap rhgb quiet"

Update grub configuration

grub2-mkconfig -o /boot/grub2/grub.cfg

8. Now do system update and upgrade.

yum -y update

Centos update

7. Install tab completion package

yum install bash-completion 

8. Add additional essential repositories.

yum -y install yum-plugin-priorities
yum -y install epel-release
yum -y install

Modify priorities.

sed -i -e "s/]$/]npriority=6/g" /etc/yum.repos.d/rpmforge.repo 
sed -i -e "s/]$/]npriority=4/g" /etc/yum.repos.d/epel.repo 
sed -i -e "s/]$/]npriority=1/g" /etc/yum.repos.d/CentOS-Base.repo 

9. Configure vim

yum -y install vim-enhanced 

a) Set global alias for vim by editing file /etc/profile.

vim  /etc/profile

b) Add the line below to the end

alias vi='vim'

c) Apply changes

source /etc/profile

d) To configure vim for your user account only, save configurations to ~/.vimrc file but for all user account write to /etc/vimrc.

vi ~/.vimrc 

Then add the following lines

set nocompatible
set fileformats=unix,dos
set history=100
set ignorecase
set number
set showmatch
syntax on
highlight Comment ctermfg=LightCyan
set wrap
set incsearch
set hlsearch
set smartcase

9. If you would like to do Virtualization with KVM, do thw following.

yum -y install qemu-kvm libvirt virt-install bridge-utils
yum -y install libguestfs-tools virt-top
yum -y install spice-server spice-protocol 

10. Install Apache,php, MariaDB and phpmyadmin.

yum -y install httpd
yum -y install php php-mbstring php-pear
systemctl  restart httpd
yum -y install mariadb-server 

Set up MariaDB password.


Say yes to set root password,remove anonymous users,disallow root login remotely and remove test database.Then reload privilege tables.
Try logging in with your password.

mysql -u root -p

Install phpMyAdmin

yum -y install phpMyAdmin php-mysql php-mcrypt

11. Install docker

yum -y install docker

12. Set keymap and locale settings.

 localectl set-locale LANG=en_US.UTF-8
locale ctl
localectl set-keymap us

13 Changing Run-Level:
You can change runlevel by linking to /etc/systemd/system/ You can change runlevels between graphical and multi-user using the following.

systemctl set-default

To change to runlevel 3 type:

systemctl set-default 

If you Love what we do, support us by downloading this tutorial as pdf from the link below:
download as pdf button Tags.
Must do things after installing CentOS 7 server
Basic CentOS 7 Server setup guide

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.



Please enter your comment!
Please enter your name here