Jul 08

How to Install CentOS 7 Minimal

1 – INSTALL OPERATING SYSTEM

Select Install CentOS 7 and press Enter

Install CentOS 7

Press Enter to begin the installation

Press the Enter Key to begin the installation process

Select your Language and click Continue

CentOS7_Language

Complete any items marked with the Exclamation icon.  Only the Installation Destination should be marked and will be automatic partitioning by default.  Click Installation Destination

CentOS7_Installation_Summary

By default automatic partitioning is selected.  Review the automatic partitioning and confirm it suits your needs and click Done.  Otherwise, you’ll need to manually complete the partitioning (beyond this tutorial).CentOS7_Installation_Destination

Once all the items marked with the exclamation icon are complete, click Begin InstallationCentOS7_Begin_Installation

CentOS 7 will now begin to install.  Click Root Password to set the password while you wait for the installation to finish.

CentOS7_Root_Password_Is_Not_Set

Enter your Root password twice and click Done.  CentOS will rate the strength of your password and obviously the stronger the better.

CentOS7_Root_Password

Once the installation completes, click Reboot.

CentOS7_Complete

The boot menu will automatically boot CentOS 7

CentOS7_Boot_Menu

2 – LOGIN AS ROOT

Once the OS boots, login using username root and the password you set during the installation.CentOS7_Login

3 – CONFIGURE NETWORK ADAPTER

How to Configure Network Settings in CentOS 7

4 – INSTALL VMWARE TOOLS (Optional)

If this installation of CentOS 7 is a VMWare Guest OS, you may wish to install the VMWare Tools by running the following command:

5 – INSTALL NANO (Optional)

If you are not a fan of the vi text editor, you may wish to install Nano which has a more natural text editor feel to it by running:

6 – INSTALL UPDATES

Install updates by running:

7 – CREATE A SUDOER USER

It’s best practice to not use the root (super-user) user account.  Instead, you should always use a regular user account and allow them root privileges by adding them to the sudoers file.  You can then run privileged commands by use the sudo or su commands.  Let’s first start by creating a user by running the following command (where sigkill is the username):

Next, we want to set the password for our user by running the following command and enter the password twice when prompted:

Here is an example of the output you’ll receive

Add User

Now that your user is created, you want to add them to the sudoers file.  You can edit the sudoers file with vi by running the following command.  (NOTE: If you’re not familiar with vi, take a look at vi cheat sheet)

Near the end of the sudoers file, locate the following lines

Add the following line directly below the above lines then save and quit (:wq)

Here is an example of how it should look

Sudoers File

8 – PREVENT REMOTE SSH ACCESS FOR ROOT

By default, SSH is installed and ready to work once you configure a network adapter.  Another best practice is to prevent remote SSH access to the root account.

Locate the following line

Modify the above line to the following then save and quit the file

Restart the SSH Service by running the following command