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:
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.
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.
10.
In DATE & TIME:
- Click the map where your build is located.
- Make sure that Network Time is ON.
- Click Done when finished.
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.
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.
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.
(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.
Disable SELinux
In most cases, we'll want to disable SELinux.
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
We are done with this tutorial and con now move forward with the project.