If you install CentOS just as frequently, as I do, you too need a reminder of some initial tasks to complete before we start the deployment of services like LAMP, Zabbix, Asterisk, and so on. First, we will need a few things just to get started. Our CentOS 7 initial configuration will include – changing the host name, network configuration and tools, and finally, SELinux. Let’s proceed with these tasks.

How to change the host name:

There are three ways to set up the name of the host – nmtui utility, hostnamectl command and nmcli tool. Of course, the simplest way is to edit /etc/hostname, but that will require a reboot.

nmtui:

There are just two simple steps to change the host name in this gui-like interface – just launch it and do the change.

Installing Zabbix server 1

Installing Zabbix server 2

Do not forget to restart hostnamed after these steps to commit changes:

hostnamectl:

Main console command to change the name of the host. There are different kinds of hostnames in Linux, but now we are interested in changing Static name:

After the setting hostname with hostnamectl – you need just to restart your session, nothing more

nmcli:

Another command, that can be used to change the name of the host:

And like with nmtui, restart hostnamed to commit changes.

Install net-tools:

This is essential – because when you issue the most known command to find out your IP address – ifconfig – system won’t understand you.

 Set IP-Address:

There are two ways to set a static IP-address for a system – with nmtui – a tool we’ve already familiar with, and editing of config files.

Here are steps to use nmtui to set the static IP-address.

Installing Zabbix server 3

Installing Zabbix server 4

Installing Zabbix server 5

 

 

 

 

 

But this is not so true way of configuring Linux systems. Let’s get into config files. First, we must edit the configuration of the interface. In this file we are interested in these three lines:

after editing this file, save it with :wq and restart network service:

SELinux

Last, disable SELinux. And to do this, we need to edit another config file with vi:

Change the value from permissive to disabled, save the file with :wq and restart your system.