Installing CentOS 7

The CentOS 7 install is pretty straight-forward.  In this example, I will be using a VM built in ProxMox, however, this How To should also apply to a physical server.

I have the following properties on my VM:

  • CPU = 2 Cores
  • Memory = 2048Mb
  • Disk = 32GB VirtIO
  • Network = VirtIO on default VLAN.
  • CD = CentOS-7-x86_64-DVD-1611.iso

 

1.

Download the ISO from one of the mirror sites in this link:

CentOS 7 ISO

Clicking on one of these links will directly download the latest version of the CentOS 7 DVD ISO.

Once downloaded, either:

  • Burn it to a CD.
  • Use an application like Rufus to burn it to a USB drive.
  • Upload it to your ISO repository in your Virtual Environment.

2.

Turn on your server and enable it to boot your CD, USB.  If this is a VM, then we don't have to do this, the ISO is already mounted and the VM will boot to it.

  • Choose Install CentOS Linux 7.
  • Hit enter.

  

3.

The language selection screen will appear next, select your language if not English (United States), as that is set by default.

  • Click Continue when done.

4.

The Installation Summary screen will appear next.

  • Click on NETWORK & HOST NAME at the bottom left.

5.

In this screen:

  • Host Name: <your host name>
  • Click Apply
  • Click Configure...

6.

Click on IPv4 Settings and enter the following:

  • Method: <select Manual>
  • Addresses:
    • Address: <your IP Address>
    • Netmask: <your subnet mask>
    • Gateway: <your router's IP address>
  • DNS servers: <enter your DNS servers>
  • Search Domains: <enter your domain here>.com
  • Click IPv6 Settings next.

 

7.

Set:

  • Method: Ignore
  • Click Save when done.

8.

Click slider to ON in the top right and click Done at the top left.

9.

Now click DATE & TIME at the top left.

10.

In DATE & TIME:

  • Click the map where your build is located.
  • Make sure that Network Time is ON.
  • Click Done when finished.

11.

Click INSTALLATION DESTINATION next:

12.

In this screen:

  • Local Standard Disks: <select the disk you want to install the OS to>
  • Other Storage Options: <select Automatically configure partitioning"
  • Click Done when finished.

Note:

If your disk is 100G or larger, choose I will configure partitioning, otherwise, most of your space will automatically be dedicated to the /home partition.

13.

(Optional) if you chose "I will make partitions":

  • Click the + button on the bottom left of the screen.
  • Define /boot partition and make it 100MB
  • Click the + button again.
  • Define swap partition, I gave mine 8G, but you can set it to your needs.
  • Click the + button again.
  • Define / partition, don't give it any space value, and it will use the rest of the drive.
  • Adjust any values as needed on the right, per partition.
  • Click Done when finished.

14.

Now we can click Begin Installation at the bottom right.

15.

While installing, we can set the ROOT password:

  • Click ROOT PASSWORD

16.

In this screen:

  • Root Password: <enter your root password>
  • Confirm: <re-enter your root password>
  • Click Done when finished.

17.

In this screen:

  • Root Password: <enter your root password>
  • Confirm: <re-enter your root password>
  • Click Done when finished.

18.

Once the install completes:

  • Click Finish configuration.

19.

On the next screen:

  • Click Reboot.

Your server will reboot at this point, take out any CD or USB disks if prompted.

Update CentOS 7

Now that we have the Operating System installed, we can update it.

1.

Either log into the console or SSH into your server with your ROOT user and password.

2.

Type "yum -y update" and hit enter.

yum -y update

3.

CentOS will download and install all updates.

4.

Type "reboot" when completed, then hit enter.

reboot

(Optional) Install Nano

I use nano as my editor, simply because it's easy to use and easy to teach. 

Most hard care Linux / Unix guys swear by vi, the editor that is usually shipped with any *nix distribution.  Vi is great when you don't have the ability to hit CTRL-<characters>, as nano relies on the fact that you can use the CTRL key.

 

1.

Either log into the console or SSH into your server with your ROOT user and password.

2.

Type "yum -y install nano" and hit enter.

yum -y install nano

Disable SELinux

In most cases, we'll want to disable SELinux.

1.

Either log into the console or SSH into your server with your ROOT user and password.

2.

Type "nano -w /etc/selinux/config" and hit enter.

nano -w /etc/selinux/config

3.

Edit the config file:

  • SELINUX= Change from enforcing to disabled
  • CTRL-X and hit y then enter.

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted

 

4.

Type "reboot" when completed, then hit enter.

reboot

We are done with this tutorial and con now move forward with the project.

Leave a Reply

Your email address will not be published. Required fields are marked *