How to install CentOs 7

Bruno Gil
5 min readJun 5, 2019

--

For this tutorial, we will be using a Windows host and installing CentOs as a virtual machine instead of a physical one. This will allow us test out settings and even removing the system completely whenever we desire without breaking a sweat.

Prerequisites — Virtualization Software and the ISO

One of the main requisites is having virtualization software. For this tutorial we will use VirtualBox. (You can get it here)

Once you have that set up download the CentOS ISO from their website (Link Here)

If you already know how to use VirtualBox jump to step 3

Step 1 — Creating the Virtual Machine

Open VirtualBox and hit the NEW button. This will appear:

Choose the options as shown on the screenshot (You can name it whatever you want). For type choose Linux and Version use Red Hat 64bit. Hit next.

Now you will have to determine how much RAM the server will be using. Recommended is either 1024 or 2048, up to personal preference. Remember that this amount of RAM will not be usable by your main host while the server is running.

Like a normal machine, it needs a hard disk to store data. You can either choose to set a fixed size for the disk or it to grow in size as it needs more space. Recommended for this to set it to Fixed to avoid any problems.

On this next window we will have to choose the size of the disk. (Again, this space will be taken from your usable space in your host OS, so keep that in mind.

One extra thing: If you delete the virtual machine you CAN use that disk space again, it works like an installed program.

Step 2 — Bringing it to life

Now right click the created machine in the VirtualBox main menu and choose Settings. After you do, click storage like shown in the picture above.

On the screen you should see a CD icon under “Controller: IDE” , click on it and a new CD icon should appear on the right of the screen (as shown in the picture above). Click on it, and if the ISO file you previously downloaded is not already listed, use the “Choose Virtual Optical Disk File” and locate your ISO. The result should be something like this:

Now everything is all set up! Just one little thing. Sometimes the mouse cursor might not work once you start the machine. To fix this, go to Settings > System and change the “Pointing Device” option from “PS/2 Mouse” to “USB Tablet”

Step 3 — Installing CentOS 7

Finally, we’re ready to launch it for the very first time. Hit the “Start” button in the main menu. After loading, this screen should pop up:

Hit Enter and you will be greeted with this screen:

Here we don’t really have to change anything as this will be the language for the instalation process. Click the continue button on the bottom right.

On this screen you will have to set certain options. Choose your Timezone, the keyboard layout (It’s really important you set the right one or you might get in trouble later), the type of instalation (we will use minimal as we don’t need a GUI), and in the “Installation Destination” make it automatic. Once all of that is set up hit “Begin Instalation”.

The system will now install itself. It will take a while, so while it’s doing that, take some time to set the Root password (if you set a password too weak you can still force it to accept by double clicking confirm), and add an user (optional).

Once it finishes setting up, it will reboot and CentOs should start up.

If you see this screen, your server is up and running!

All you have to do now is login with your credentials.

Step 4 —Updating and Installing some utilities

First we want to update it to the latest version, so run the following commands:

yum check-update
yum upgrade

After the system is updated, this command will install some basic functionalities

yum install nano wget curl net-tools lsof bash-completion

Step 5— Configuring the network

If you want to connect to this server, you will probably want to set a Static IP address

Use the command

nmtui

Change the IPv4 addressing to manual and set your IP address, Gateway and DNS servers. You should also change your hostname (this will be your machine name).

To test if your network is working, try pinging a server. For this example we will use the Google DNS server (8.8.8.8)

If your result looks like this, it means the server is responding and you have connection!

Tip: (Hit ctrl+c to stop pinging the server once you verify it’s working)

--

--