1,576
edits
Changes
no edit summary
[[Category:OPS235]][[Category:OPS235 Labs]]
=Fedora 17 Installation (on Main Host - f17host)= Reference ==* [http://linuxmanpages.com/ man pages] for cp, mount, umount, fdisk, mkdir, file, mkfs, dumpe2fs, grep, dd* Online reading material for weeks 1 and 2.
== Instructions Introduction==# Set your computer's drive selector switch to external, then power up the computer.# Insert the Fedora Live CD into the CD/DVD drive.# Reboot the system.# The boot process is completed when you see the GDM Login Screen. Click on "Automatic Login" to login as the "Live System User".# We are going to start by opening a terminal window to access our shell environment. Click on Applications --> System Tools --> Terminal to start the terminal.# At the top of the terminal window, you should see the command prompt similar to [liveuser@localhost ~]$ This prompt indicates that it is ready to take your command. The program that is running is called a shell.# At the command prompt, enter the command whoami (all in one word) and press return. This command shows the so-called User Name. Make notes of this user name.# At the command prompt, enter the command pwd and press return. This command shows the so-called present working directory or current working directory. Record the present working directory of the shell running on the terminal window. As we have not yet changed directories this should also be your users home directory. (Also indicated by the ~ character in the prompt)
==Objectives== # Perform a GNU/Linux installation using the Fedora 17 distribution# Investigate information during and after the Fedora 17 installation# Perform an update after a recent installation ==Required Materials (Bring to All Labs)== * Fedora 17 LIVE CD* Fedora 17 x86_64 Installation DVD* SATA Hard Disk (in removable disk tray)* USB Memory Stick* Lab Logbook ==Prerequisites== * None (First Lab) ==Linux Command Online Reference== Each Link below displays online manpages for each command (via [http://linuxmanpages.com/ http://linuxmanpages.com]): {|width="100%" cellpadding="5" width="50%"|'''Utilities:'''|- valign="top"|:* [http://linuxmanpages.com/man8/rpm.8.php rpm]:* [http://linuxmanpages.com/man1/hostname.1.php hostname]:* [http://linuxmanpages.com/man1/uname.1.php uname]:* [http://linuxmanpages.com/man1/ps.1.php ps]:* [http://linuxmanpages.com/man8/ifconfig.8.php ifconfig]:* [http://linuxmanpages.com/man8/netstat.8.php netstat]:* [http://linuxmanpages.com/man8/route.8.php route]:* [http://linuxmanpages.com/man1/nslookup.1.php nslookup]:* [http://linuxmanpages.com/man1/wc.1.php wc]|} Normally you would read man pages on the machine you're working on using the man command, for example '''man rpm''' will show you the manual page for the rpm command. ==Resources on the web==Additional links to tutorials and HOWTOs::* [http://docs.fedoraproject.org/en-US/Fedora/17/html/Installation_Guide/ Fedora 17 Installation Guide] =Performing Lab 1= ==Investigation 1: How to Perform a Fedora DVD Install on Your Removable Hard Drive == === Part 1: Simple Things === # Insert your '''removable SATA hard disk''' into the drive tray.# Set your computer's drive selector switch to '''external''' (a.k.a ''position #4'').# Power up the computer and insert the '''Fedora 17 Installation DVD''' into the CD/DVD drive.# Wait until the Fedora DVD boots (could take a few moments). {{Admon/important|Boot-up Issues (Fedora17) in Seneca's Computer labs|If for some reason, the Fedora17 Installation DVD does not boot: :* Restart the computer, and '''press the function key F10 to specify the device to boot''' (eg. DVD drive). :* If the user is prompted for a password, '''simply press ENTER''' (without typing any password) at the password prompt.:* Choose the DVD drive from the list of devices avalable for boot.:* You will need to perform this technique to ensure that Fedora boots from the hard drive (in future labs).:* If you have tried this technique, and the Fedora Installation DVD does not boot, you may have to burn a new Fedora Installation DVD.|}} <ol> <li value="5">Note the time at the beginning of your installation.</li> <li>When the Fedora17 Installation DVD boots, it will prompt the user to test the media (i.e. DVD) for integrity. Since time is limited for installation in the lab, select '''SKIP'''. On the other hand, if the install did not work, then you can test out the integrity of the DVD in the computer lab during your spare time.</li> <li>Select the default language ('''English''') in the next install screen, and click '''Next'''.</li> <li>Select the default '''keyboard layout''' and '''Basic Storage Devices''' in the following installation screens.</li> <li>Set your hostname (name of the computer) to <big>'''f17host'''</big> (one word, no space, all lowercase).</li> <li>Set your time zone to '''Toronto'''. Note that the system (BIOS) clock is set to local time, not UTC.</li> <li>Root Password: enter a password of your own choosing. Pick one that is hard to guess to protect your system. (Recommendation: use the first letter and all the punctuation from a favorite phrase or song verse. For example, "To be or not to be, that is the question!" could become the password "Tbontb,titq!").</li> </ol> === Part 2: Partitioning === {{Admon/tip |You're supposed to use this hard drive only for this course| But if you really need to use it for two courses, and the professor for the other (probably windows) course will allow it - ask your professor for help with partitioning.}} <ol> <li>If you get a warning with something like "This device may contain data" - it's probably your new hard drive and you can safely use it.</li> <li>Select '''Create Custom Layout''', we don't want to use the Fedora default setup now.</li> <li>On your drive you will need at least the following partitions. These may be primary partitions or logical drives. If you have more space than 250GB available - you can add the extra space in equal parts to /home and /var/lib/libvirt/images</li> <ul><li>'''20GB''' for '''/''' (i.e. "root")</li> <li>'''30GB''' for /home</li> <li>'''8GB''' for '''swap''' (Note: "swap" must be selected from the drop down menu)</li> <li>'''100GB''' for '''/var/lib/libvirt/images'''</li></ul> <li>Record briefly in your lab logbook what partitions you created of what size and what device names were assigned to them (/dev/sda1, etc.).</li></ol> === Part 3: Completing Installation === <ol> <li>Select in the next screen the '''Graphical Desktop''' applications, and in the additional repositories section (at the bottom) accept the default settings, then proceed. You may look at what's available if you choose "Customize now" but you don't need to customize the software installed at this point.</li> <li>Add in your lab logbook a brief description of the term "software repository" and what its major purpose serves (what you think it does). We will not add any existing repositories since we are not currently connected to the Internet. Therefore, we will customize the repositories later.</li> <li>'''Proceed with the installation. This may take some time'''. Record in your lab log-book the <u>general</u> steps in the installation process (displayed in the dialog box).</li> <li>When installation is complete, a screen will confirm completion, and ask the user to remove the DVD, and reboot the computer. Write in your lab log-book the time it took to perform this DVD Fedora install.</li> <li>Remove the Fedora Installation DVD, and click '''Reboot'''.</li> <li>When the system starts, set or accept the time and date default.</li> <li>Create a user account for yourself using the same user ID as your learn account, and create a suitable password.</li> <li>Normally, you would want to enable '''Network Time Protocol''', but since we will be experimenting with the networking turned off in later labs, '''leave it disabled'''.</li> <li> Click on '''Do Not Send Hardware Profile'''.</li> <li>Finish the post-installation customization, wait for the login screen to appear, and then login to your computer account and your created (i.e. your name).</li> <li>Proceed to Investigation 2</li> </ol> '''Answer the Investigation 1 observations / questions in your lab log book.''' ==Investigation 2: How many file packages and files are installed on the system?== '''For the rest of the tasks in this lab, you must login to your installed Fedora system using your Learn account, open a terminal and execute the following listed Linux commands to obtain information for your lab-logbook''' (lab1). If you get a Permission Denied message when trying to execute a command, then switch to the '''superuser''' account by running the command '''su -''' and type in your password for "root" (since you are the main administrator for your Fedora system). Once the intended command is executed, type "exit" to exit from the superuser account and return to your regular Learn account. {{Admon/important|Using Superuser Privilege|Throughout this course, you may need to execute commands using the privileges of the the administrative user (username "root", also called the "superuser"). To switch from your account to the root account, type the command: <code>su</code> After switching user notice and make note of the change in your shell prompt. Also note the difference in output for the <code>whoami</code> and<code>pwd</code> commands. '''Whenever this is required, make a note of it, and determine why superuser privilege is required.''' When you are finished using the root account type exit to return to your previous account. '''Avoid using the superuser account unless absolutely necessary, because the superuser account has unlimited privilege and a typo can destroy your system.''' In some documentation, you may see the command <code>su -</code> used in place of <code>su</code>. The dash argument causes <code>su</code> to go through the steps that would normally be performed when the root user logs in, including (1) running the startup scripts (such as<code>/etc/profile</code> and <code>/root/.bash_profile</code> and (2) changing to the root user's home directory (<code>/root</code>). Note that the root user's home directory (<code>/root</code>) is ''not'' the same as the root directory of the system (<code>/</code>). It is also in a different directory than the rest of the home directories, which are typically in <code>/home</code> -- the reason for this is that <code>/home</code> is sometimes on a network filesystem shared by another server (as is the case on Matrix), and it's important that the system administrator be able to log in to the system even if the network is not operating normally.
}}
{{Admon/tip | Flash drives with no partition table Rusty Issuing Linux commands since ULI101?| If your device name ends To be an effective Linux administrator, you need to become comfortable on issuing Linux commands in a letter shell, and use resources to quickly learn how to properly formulate Linux commands...<br /><br />You can run the following online tutorials to practice (refresh) issuing Linux commands. These tutorials were designed for another course called "OPS435", but you can still use them for examplepractice. Simply open a shell, it is SSH into the Matrix server (eg. ssh yourusername@matrix.senecac.on.ca) and run the following 4 tutorials (you can copy and paste these separate pathnames and run like a program):<br /><codebr />'''/devhome/sdbops435/tutorials/tutorial1<br /code> instead of /home/ops435/tutorials/tutorial2<codebr />/devhome/ops435/tutorials/sdb1tutorial3<br /code>), add /home/ops435/tutorials/vi-tutorial'''<codebr />-I<br /code> You can also refer to the <code>mkfs</code> commands in this section. This is because your USB flash drive does not have a partition table, which normally causes an error; above called '''Linux Command Online Reference''' to see how use use the <code>-I</code> option tells mkfs following Linux commands to proceed anywaysobtain the required information.}}
# Unmount To check the network configuration settings obtained from the DHCP server, run the following commands, describing the output in your USB flash drive.# Enter the commandlog book: <code>mkfs -t ext3 /dev/sdb1</code>#* What is the purpose of this command? Use the man page for mkfs to research what you did with this command.'''ifconfig'''#* Did we execute the command on the device name or the mount point?'''route'''# Attempt to mount * '''nslookup''' (at the USB flash drive using the command you used in Investigation 1. What was the result?# Check the man page for the mount command to see how to change your command to mount the device correctly> prompt, and issue that command.# Once enter the device is mounted word "server" (do a long directory listing of the mount point. What has changed?# Do an internet search to find out what the <code>lost+found</code> directory is for. Record your findings in your notes.# Create a new file on not type the device using the same technique used in Investigation 1.# Unmount the device quotes) and remount it on record the original mount pointoutput. Is the new file there?# Type the command mount and observe the type value for the USB flash drive filesystem. Compare this value exit to the type found in Investigation 1leave nslookup).# Change your current working directory to where the device is mounted.# Attempt to unmount the USB flash drive. What was the result? Why? Record your findings in your notes.# Solve the error and unmount the device.# Consult the man pages for <code>mkfs<br /code> and <code>mkfs.ext3<br /code> to see how to reformat the device to a ext3 file system with a volume label that is the same as your learn ID.# Enter the command to reformat Find the device.# The <code>dumpe2fs /dev/sdb1</code> command will allow us to see detailed following information about ext3 filesystems. Use it to confirm your volume label is correct and record in the size output of your journal.# Mount the device again as an ext3 filesystem.above commands:# While the device is still mounted reformat * '''MAC address''' (physical or hardware address) of the device as a vfat filesystem. What error message did you receive? Why? Record your conclusions in your notes.ethernet network interface# Unmount the device and format it as vfat.* '''Subnet mask'''# Now you will investigate what happens when you copy files to * '''The IP address''' (logical address) assigned by the device name rather than the mount point. Issue the command cp /etc/hosts /dev/sdb1DHCP server# Now mount your device. Was it successful? Try mounting it as ext3. Was it successful? What has happened to the filesystem on the device?* '''The default route''' (gateway)# Reformat it as vfat and mount it.# Unmount the device.* '''The DNS nameserver'''
# Who is Linus TorvaldsHow many packages were installed?# How many files (correct to the nearest hundred) were installed?# How many users were created automatically on your system (do not count your learn account)?# Name 3 open source software projects widely used todayWhat is your learn account's UID and GID?# What license agreement does GNU/Linux useis your learn account's home directory?# What are is the home directory for the 4 basic software freedoms that define user "Free Softwareroot"?# Who makes up How do you determine the Fedora Communityhost name of your GNU/Linux workstation?# Name 4 other significant Linux "Distros"What command can display the NIC's MAC address?