OS installation

Keyboard Shortcuts

Installing Enterprise Linux 7 in a VirtualBox virtual machine isn't difficult but there are a few items necessary for the rest of this course. In this video learn to create a VM, install CentOS 7 in it, and go over the most important options in detail.

- [Instructor] For this course, we'll be installingCentOS 7 Enterprise Linux.To install from full DVD, we need to download an ISO imagefrom the CentOS website.We'll do this by opening a web browserand browsing to the CentOS Download siteat centos.org/download.Click DVD ISOand choose a server near you.We click on Save File and click OK.If you don't know where any of these servers are,just randomly select one.Now that our CentOS 7 ISO image is downloaded,we can install it.To install CentOS 7 in a virtual machine,we need to have VirtualBox running and then click on New.

Let's name the virtual machine CentOS7 Full DVD.Then click on Next.Now we'll set the memoryto 1.5 gigabytes or more if you have it.Keep in mind we'll be runningtwo virtual machines simultaneously in this course,so you want to use less than halfthe available RAM for each.In my case, the dialog box showsI have 16 gigabytes of free RAM,so I could give each VMup to eight gigabytes if I wanted to,but that's not necessary.

I'm going to set my RAM to 1.5 gigabytesand click Next.The next dialog is for the virtual disk.Click Create.Then click on Next to accept the virtual disk typeand click Next again to accept Dynamically allocated.This saves space by not allocatingall of the disk's space upfront.We can now choose the size of the disk.The default is eight gigabytes.There's nothing wrongwith selecting a larger size than the defaultif you have the extra space availablebut you can always adda second VirtualBox drive later if you need it,so it's okay to just take the defaults here.

Click on Create.Now select the VM named CentOS7 Full DVD and click on Start.Click the folder icon to select the CentOS 7 ISO imageand then click on Openand then click on Start.On the bootscreen, highlight install CentOS 7with the cursor keys and press Enter.You could choose the second optionto test the install media as well.This is mainly for ISO imagesthat haven't been burned to physical disk.This will test to see if the disk is not corrupt.

We don't usually have to do this for ISO imagesthat reside on the hard drive.To make installing easier, go to full screen modeby pressing Host key plus F.In my case, the Host key is the Right Control key,which I can seein the bottom right-hand corner of my VM window.As such, I will press Right Control + F.In the first dialog, choose the install language.This is just the language used during installation,and click on Continue.We now see the installation summary screenwhere we'll configure how our OS is installed.

Click on the Date & Time and choose your time zoneand then click on Done.Next, we'll click on Software Selection.These are installation configurationswhich go from a very bare install without a GUIto full-fledged desktop workstations.The default is Minimal Install.We're going to choose Server with GUI.This configuration doesn't include a ton of packagesbut still has a full graphical interface.Don't get too worried about installing software hereas it can all be done later.I'll click on Done.

The next thing we'll dois click on Installation Destination.Make sure the ATA VBOX HARDDISK is selected.If you choose Automatically configure partitions,the installer sets up three partitions automatically.There's nothing wrong with this choiceas the default partition layout is pretty good.If you choose I will configure partitions,you can set up partitions manually.Using this option, you still have a link for the installerto create the partitions for you.The advantage to choosing I will configure partitionsis that you get to see the default partition layoutand modify those results if you wish.

Let's click I will configure partitions now.You may also notice that at the bottom of the screen,there's a checkbox labeled Encrypt my data.If you're installing in a mobile device, such as a laptop,I recommend turning encryption on.By default, CentOS 7 uses the AES algorithm to encrypt.If you have a recent Intel CPUwith AES-NI instructions built in,there will be very little performance degradationwhen turning on disk encryption.For this course, we'll leave it turned off.And I'll click on Done.

This brings us to the manual partitioning screen.Click on the link titledClick here to create them automatically.Clicking this link brings up a new screenshowing the proposed partition layout.The installer wants to createa small partition accessible as /boot,where our Linux kernel and other boot files are storedusing the xfs file system.Second, it wants to create a much larger root partitionwhere the rest of the OS is stored,also using the xfs file system.It also wants to create a smaller swap partitionused for virtual memory.

