Installing CentOS from Scratch / CentOS Manual Installation Process

Jason Cannon
A free video tutorial from Jason Cannon
Professional system administrator, consultant, and author.
4.5 instructor rating • 19 courses • 524,160 students

Lecture description

In this lesson you will learn how to install CentOS 8 and/or RHEL (RedHat Enterprise Linux) 8.

Learn more from the full course

Linux for Beginners

An Introduction to the Linux Operating System and Command Line

05:58:10 of on-demand video • Updated February 2021

  • By the end of this course you will understand the fundamentals of the Linux operating system and be able to apply that knowledge in a practical and useful manner.
English [Auto] In this lesson you'll learn how to install Santas from scratch or how to install Santas manually. Now this comes in handy if you want to customize your installation or if you're working on physical hardware. Now if you already have a Linux distribution installed and ready to go for this course. Feel free to skip this lesson for example perhaps you installed Santos using a VDI or virtual disk image in virtual box and so you already have a working system to use this course with. So again you can skip this lesson at this point. You should have virtual box installed on your operating system. The next thing you're going to do is download Santos from Santos dot org. Now what we need to do is find the download link. So here it says get Santos now go ahead and click on that. Now by the way that may look completely different when you're accessing the Santos Web site of course. Web sites can get updated all the time so just find the download section for Santos then a scroll down a little bit here. You'll notice that you have two options here. The Santos Linux DVD ISO is perfect for our needs. It's based on the latest stable Red Hat Enterprise release. This means it's been well tested so you shouldn't be in for any bad surprises. The Santos stream DVD iso on the other hand is a rolling release. Consider it a development release or a work in progress release. With that said let's stick to the most stable version and click on Santos Linux DVD. ISO here you'll be presented with a list of mirrors and you can simply choose any one of these. They all point to the exact same file so I'll click on the very first one here and it starts to download now. This is a very large file so it will take some time to download. Once you have the ISO downloaded you're ready to create a virtual machine. So go ahead and start the virtual box application create a new virtual machine for your Santos operating system installation by clicking on new. You can see that it asked you for a few bits of information the name the machine folder the type and the version. Now I'm going to name the virtual machine Santos desktop as I type that in virtual box automatically selected Linux as the type and read had as the version if it didn't you could simply use the dropdown boxes and make the appropriate selections so you would go here first and click Linux and then select Red Hat 64 bit. Now if you do not have a red hat 64 bit option that most likely means that your hardware acceleration features for your computer are not enabled. This means you need to enable the hardware acceleration and or virtualization settings in your computer's bios reboot your computer and enter the bios and make sure that you have X or am DV enabled in your physical computer's bios. Now if you have an Intel processor you might see X and if you have an EMT processor Well you might see M.D. V. Also if you see any settings for virtualization technology or virtualization extensions go ahead and enable those as well. Now this process varies from manufacturer to manufacturer so you might have to look up the documentation for your specific computer. Again you only need to perform the steps of going into the BIOS and enabling those virtualization settings. If you do not see a red hat 64 bit option here in the version section of this screen also you can just leave the machine folder set to the default. Now that you have a name type inversion set for your virtual machine you can continue. So go ahead and click Next the minimum amount of RAM recommended is 1024 megabytes or one gigabyte. Now I have plenty of ram to use on my system so I'm going to dedicate about half of my resources to this virtual machine so I'll use eight thousand one hundred ninety two megabytes which is 8 gigabytes once you set your memory size click next. Now we need to create a virtual harddrive make sure that create a virtual hard disk now is selected and then click the create button. The default of VDI is find for the hard disk type especially if you're not going to be using this disk image with other virtualization software. So just go ahead and click. Next you have two choices here. One is dynamically allocated and the other is fixed size. If your primary concern is about preserving disk space or using as little disk space as possible choose dynamically allocated. However if you're looking for better performance use fixed size. If you're not sure which one to choose just go ahead and use the default of dynamically allocated now click next to continue. Here is where you can set the size of your hard disk. I'm going to specify 100 gigabytes for my hard drive size although 10 gigabytes or so is sufficient to install Santos to now. I wouldn't recommend anything less than 20 gigabytes but again I like having some additional space so I'm going with this larger size of 100 gigabyte. So now we can click Create to create the virtual machine. Next you need to install Santos so we'll just power on the machine by clicking on the start button at the top. Immediately virtual box asks you for a virtual optical disk file. Of course you're going to use the Santos iso file that you downloaded earlier. So click on the folder icon. And this opens up the virtual media manager window. Click on Add and navigate to where you downloaded the iso file. This will probably be in your Downloads folder. Already have my downloads folder here selected and as you can see I have my iso file so just click on that and click open. Now click choose and the last step here is to click start to boot your virtual machine. You'll notice that you have three options. The test this media and install Santos Linux 8 is highlighted. It's kind of hard to tell what's highlighted but that is what is highlighted. What this will do is make sure that the image that you're using isn't corrupted. Now I recommend going with the default here. So go ahead and just press enter to start the installation you'll see the system start to boot and perform a check on the media. If for some reason the ISO got corrupted during the download this will alert you to that fact to interact with a VM click inside of it. This allows the virtual machine to take control over the mouse and keyboard so anything that you type or any mouse movements you make are going to the virtual machine at this point to give control of the mouse and keyboard back to the host system. You need to press the host key which is a special key reserved for virtual box actions the default host key on a Mac is the left command key while the default host key on Windows is the right to control key even if it's something different you can always tell what the host key is by looking in the bottom right of your VM window. I'm on windows so you can see the words right. See TRL which stands for the right control key and that is displayed in the bottom right of the VM window. Also if this is the first time you've done this a virtual box will give you some information about this more or less it's telling you the exact same thing that I just told you. So I'm going to go ahead and click on capture to let the virtual machine take over my mouse and keyboard. So now we're inside of a virtual machine and the first thing we need to do is select the language as you can hopefully tell her I speak English so I'm going to use the default of English. Once you've selected your language click continue. There are many selections you can make here on this installation summary screen. Most of them are optional. However anything with an alert symbol next to it requires your attention. Let's start by clicking on the installation destination. Since it has an alert icon next to it. The only thing you have to do on this screen is to simply click done Santos's forcing you to make sure that you are installing it to the right disks. This virtual machine only has access to one virtual disk and it's already selected. So now I'm just gonna go ahead and click done and by the way if it wasn't selected you can go ahead and click it and you'll see a checkmark indicating that it is selected. So again I'm going to click Done. Now you can see that the alert icon has disappeared. We want to enable networking for our Santos installation. So next click on network and hostname if you see the word disconnected next to the interface name go ahead and click the on off switch the network interface status should go from disconnected to connected. Now click on done the final thing we need to do on this screen is to change the software selection so click on software selection on the left hand side. Click on workstation now on the right hand side. Click on development tools if you don't select development tools you won't be able to install something later called Virtual Box guest editions and we'll be talking about those guest editions in a little bit. So just make sure that there is a check mark next to development tools. Those are the only changes we need to do on this screen. So let's go ahead and click done to return to the installation summary screen. If you want to make any other adjustments at this time go ahead and do so. The only additional items you should change are the ones on the left under localisation. We've already configured the software and system section so we're gonna leave those alone at this point. So let's say you might want to set the date and time. So you would click here and then choose your date and time either through the manual system or perhaps just clicking on where you're at in the world. So I use mine as America's New York now click done so at this point you're ready to start the installation so click. Begin installation. Now it's time to set the password on the root account. We'll be talking about the root account later in this course. But for now just click on root password and choose a password. And very important. Be sure to remember that password and if you can't think of a password then I'll suggest one for you. It's admin user so I'm going to enter that here admin user and I'll re-enter it here as you can see there's a little message at the bottom of the screen and if Santos considers the password that you've chosen to be weak it's going to require you to press done twice to confirm that password. And so this particular password is weak. This is a virtual machine that no one but me will have access to. So I'm not really concerned about a strong password here. So go ahead and click done once if you have a strong password or twice if you have a weak password. Now we have the option of creating a user and we want to go ahead and do that. So click on user creation. Here is where you'll enter your information for your personal account on this system. So here I'm going to enter my name of course you would enter your name next. Make sure to click. Make this user administrator. Now that will make it easier for you to do things on the system such as install software or other types of administrative tasks that we'll be covering later in this course. So now we need to supply a password so I'll go ahead and enter my password here. And again if Santos thinks you're using a weak password you'll have to click done twice. From here you'll have to wait for Santos to complete the installation process now that the main portion of the installation is done. We need to go ahead and reboot the system to finish up the installation. So go ahead and click on reboot. Now if Santos was not able to detach the ISO from the virtual optical drive we'll have to do it manually. So if you see the Santos installation screen again like we do here don't worry. Go to the devices menu. Now we need to hit the host key to get control of the mouse and keyboard slam and hit right control since I'm on windows. Again just look in the right hand corner and you'll see the host key that you need to hit. So from here what we want to do is go to the devices menu and then the optical drive sub menu and you can see a checkmark here next to the file that is actually connected. But what we want to do is remove the disk from the virtual drive. So we'll go ahead and click on that. Now as you can see in the background I've spent enough time here where the installation is starting over again. But don't worry it's not writing anything to your virtual disks it's just starting up so again no need to be concerned. So a virtual box thinks that Santos is still using the ISO. So it asks you if you want to force and mount it and we don't want to install Santos again. So performing the force on Mount is exactly what we want to do. So we'll go ahead and click force on Mount. Now go to the machine menu and click reset machine and reset from here click on reset. What this does is powers the virtual machine off and back on again. Now we're presented with the normal installed Santos boot screen here Santos is asking us to accept the license information. So I'm gonna click inside the virtual machine to capture the mouse and keyboard then I'm gonna click license information and then click I accept the agreement. Now go ahead and click done. And finally click on finish configuration now that this system is booted up I'm going to go ahead and log in as myself by clicking on my name and next I'm going to enter the password that I chose during the installation process for my account. Now this might be different than the root password again. This is for your personal account. Now of course you are going to be clicking on your name and using your password. So this will look just a little different than what you're seeing here on the screen I can either hit enter or click sign in right after you log in you'll be asked to confirm your language. English is my language and it's already selected so I'm going to click on Next here is the keyboard. And again the default works for me so I'm in the click on Next. Again if you don't want location services enabled click the on off switch. Personally I'm fine with location services being enabled so I'm going to accept the default here and click on Next again. At this point you can connect your online accounts. I'm going to personally skip this process now. You can also skip it and always do this later if you decide you want to. So go ahead and click on Skip. Finally click on start using Santos Linux. So what you see here is actually a tutorial for the desktop which is called gnome of course these are optional to watch but the tutorials are short and worth watching. Once you're done with the tutorials click on the X in the top right of the window to close the screen. So our job will be completely done right here if we were running Linux directly on physical hardware such as a desktop a laptop or a server. However since we're using a virtual machine we can optionally perform one more step that will help Linux understand the virtual hardware that it's working with. That step is to install a piece of software called Virtual Box guest additions. The main benefit of installing virtual box guest editions is that the Linux Desktop will conform to the shape of the virtual machine window. So for example now if I change my windows size I'll just drag it over here we'll see that the Linux Desktop doesn't expand or conform or stretch out to fit the window. Now if you're happy with how Santos looks now you can go ahead and stop here. You can also adjust the display settings by going to the view menu then the virtual screen. One sub menu there you can select a scale to make the display appear larger or smaller so let's scale it a little bit to 125 here. All right. And let's go back and scale it back down now if that scaling feature is good enough for you then again there's no need to install the guest editions. If you're still with me and want to attempt the installation then just know that I'm about to ask you to do some complicated things that we obviously haven't covered in this course yet. So if you start to feel uncomfortable or unsure just stop and continue with the next lesson in this course you can always install the guest editions later. Once you start feeling comfortable working on the command line. So if you're still with me go ahead and click on activities in the top left of your screen next click on the terminal icon that's near the bottom of your screen now type s you Deo C2 DNF space install space dash y space L few tills e l f you t i l s dash lib elf which is l I B E L F dash Devil which is D E V E L now it's very important that you enter the command exactly as shown make sure every letter is in lowercase make sure that you spell everything correctly make sure that the hyphens are exactly where they're supposed to be make sure the spaces are exactly where they're supposed to be because if you make any typing mistakes at all the command will not work so go slow and check your typing when you're sure the command looks the same on your terminal as it does on mine go ahead and press enter when you're prompted for a password enter the password for your account what this command does is installs a package that is required by virtual box guest editions it's a dependency if you see complete at the end of this installation process then the installation of that package was successful as you see here on the screen if you see a message such as unable to find a match then there is a typing mistake in your command. So let me demonstrate what that looks like. So I'm just gonna hit the up arrow key and let's say I accidentally added an extra L to the end of my command. Now I'm gonna hit enter and I get an error back that states that it was not able to find a match. So if you see that then try the command again but correct any typing mistakes. Also if you happen to install it twice. So let me fix my typing installation. You will actually get the same complete as your status back as well so that's fine too. Now that the dependency is installed it's time to insert the guest Ed. seedy image to do that first press the host key which is the left command on a Mac and Wright control on windows that lets your host system take back control of the mouse and keyboard. Now go to the devices menu and click insert guest editions click here insert guest additions seedy image now you'll see a pop up that asks you if you would like to run the software that is on this image and we do so click inside the virtual machine to give back control of the mouse and keyboard examine hit do not show this message again because I understand how this works so I click on capture and then I'm going to click on run now again you're asked for your password so go ahead and enter it here. Again this is the password for your account not to the root account password. Just in case if they're different. So go ahead and click authenticate. Now the guest editions start installing the guest edition software requires that the development tools are installed. So if you remember earlier when we selected the software for the installation we added the development tools by clicking on it and making sure that there was a checkbox next to the development tools name. So if you're having problems installing guest editions you need to make sure that development tools were installed during the installation once the installation is completed you'll get a message telling you to press return or enter to close the window so go ahead and press enter and now what we want to do is reboot the virtual machine to show you what happens when the guest editions are successfully installed so click on the far right corner and the here and click on the power button and click on restart so I'm just going to log in. So now what should happen is if I resize the virtual machine window the Linux Desktop should resize appropriately so let me go ahead and just drag it over here. Let it go. And now the Santos desktop expands to fill the entire window. OK. Well that ends this lesson and wraps up the manual installation of Santos.