How to Install a CentOS 7.2 Minimal Server - Page 2
This tutorial exists for these OS versions
- CentOS 8
- CentOS 7.3
- CentOS 7.2
- CentOS 7.1
- CentOS 7
On this page
Next we will proceed to SOFTWARE SELECTION, by default it comes with Minimal Install.
We can add more software packages if required (when you use the install DVD and not minimal installer). In my case I need only a Minimal Install(Basic Functionality) setup to install software later with yum, so I will save the settings by pressing Done.
We move towards SYSTEM and select INSTALLATION DESTINATION.
When you need a manual partitioning scheme then you can select I will configure partitioning, in my case I will prefer Automatically configure partitioning after that press Done.
Next, we will customize our NETWORK & HOSTNAME by selecting that.
I will use the hostname server1.example.com and customize the ethernet setup by pressing Configure.
The next screen will look like this, now we add the IPv4 Settings by selecting the same. If you have IPv6 then you add it in IPv6 Settings.
Next, you can setup the network to match your local network setup. In my case, I use a static IP so I will select Manual
Add the entries for Address, Netmask and Gateway as per your static IP environment. In my case I am using Address as 192.168.1.100, Netmask as 255.255.255.0, Gateway as 192.168.1.1 and DNS servers as 8.8.8.8 8.8.4.4 These values may vary according to your network environment. After that press Save.
IMPORTANT: If you do not have an IPv6 internet connection, then set IPv6 from auto to ignore on the IPv6 tab, otherwise you won't be able to reach the internet from this server on IPv4 as CentOS seems to ignore the correct IPv4 setup then and uses IPv6 instead which fails.
Next, we have to turn the connection ON as shown in the screenshot below. Further press Done.
Now we are ready to start the installation process, you might want to crosscheck all the settings and then press Begin Installation.
The installation process will start now and you get a small blue progress bar in the next windows. Now we have to set the ROOT PASSWORD and add a new non-root user in the USER CREATION option. I will first go for root password.
Enter a secure password of your choice and press Done
Next we will go for USER CREATION.
Next I will create user, as in my case I used the Full name "Administrator" and Username "administrator", check the option Require the password to use this account and then press Done. Off-course you can use any value as per your choice.
Press Finish.Have patience and wait for the completion of the setup.
After completion of the installation, it will ask to reboot the server, just press Finish configuration.
The server reboots and will request your username and password afterwards.
Now we are ready to do login with the user that we just created above or we can use the root credentials.
First Login on CentOS
Login as root user to the server so we can do some final installation steps.
The first one is to install all available updates with yum.
yum update
confirm with "y" to proceed with the installation of the updates.
I will install two command line editors to be able to edit configuration files on the shell:
yum install nano vim
Network Configuration
CentOS 7.2 minimal don't come pre-installed with the ifconfig command we will install it as follows:
yum install net-tools
If you want to change or see the network configuration file, just edit the file
nano /etc/sysconfig/network-scripts/ifcfg-ens33
It will be like this when you configured a static IP address:
TYPE="Ethernet"
BOOTPROTO="none"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="no"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
NAME="ens33"
UUID="eb1ba0ce-af9f-4953-a6a7-3d05a15c8d4f"
DEVICE="ens33"
ONBOOT="yes"
IPADDR="192.168.1.100"
PREFIX="24"
GATEWAY="192.168.1.1"
DNS1="192.168.1.1"
DNS2="8.8.8.8"
DNS3="8.8.4.4"
Or like this when you use DHCP:
TYPE="Ethernet"
BOOTPROTO="dhcp"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
NAME="ens33"
UUID="eb1ba0ce-af9f-4953-a6a7-3d05a15c8d4f"
DEVICE="ens33"
ONBOOT="yes"
HWADDR="00:50:56:15:23:79"
PEERDNS="yes"
PEERROUTES="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_PRIVACY="no"
Change the values if required.
Note: The above DEVICE name may vary so please check the equivalent file in the directory /etc/sysconfig/network-scripts.
Adjust /etc/hosts
Adjust the file /etc/hosts as follows:
nano /etc/hosts
Make the values like this:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 192.168.1.100 server1.example.com server1 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
Congratulations! Now we have basic minimal CentOS 7.2 server setup which provides a solid basis for our other tutorials.
Download CentOS 7.2 server as virtual machine
This setup is available as virtual machine download in ova/ovf format (compatible with VMWare and Virtualbox) for howtoforge subscribers.
Login details for the VM
- The root password is: howtoforge
- The password of the "administrator" user is: howtoforge
Please change both passwords on the first login.
- The IP address of the VM is 192.168.1.1
Links
- CentOS : http://www.centos.org/