Search This Blog

Wednesday 1 July 2015

how to install linux based operating system centos7 on your host

Installation

Installation instructions for Centos 7

  1. Download a copy of the Centos 7 installation DVD (64 bit edition) from the Centos web site or burn the DVD using Seneca's Freedom Toaster which is located in the Open Lab on the 2nd floor of the TEL building. Note: we'll be using the 64 bit version of Centos because all of our lab computers are equiped with Intel 64 bit mainboards and CPUs. We'll also be using a Fedora iso for installing the virtual machines, but you will not need to burn that to a disc. It is faster to download the ISO and install directly from it. Finally, if you're going to burn your DVD using the Freedom Toaster then be sure to use a blank DVD-R disc. DVD+R discs sometimes fail to burn successfully.



  2. Insert your HDD into the docking bay of a PC in the lab and boot the computer using your installation DVD. If possible try to use the same PC for this course for the rest of the semester. Some PCs may be configured with slight hardware variations from others which may cause problems when moving your HDD from one system to another.
  3. Perform your installation following these guidelines:
    • wherever possible select the default options
    • set your hostname to your learn ID.
    • set Toronto as your time zone
    • For the installation type, choose 'Graphical Server'
    • set the root password
  4. After completing the installation, remove the DVD and reboot from your HDD.
Tip: Boot Menu
If you got the boot failure message, restart the computer and press [F10] to get to the boot menu, select the Hard Disk as boot device and continue.

Booting your system

  1. create a user named with your learn ID
  2. Login as the user you created and open a terminal window. Then use 'su' to become root and run the 'yum update' command. Reboot after all updates have completed. Now that your system is up to date, again login using your learnid and do the following:
    • Verify that your system date and time are correct. If not then set the correct system date and time.
    • Verify that your network is functioning.
    • Run and record the output of the 'df -hT' command.
    • Run and record the output of the 'cat /etc/fstab' command.
    • Run and record the output of the 'cat /etc/issue' command.
    • Run and record the output of the 'uname -a' command.
  3. Under Applications > System Tools right click both "Terminal" and "Virtual Machine Manager" and select "Add this launcher to panel"

Configuring a Linux Gateway

At this point you have a basic Centos 7 installed and updated. This will serve as a host for the virtual machines where you will do the majority of the work in this course. All the rest of our labs will assume you have this basic system running. If, for any reason, your system becomes corrupted during the semester, you'll have to redo this lab to be able to continue with the remaining uncompleted labs. You are responsible for YOUR system. If you do not perform back-ups you have taken this risk on yourself. Poor planning on your part does not constitute an emergency for anyone else.
Configuring Sudo
Switch to root using su or su- (remember su- switches you to root and places you in root's home directory, with root's profile settings.  su switches you to root, but with your current user's profile settings and does not change your working directory).

Issue the following command:

visudo

Wikipedia has useful information on why we use visudo instead of directly editing the /etc/sudoers file.  It is worth looking at as it may appear on next week's quiz.  http://en.wikipedia.org/wiki/Sudo#Tools_and_similar_programs

Sudo can be configured to allow multiple users administrative access without giving anyone else the root password.  Additionally you can configure sudo to only allow users to execute specific commands with elevated (root) privilges.  Sudo works much the same as Run As Administrator in Windows.  For additional information, I found this video provided a very good explaination:

After issuing the visudo command, find the line that reads as follows:

root ALL=(ALL) ALL

What this means is allow root to run from any terminal (first all), acting as any user (second all), and execute any command (third all).  Below this line, add the following (without the curly braces):

{learnid} ALL=ALL


Configuring your Hostname

Configure your hostname on your host OS to be c6host, by issuing the following command.

sudo vi /etc/hostname
Configure your hostname on your host OS to be c6host, by issuing the following command.  Change the line that reads HOSTNAME=localhost.localdomain (or whatever it contains if it does not exactly match this) to the following:
c7host

Note that this change will not take effect until after you reboot, however since you will need to reboot to apply other changes later that  makes sense to do this all at once.

Installing the virtualization software

No comments: