VirtualBox Guest Additions is a software package for VirtualBox that expands its abilities and provides a more seamless user experience. Adding Guest Additions is not required, but allows the VMs to run in full screen mode without black bars and also provides seamless mouse integration. In this video, learn how to install an updated kernel, the kernel source, and software development tools. Then, insert the Guest Additions CD and the installer compiles a new kernel module.
- [Instructor] For this course, we'll be installing CentOS 7 Enterprise Linux. To install from full DVD, we need to download an ISO image from the CentOS website. We'll do this by opening a web browser and browsing the CentOS download site at centos.org/download. Click DVD ISO and choose a server near you. 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 I'll set the memory to 1.5 gigabytes, or more if you have it. Keep in mind, we'll be running two virtual machines simultaneously in this course, so you'll want to use less than half the available RAM for each. In my case, the dialogue box shows I have 16 gigabytes of free RAM, so I could give each VM up to eight gigabytes if I wanted to, but that's not necessary.
I'm going to set my RAM to 1.5 gigabytes and click next. The next dialogue is for the virtual disk. Click create, then click on next to set the virtual disk type, then click next again to accept dynamically allocated. This saves space by not allocating all of the disk space up front. We can now choose the size of the disk. The default is eight gigabytes. There's nothing wrong with selecting a larger size than the default if you have the extra space available, but you can always add a 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 image. Then click on open. And then click on start. On the boot screen, highlight install CentOS 7 with the cursor keys and press enter. You could choose a second option to test the installed media as well. This is mainly for ISO images that have been burned to physical disks. This will test to see if the disk is not corrupt.
We don't usually have to do this for ISO images that reside on the hard drive. To make installing easier, go to fullscreen mode by pressing host key plus F. In my case, the host key is the right control key, which I can see in the bottom right-hand corner of my VM window. As such, I will press right control F. In the first dialogue, choose the install language. This is just the language used during installation. And click on continue. We now see the installation summary screen, where we'll configure how our OS is installed.
Click on the date and time and choose your time zone, and then click on done. Next, we'll click on software selection. These are installation configurations, which go from a very bare install without a GUI to full-fledged desktop workstations. The default is minimal install. I'm going to choose server with GUI. This configuration doesn't include a ton of packages, but still has a full graphical interface. Don't get too worried about installing software here, as it can all be done later. Now click on done. The next thing we'll do is 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 choice, as 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 link for the installer to create the partitions for you. The advantage to choosing I will configure partitions is that you get to see the default partition layout and 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 on 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 CPU with AES-NI instructions built in, there will be very little performance degradation when turning on this encryption. For this course, we'll leave it turned off. Now click on done. This brings us to the manual partition screen.
Click on the link entitled click here to create them automatically. Clicking this link brings up a new screen showing the proposed partition layout. Installer wants to create a small partition accessible as /boot, where our Linux kernel and other boot files are stored, using the XFS file system. Second, it wants to create a much larger root partition where the rest of the OS is stored, also using the XFS file system. It also wants to create a smaller swap partition, used for virtual memory. We can edit any of these configuration details in this screen.
Let's just click done and accept changes to accept installer's suggestions. We don't need the network configured to install with a 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 password and set up an admin user. Click on root password. You want a very strong password here for the root user, because in Linux, the root user is all powerful and 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 you if 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 proceed with a weak password if you wish by clicking done twice. However, it's not recommended. 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 this, but if you look at the bottom of the screen, you'll see the message.
You don't ever want to log in as root, and especially not on the GUI. The root user has too much power, and 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 box, and it will create a lowercase version of it for our username. 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 this screen. We'll create a strong password here as well, because we're going to make this first user an administrator by clicking on the checkbox labeled make this user an administrator.
It's very important that you click this box now, as 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 is finished and add this user manually to the wheel group. It's best to do it now. We'll want to give this user a strong password, since we're giving them admin privileges. And then click on done. The install will take between 20 minutes to an hour, depending on your host computer's hardware. As soon as the install is finished, you will be able to click on reboot to reboot into your new CentOS 7 VM.
As soon as the system reboots, we'll want to click on license information, click on I accept the license agreement and 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 user if 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 again and click on skip, creating online accounts, then click on start using CentOS Linux. As soon as we're logged in, CentOS displays a getting started window explaining how the CentOS desktop works. For now, let's close this window. VirtualBox allows us to do things that wouldn't be possible with a physical computer, such as snapshots. We could snapshot our VM so that we never have to install again.
If anything goes wrong and 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. And click on OK. To shut down your CentOS VM properly, select the top-right menu in the title bar and click the power button. This will let you restart or shut down 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 fullscreen 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 the shutdown signal, or power off the machine. Selecting send the shutdown signal is the nice way to shut down an OS, and is basically doing the same thing as 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 you want to revert to the previous snapshot, we're not concerned about the current state of the disk, since it's snapshotted. Select power off the machine, and then click on restore current snapshot 'Fresh Install' and click on OK. Your VM will now be reverted back to the previous snapshot, which currently is the fresh install.
- Network Time Services (NTP)
- How NTP works for authentication
- Configuring the chrony server and chrony client
- Setting up an LDAP server and LDAP client
- Creating a Kerberos database
- Configuring Kerberos client authentication