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)
}}
<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/notetip |You're supposed to use this hard drive only for this course|Disabling 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 AutoFedora 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 -mounting 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 Devices|At 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 need 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 disable perform this DVD Fedora install.</li> <li>Remove the ability 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 our linux system to automatically detect yourself using the same user ID as your learn account, and mount removeable mediacreate a suitable password. This </li> <li>Normally, you would interfere want to enable '''Network Time Protocol''', but since we will be experimenting with the learning objectives of 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 do this enter switch from your account to the root account, type the command: <code>pkill haldsu</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. '''You will need 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 do this again if 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 reboot during this labmay 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.}} Navigate through your Graphical Fedora system, '''locate and run a terminal program (in order to issue Linux commands). Issue and record the commands used and the output generated in each of the following steps:'''
<ol><li value=== Investigation 2: How do you create "13">Copy the installation log file <code>'''/root/install.log'''</code> and the file '''ps.lst''' to a vfat USB memory key, or ext3 filesystem? ==='''scp''' to your matrix account as a backup.</li></ol>
{{Admon/tip | Flash drives with no partition table Backup up to your USB Key| If When your USB key is inserted into your computer, the device is recognised and assigned a name ends in a letter (for example, it is . You can view your USB drive by issuing the command <code>ls /dev/sdb</code> instead of <code>run/devmedia/sdb1yourusername</code>), add <code>and view the mounted devices. Then you can issue a Linux command as "super-I</code> user" to copy the files to your USB device.}}<codeol>mkfs</codeli value="14"> commands in this View the section. This is because below to learn about and perform an update on your USB flash drive does not fresh Fedora install (you may have a partition table, which normally causes an error; the to find spare time to perform this install if you are running short on lab time). '''Do <codeu>-Inot</codeu> option tells mkfs proceed to proceed anywaysInvestigation 3 without performing an update'''.}}</li></ol>
{{Admon/tip | Tip: Updating Fedora| Check the man page for <code>dumpe2fs</code>The Fedora software is updated frequently to add features, fix bugs, and upgrade security.}}# Shutdown your computer. (Under '''Perform a system update to get the "System" menu)# Insert your removable SATA hard disk, remove your USB flash drive and restart latest versions of the computer. (Leave your "Live CD" packages installed in Fedora: Start the computer)# When Firefox web browser, turn off popup window blocking (select ''Edit>Preferences'', then select the computer has restarted Content tab and you have logged in. Insert your USB flash drive into uncheck the USB portbox to Block Popups), then login to SeneNET.# Open a terminal window and run the type <code>mountsu</code> command.# It is quite possible that the device name for your USB flash drive has changed from what you were using previously. Your hardware configuration is different because now you have to start a hard drive connectedshell as root. One way to determine what your USB device name is now is to look at Enter the system log. Use the tail command to view the last 20 lines of the file <code>/var/log/messagesyum update</code> There should be kernel entries ''' This will download and install all of the packages that were generated when you inserted have been updated since the deviceinstallation DVD image was created.# Create If you complete this command at Seneca it should run quite fast as Seneca College hosts a Linux ext3 filesystem on the USB device, giving it Fedora Repository mirror (a volume label copy of "Lab1", and record the following in in your logbook:#* What is the block size for the new format?#* How many blocks were created?#* How often will the new filesystem be automatically checked?#* What volume label was given to the filesystem?# According to the man page what is the purpose all of dumpe2fs?# If you executed dumpe2fs on an MS-DOS filesystem what do you think would be the result?# Mount the USB device onto the mount point /media/lab1# Copy the files <code>/etc/services</code>current fedora packages,<code>/etc/networks</code> to the USB flash driveon a local web server).}}
{{Admon/caution tip | Important/warning! Rusty Issuing Linux commands since ULI101?| The following operation will erase the contents of your hard disk. If To be an effective Linux administrator, you have any useful data stored need to become comfortable on your diskissuing Linux commands in a shell, you must back it up first or and use another hard disk that does not contain useful data on itresources to quickly learn how to properly formulate Linux commands..|Do not plan on sharing the hard disk with the Windows course! You will be doing lots of tasks that may cause you to lose your data.}}# Enter the command fdisk <br /dev><br /sda to start >You can run the hard disk partition program.# At the fdisk command prompt, enter the letter '''p''' following online tutorials to print out the current partition table of the hard diskpractice (refresh) issuing Linux commands. If there are any partitionsThese tutorials were designed for another course called "OPS435", but you can still use the '''d''' option to delete all of themfor practice. Simply open a shell, starting with SSH into the highest partition number firstMatrix server (eg. ssh yourusername@matrix.senecac.on.# At ca) and run the fdisk command prompt, use the '''n''' following 4 tutorials (you can copy and paste these separate pathnames and run like a program):<br /><br />'''t''' commands to create these three partitions: /devhome/ops435/tutorials/tutorial1<br />/home/ops435/tutorials/tutorial2<br />/home/ops435/tutorials/tutorial3<br /sda1 - 300MB (primary, Linux Native) >/devhome/sda2 - the rest of the hard disk (extended) ops435/devtutorials/sda5 vi- 300MB (logical, Linux Native) * Use the tutorial'''p''' option the display the new partition and record it in your log book.* Remember <br /><br />You can also refer to use the section above called '''wLinux Command Online Reference''' option to write see how use use the following Linux commands to obtain the new partitions required information instead of the '''q''' option to quit without saving.* Logout and restart Fedora.}}
# Your <code>/dev/sda1</code> partition Disabling SELinux on Fedora is formatted with an ext3 filesystem and contains 2 files. You can now create an "image" of that device and duplicate it.# First create an image of the device using actually quite simple, just edit the following command: #*<code>dd if=/dev/sda1 of=sda1.img</code># The image file you created is a byte by byte duplicate of the original device and all of its contents. You can even mount it as a if it was a real partition. # Make a mount point called <code>'''/mediaetc/sda1-image<selinux/code> config''' and mount the image file using change the following commandline to look like this: #* <code>mount -o loop -t ext3 sda1.img /media/sda1-image</code>#* (The <code>-o loop</code> option is used to mount regular files as if they were real block storage devices.)# List the contents of the mount point. Are your files there?# Copy the file <code>/var/log/boot.log</code> to the mount point.# Unmount the image.SELINUX=disabled
# 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?