Instructions for installation of CentOS 6.5 and CentOS 7 installation Today, we will configure the network through the console, check the Internet connection, add and update repositories and install the necessary software.
Start setting up the network if the network card was not configured during the installation of the operating system on the server.
The network card is configured in a file /etc/sysconfig/network-scripts/ifcfg-ethX wherein X - the network card number.
vi /etc/sysconfig/network-scripts/ifcfg-eth0
Let us put it this way:
was:
DEVICE=eth0 HWADDR=08:00:27:53:D9:69 TYPE=Ethernet UUID=cff04d8a-e7b6-4542-98bd-1ceb573edc97 ONBOOT=no NM_CONTROLLED=yes BOOTPROTO=dhcp
If you need to receive IP automatically on a configurable network card using DHCP, then you need to change this:
DEVICE=eth0 HWADDR=08:00:27:53:D9:69 TYPE=Ethernet UUID=cff04d8a-e7b6-4542-98bd-1ceb573edc97 ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=dhcp
If you need to specify a permanent IP on the configurable network card, then you need to change this:
DEVICE=eth0 HWADDR=08:00:27:53:D9:69 TYPE=Ethernet UUID=cff04d8a-e7b6-4542-98bd-1ceb573edc97 ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=none IPADDR=192.168.1.120 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 DNS1=192.168.1.1 DNS2=8.8.4.4 USERCTL=yes
We also prescribe the DNS server in the file. /etc/resolv.conf:
vi /etc/resolv.conf nameserver 192.168.1.1 nameserver 8.8.8.8
After configuring the network card, we can restart the network by executing the command:
/etc/init.d/network restart
Or reboot the server by executing the command:
reboot
To check the operation of the Internet, you can execute a command pingYou need to press the ping break. ctrl+c:
ping ya.ru
A good ping on a normal Internet:
64 bytes from www.yandex.ru (213.180.204.3): icmp_req=1 ttl=50 time=4.51 ms 64 bytes from www.yandex.ru (213.180.204.3): icmp_req=2 ttl=50 time=3.76 ms 64 bytes from www.yandex.ru (213.180.204.3): icmp_req=3 ttl=50 time=3.83 ms
Add a repository to install additional programs
Add an EPEL repository to CentOS/RHEL 7.x by following the command:
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Add an EPEL repository to CentOS/RHEL 6.x by following the command:
rpm -ivh http://download.fedoraproject.org/pub/epel/6/$(arch)/epel-release-6-8.noarch.rpm
After adding a repository, update the system by executing the command:
yum -y update
We establish the necessary programs:
yum -y install vim mc screen nmap htop bmon mtr smartmontools wget ntp ntpdate unrar unzip telnet net-tools
The initial configuration of the CentOS server was carried out, a repository was added and some programs needed for operation were installed.
I was with you. Sergey Lazarenko.
Let’s take a short break and watch a potentially useful video about how to make a rain cape in the forest from improvised means:



comment