We can add any of these configuration details in the screen.Let's just click Done and Accept Changesto accept the installer suggestions.We don't need the network configuredto install with the full DVD,but if you wanted to configure the network, now you could.We'll do it later.Click on Begin Installation.While the install proceeds,we'll give the root user a passwordand set up an admin user.Click on Root Password.You want a very strong password here for the root userbecause in Linux, the root user is all powerfuland the username is known to hackers, making it a target.

If a hacker were to get this password,they'd have access to the entire system.The installer tells youif your password strength is good or not.Use a combination of numbers,letters that are both uppercase and lowercase,and symbols for your strong password.The installer will let you proceedwith a weak password if you wish by clicking Done twice.However, it's not recommended.Now let's click on Done.If the installer doesn't let you go on,then the two passwords probably don't match.It doesn't give you a lot of indication of thisbut if you look at the bottom of the screen,you'll see the message.

You don't ever want to log in as rootand especially not on a GUI.The root user has too much powerand there are too few safeguards.So on Linux, we create a regular user.Click on User Creation.Here is where we'd enter our name into the Full name boxand it will create a lowercase version of itfor our user name.Let's use the name user1 for this course.You can always add a user with your name later if you wish.We'll also set our password in the screen.We'll create a strong password here as wellbecause we're going to make this first user an administratorby clicking on the checkboxlabeled Make this user an administrator.

It's very important that you click this box nowas the rest of our course depends on it.If you fail to click this box,you'll need to log in as root after the install has finishedand add this user manually to the wheel group.It's best to do it now.We'll also want to give this user a strong passwordsince we're giving them admin privileges.And then click on Done.The install will take between 20 minutes to an hourdepending on your host computer's hardware.As soon as the install is finished,we'll be able to click on Rebootto reboot into your new CentOS 7 VM.

As soon as the system reboots,we want to click on License Information,click on I accept the license agreementand click on Done.And then click on Finish Configuration.Now, log in as the user you created.Notice that root isn't even given as an option in the GUI.You can specify any userif you click on the Not listed link.However, I really don't recommend logging in as root.As soon as you log in,you'll be prompted to choose your language.

I'll choose the default,which CentOS gets from the installer, and click on Next.I will also choose a default for the keyboard.Click on Next againand click on Skip creating online accountsand then click on Start using CentOS Linux.As soon as we're logged in,CentOS displays a Getting Started windowexplaining how the CentOS desktop works.For now, let's close this window.VirtualBox allows us to do things that wouldn't be possiblewith a physical computer, such as snapshots.We can snapshot our VMso that we never have to install again.

If anything goes wrongand we want to revert to a fresh installation, we can.To snapshot our new VM, press the Host key plus T.Let's call this first snapshot Fresh Install,then click on OK.To shutdown your CentOS VM properly,select the top right menu in the title barand click the power button.This will let you restart or shutdown your VM,but we're not going to do it quite yet.

Click on Cancel.If you want to revert back to the previous snapshot,go out of full screen mode by pressing Host plus F.And then click on the Close gadget to close the VM window.You will be presented with three options:Save the machine state,Send a shutdown signal, or Power off the machine.Selecting Send a shutdown signalis the nice way to shutdown an OSand is basically doing the same thingas selecting the shutdown option from within CentOS.Selecting Power off just pulls the virtual power cord.

Linux is pretty good at handling this sort of thing,but there still may be disk corruption,so I don't recommend it.However, if we want to revert to the previous snapshot,we're not concerned about the current state of the disksince it's snapshotted.Select Power off the machineand then click on Restore current snapshot Fresh Installand click on OK.Your VM will now be reverted back to the previous snapshot,which currently is the fresh install.

Resume Transcript Auto-Scroll

Author

Released

1/31/2018

The RHCE certification demonstrates expert-level competence with Red Hat Enterprise Linux 7. This course covers two of the key objectives of the certification exam: Linux kernel tuning for performance optimization and remote logging. Computer science instructor and Linux enthusiast Grant McWilliams shows how to change kernel parameters by hand and using tuned profiles. Additionally, he demonstrates how to turn PowerTOP suggestions into tuned profiles. He shows how to tune processor affinity and schedulers with Tuna, and test your optimizations with performance monitoring tools like Performance Co-Pilot (PCP), Turbostat, ps, and GNOME System Monitor. He also shows how to load and customize kernel modules. Last but not least, Grant covers remote logging using rsyslog.