How do I install the operating system to start developing my website?
Every step to install the CentOS 7 operating system.
Hello, my name is Christopher Tate. I am a Red Hat consultant and I love open source software. I will help you create your own successful website, on your own computer, using open-source software.
How do I download CentOS 7?
Download an ISO file.
wget http://mirrors.xmission.com/centos/7.6.1810/isos/x86_64/CentOS-7-x86_64-DVD-1810.iso -O ~/Downloads/CentOS-7-x86_64-DVD-1810.iso
- wget: The command to download files.
- The URL to the CentOS 7 ISO file to download.
- -O: For specifying the output path for the downloaded file.
- The output path for the downloaded CentOS 7 ISO file.
You can download the latest CentOS 7 ISO file to install on your computer here https://www.centos.org/download/. Click on the [ DVD ISO ] button. You can choose from any of the mirrors, you might find one close to you. You can also download the file using the wget command in the terminal like that.
How can I create a USB key with CentOS 7?
Use the dd command.
- Once you have downloaded your ISO image, place your USB key into a USB port on your computer.
If you are currently using windows, you can download a program like Win32 Disk Imager to load the ISO image onto a USB key at the bottom of this page
- If you are on Linux already, I'll teach you a way to load CentOS onto a USB key from the terminal that shows a progress bar. First install the prerequisite "pv" application to monitor the progress of data through a pipe.
Install the "pv" application.
sudo yum install -y pv
- sudo: The command to install yum repositories begins with the command sudo. The "sudo" command allows your current user to have root privileges for a few minutes after entering your password.
- yum : Stands for "Yellowdog Updater Modified", but nobody knows it as yellowdog, just yum. CentOS manages software packages and RPM application files with yum.
- install: For installing new yum packages.
- -y: Suppress messages asking to confirm if you want to install the software.
- pv: The package name you wish to install.
Find the path to the USB storage device.
Run the built in command in linux to view the disks on the computer:
- lsblk: The command to list all block storage devices on the computer.
You will want to very carefully review the list of disks. Find the disk name that matches the size and mount point of your USB key. Here is what my USB device at /dev/sdb looks like:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:16 1 7.2G 0 disk
├─sdb1 8:17 1 4.3G 0 part /run/media/ctate/CentOS 7 x86_64
└─sdb2 8:18 1 8.5M 0 part
Write the ISO image to the USB key and watch the progress.
If the lsblk command shows sdb, sdb1, sdb2, etc, the path to your USB device would be /dev/sdb. With that information, you can run a command to write the ISO image to the USB device and see the progress.
pv ~/Downloads/CentOS-7-x86_64-DVD-1810.iso | sudo dd of=/dev/sdb
- pv: To monitor the progress of data through a pipe.
- The path to the ISO file.
- |: Takes the output from the pv command and uses it as the input to the dd command.
- dd: Copies a file to a device.
- of=... The path to the USB device.
Enjoy the progress bar as your ISO is slowly and carefully loaded onto your USB key.
When I reboot with the USB key, which boot mode do I choose?
Avoid booting in UEFI boot mode.
When you reboot your computer, you will want to press the right key to enter the boot menu. If not, it's possible that you enter a boot mode on the USB that will cause problems after installing your operating system. For me, I will ignore the UEFI options, like "UEFI: TOSHIBA TransMemory 1.00", and choose "TOSHIBA TransMemory 1.00". I'm not an expert on UEFI, but I know I regretted installing it with UEFI once and it made my system unstable. One reason to use UEFI mode is if other systems (Windows Vista/7/8, GNU/Linux...) of your computer are installed in UEFI mode, and you wish to dual boot, then you must install in UEFI mode too. I never dual boot, since I chose a long time ago to keep Microsoft out of my personal life forever, so I never use UEFI mode.
Now let it boot into your USB image, let it check the disk for errors and you're on your way!
What language would I use during the install process?
Choose the language you are comfortable with.
- On the left hand side, you will find the choices of language for the operating system. Select the language that you prefer (English).
- On the right hand side, you will find the choices of locale (English (United States).
- Press [ Continue ].
How do I setup the date and time for a CentOS 7 installation?
Choose the big city near you.
- On the "INSTALLATION SUMMARY" page, there are several options to complete.
- Start in the "LOCALIZATION" section, click "DATE & TIME".
- Click on the city on the map that is the closest match to your timezone (for me it's Region: Americas, City: Denver).
- Select whether you prefer "24-hour" time or "AM/PM" time.
- In the top-left corner, click [ Done ].
How do I setup the network and host name?
Pick a unique name on your network and plug in your Ethernet cable.
- This is a good early step in the install process to configure the network so that necessary packages can be found before choosing other options. In the SYSTEM section, select "NETWORK & HOST NAME".
- I'm expecting your machine to be connected to an Ethernet cable, rather than a wireless network. So make sure your "Ethernet (...)" card is selected on the left.
- On the right side, switch the Ethernet card to on. Notice that your router assigns the machine an IP Address based on the Hardware Address.
- Another important item to change is the "Host name". Give your computer a unique name on your network ("tower1" for me), but do not include a fully qualified domain name (followed by a dot). If you give a fully qualified domain name like "tower1.computate.org", then networking (/etc/resolve.conf) will configure your domain name "computate.org" as a search domain. I've found that to cause me problems in the past, making networking slower for me. I setup fully qualified domain names in an IPA server or in the /etc/hosts file instead.
- Next to the host name, click [ Apply ].
- Now click [ Done ].
What should I choose for the software selection in a CentOS 7 installation?
Make sure to pick a desktop environment.
- In the "SOFTWARE" section, click "SOFTWARE SELECTION".
- I would always recommend a Desktop environment on your computers. Your computers are for development, and your actual website I recommend running on an OpenShift cloud at Red Hat's openshift.com. OpenShift is open source, and Red Hat is an open source company, the true leader in enterprise open source technology. I'll take you through the whole journey from developing your site on your own computer, to deployment on the OpenShift cloud.
- So in the "Base Environment" section, select "GNOME Desktop". Phonetically, GNOME is pronounced nɔ̃m, not ʒi-nɔ̃m.
- You could also choose "KDE PLasma Workspaces", but I find KDE to be buggy, and I prefer a simple GNOME Desktop.
- In the top-left corner, click [ Done ].
How do I setup the disk for the installation destination?
Configure your own partitioning.
- Now it's time to configure the primary disk for the operating system. In the "SYSTEM" section, click "INSTALLATION DESTINATION".
- If your primary disk does not have a black and white checkmark icon, then you'll want to select the correct primary disk.
- Select "I will configure partitioning.". You can also select other options like "Encrypt my data", but it's not necessary.
- Click [ Done ] to configure partitioning yourself.
Instructions for an existing operating system on your disk.
- If you have an existing operating system on your disk, you will want to open the drop down for your operating system to redo the filesystem.
- Click on the first SYSTEM partition and click the [ - ] button.
- You can select "Delete all file systems which are only used by ....".
- Click [ Delete It ].
The best way to setup your disk for most situations.
- The easiest way is to get started is to click "Click here to create them automatically.". If you are a disk expert, than you can ignore this section and do it your way. But I'll recommend the best way to setup your disk for most situations.
- The automatic disk setup will create 4 partitions (/home, /boot, /, and swap). You don't need a separate partition between / and /home, so I would delete the /home partition. Click on the /home partition.
- Click the [ - ] button.
- Now the size of the /boot partition is up to you. However, I recommend at least 2 GiB for your /boot partition. This way, when you receive updated packages and security fixes, your /boot partition won't run out of space, at least not for many years I think. So click on the /boot partition.
- Change the /boot partition "Desired Capacity" to "2 GiB".
- Now to decide how much swap space to reserve for memory. Swap space is related to the amount of RAM you have installed in your system. It's generally agreed that you don't need more swap space than double the amount of RAM in your system. However, do consider the amount of RAM you will likely upgrade your system with someday to determine how much swap space to reserve. This is because you won't be able to change it later without reinstalling the operating system either. It's not the end of the world to reinstall your operating system, I seem to do it fairly often. So to set the swap space, click on the swap partition.
- If I have 32 GiB of RAM in my system, I will set the amount of swap space to double that amount in "Desired Capacity": "64 GiB".
- Now let's max out the amount of space on the / partition.
- Click on the / partition.
- Clear any value from the "Desired Capacity" of the / partition.
- Now click on the /boot partition to see all of the values of all three partitions updated. The amounts may have been converted to MiB instead of GiB, but you should see the right values you are expecting, with the / partition maxed out.
If you are accidentally booted into "UEFI" mode.
- If you are accidentally booted into your USB Centos 7 Installer in "UEFI" mode, you will see an extra /boot/efi paritition. The installer will assume that you need a /boot/efi partition, which you don't. Proceeding with the /boot/efi paritition and removing the install media will make your system unstable and crash. So avoid installing the operating system in UEFI mode.
- Click [ Done ].
- Click [ Accept the changes ].
Am I ready to push the [ Begin Installation ] button?
Welcome the wonderful world of CentOS 7.
- You are about to install the wonderful world of CentOS 7. Relax, you're going to love it, just like thousands of others around the world. So go ahead and push the [ Begin Installation ] button.
Do I need a root password and a user password?
Choose a string root password.
- It's important to choose a strong root password. This will be an administrative account that can be logged into to do anything at all. Click on "ROOT PASSWORD".
- So come up with, or generate a strong root password and type it twice in the boxes. Write it down carefully for later, or store it in an encrypted password safe if possible. I'll tell you more about password safes in another lesson. Click [ Done ].
- Click on "USER CREATION". Write the first name, last name and username that you want. Check "Make this user an administrator". It's important to choose a strong user password. Click [ Done ].
How do I finish the install of CentOS 7?
A few more steps to enjoy your new computer.
- When it's done, you can click [ Reboot ].
- Don't forget to take out the USB disk at the same time, or you will boot back into the installer.
- When you boot into CentOS 7 for the first time, you will be asked to accept the License Information. Click on "LICENCE AGREEMENT".
- Review the license agreement and then check "I accept the license agreement".
- Click [ Done ].
- Now click [ FINISH CONFIGURATION ] in the bottom-right corner.
- You can now sign into your user account by clicking on your username and entering your password.
- Follow the welcome screen by clicking [ Next ] for your language.
- Click [ Next ] for your keyboard layout.
- Turn off "Location Services", since you don't need anybody tracking your location.
- Click [ Next ] to turn off location services.
- And I skip the online accounts by clicking [ Skip ].
- Now click [ Start using CentOS Linux ] to enjoy your new computer!
|April 30 2019
||How do I install the operating system to start developing my website?
||Every step to install the CentOS 7 operating system.
||By Christopher Tate
||How do I download CentOS 7?
||Download an ISO file.
||How can I create a USB key with CentOS 7?
||Use the dd command.
||When I reboot with the USB key, which boot mode do I choose?
||Avoid booting in UEFI boot mode.
||What language would I use during the install process?
||Choose the language you are comfortable with.
||How do I setup the date and time for a CentOS 7 installation?
||Choose the big city near you.
||How do I setup the network and host name?
||Pick a unique name on your network and plug in your Ethernet cable.
||What should I choose for the software selection in a CentOS 7 installation?
||Make sure to pick a desktop environment.
||How do I setup the disk for the installation destination?
||Configure your own partitioning.
||Am I ready to push the [ Begin Installation ] button?
||Welcome the wonderful world of CentOS 7.
||Do I need a root password and a user password?
||Choose a string root password.
||How do I finish the install of CentOS 7?
||A few more steps to enjoy your new computer.
Previous and next articles.