Open main menu

CDOT Wiki β

Changes

Lab 1 Warnings / Debrief

6,555 bytes added, 14:05, 1 February 2016
no edit summary
= Preparing for Lab 1=
== Thinking Ahead Purpose of Lab1 ==
=== Bring Required Materials [[Image:hostmachine.png|thumb|right|300px|The c7host Linux server will run virtualization software to Class ===install and run 3 virtual machines (installed in lab2). ]]You need to install a Linux OS to be a host or "platform" to install and use other Linux VMs (Virtual Machines) during this course.
:* Come prepared for labs::::* The Linux OS you will be installing in this lab will be a Host Machine (''hostname'Removable SATA Drive''' ( min 250 GB ):::* '''USB Stickc7host''' ( min 8 GB ):::* that will allow you to run '''CENTOS 7 Full INSTALL DVD''':::* '''Lab 1 LogbookVirtualization Software''' to create 3 separate virtual machines (Instructor can't sign-off lab without seeing lab-book notesto be performed in lab2):::* '''Access . It is important to Lab Instructions''': printout, notebook, netbook, smartphoneinstall this host machine correctly since other labs will depend on the stability of this host machine.
=== Notes / Warnings ===
<u>Main objectives</u>:* '''Failure to properly following lab instructions may result in re-doing lab again!'''
:* Hard Disk partitions are simply smaller logical storage units '''Correctly install the CentOS 7 FULL INSTALL DVD''' (containersnot LIVE DVD) within a on your removable hard disk.
:* <u>Advantages '''Record installation characteristics of Hard Disk Partitions</u>::* Separation of operating system files from data CentOS 7 FULL INSTALL''' in a chart (easier recoverycontained in lab2 logbook chart)::* Allows for booting multiple operating systems::* Separation of Data for efficient access and sharingto compare with other installation methods performed in lab2.
:* Make certain to create the correct partitions (Have instructor or lab monitor confirm before proceeding with install):::'''Primary Partitions (ext4):::*Verify correct settings'''30GB''' for '''/''' (iprior to proceeding with host installation stages.e. "root")::*'''40GB''' for /home::*'''100GB''' for '''/var/lib/libvirt/images''' (need to manually enter this "mount-point")::'''Swap Partition:'''::*'''16GB''' (Note: "swap" must be selected from the drop down menu)
* '''Obtain Linux server information after installation''' to create a software asset report for later access. * '''Disable Linux Kernel security enhancements''' to allow easier internal networking connections (to be reactivated in a later lab). * Observe that '''Bash Shell Scripts can automate routine tasks'''.  <u>Hard Disk Partitioning</u> * '''Hard Disk partitions are simply smaller logical storage units''' (containers) within a hard disk * <u>'''Advantages of Hard Disk Partitions'''</u>:* Separation of operating system files from data (easier recovery):* Allows for booting multiple operating systems:* Separation of Data for efficient access and sharing * In Lab 1, we will be creating customized partitions (as opposed to suggested partitioning default from install program)  <u>Accessing the Administrative Account (root)</u> Many administrative tasks require the root administrative account. There are many ways to access this administration account:<ul><li>Login: '''root''' (enter root password)</li><li>Switch User to root (without login):<ul><li>'''su''': Remains in regular user's directory, does not run root's startup script(s).</li><li>'''su -''' : Changes to root's home directory (/root) and runs root's start script(s).</li></ul></li></ul> <u>Obtaining System Information</u> It is always recommended to document information regarding a newly-installed Operating System for a company or organization. This information usually contains information regarding the OS (Linux distribution, Kernel version, etc) as well as running processes, hostname, etc. The following table lists the common Linux commands to help generate this OS documentation:  {| cellpadding="5" border="1" cellspacing="0"|- valign="top"|<b>Linux Command</b>|<b>Purpose</b>|- valign="top"|''' grep -i packaging /var/log/anaconda/anaconda.packaging.log &#166; wc -l'''|Obtain information regarding the initial Linux OS installation (including installed packages)|- valign="top"|'''rpm -q -a &#166; wc -l''' |Obtain number of files required to allow package(s) to be installed|- valign="top"|'''hostname''' |Display hostname of Linux machine |- valign="top"|'''uname -rv''' |Display version of Linux kernel |- valign="top"|'''ifconfig''' |Display networking information (including IP ADDR, Netmask) |- valign="top"|'''route -n''' |Display gateway information |- valign="top"|'''nslookup''' |Display nameserver information |}   <u>Pathname for USB Stick</u> The default mount location has been changed in linux distributions newer than CentOS. So while we will get '''/media/usb-device-name''',<br> in newer distributions you'll see '''/run/media/userloginid/usb-device-name'''  <u>Disabling SELinux</u> SELinux stands for '''Security-Enhanced Linux'''. It is a component that helps to better secure the system to protect against intrusion (hackers). SELinux is enabled upon the default install of CentOS. SELinux can be a good thing, if you take care of it and know how it works. For this course it is strongly recommended that you '''disable SELinux by default''' because we won't have the time to reconfigure it every time the labs make it necessary  == Common Mistakes / Warnings == {{Admon/important |Be Aware of the Following Issues| Be aware of these common mistakes that students make that can cause problems for their future labs.}}  <u>Bring Required Materials to Class</u> : '''Come prepared for labs:''':* '''Removable SATA Drive''' ( min 250 GB ):* '''USB Stick''' ( min 8 GB ):* '''CENTOS 7 Full INSTALL DVD''':* '''Lab 1 Logbook''' (Instructor can't sign-off lab without seeing lab-book notes):* '''Access to Lab Instructions''': printout, notebook, netbook, smartphone  <u>Paritioning</u> * '''Failure to properly following lab instructions may result in re-doing lab again!''' * '''Make certain to create the correct partitions''' (Have instructor or lab monitor confirm before proceeding with install)::'''Primary Partitions (ext4)::*'''30GB''' for '''/''' (i.e. "root"):*'''40GB''' for /home:*'''100GB''' for '''/var/lib/libvirt/images''' (need to manually enter this "mount-point"):'''Swap Partition:''':*'''16GB''' (Note: "swap" must be selected from the drop down menu) * '''NOTE:''' Remember that the sizes are recorded in MB (eg. 30 GB = 30000 MB) and you should multiply GB by a factor of 1024 to get the correct size.<br> (eg. '''30 GB x 1024 = 30720 MB''')<br><br> <u>Common Types of File Systems for Linux</u> Similar to other Operating Systems like windows '''fat''' / '''vfat''' / '''ntfs''' file system types, it is good to know a few common file system types in Linux for comparison:<br><ul><li><b>xfs:</b> &nbsp; Newer filesystem (fast transfer rates for large files, Journaling)</li><li><b>ext4:</b> &nbsp; Newer filesystem supporting large files and Journaling (used in for this lab)</li><li><b>ext2:</b> &nbsp; Stable filesystem popular for databases (no journaling)</li></ul>   == Preparing for Lab Sign-Off ==[[Image:lab1_signoff.png|thumb|right|200px|Students should be prepared with a'''ll required commands (system information) displayed in a terminal (or multiple terminals) prior to calling the instructor for signoff'''.]]  '''In order to properly complete your lab and move to the next lab, you must have your instructor "sign-off" on your lab'''* Each "signed-off" lab (before due date) is worth 1% of your final grade.* Signing-off on labs help to spot errors that can cause problems with future labs.* Do you ask the instructor what to check for! Read at the bottom of the lab the requirements, and have all proof available for instructor to view at same time.* Failing to be prepared and asking instructor what to check when assignment is mark will result in deduct of marks!* For example, open multiple terminals with command results. If properly set-up ahead of sign-off, the process should only take instructor approx 20 seconds to sign-off your lab.* If you do not have your lab-logbook, you MUST show your work and your lab log-book to your instructor for sign-off in the next class. This may cause a late penalty if past the required due date.  == Lab 1 Debrief == * How many packages were installed?* How many files (correct to the nearest hundred) were installed?* How many users were created automatically on your system (regular, admin)?* List 2 ways that you can access your root account* What is the difference between the commands '''su''' and '''su -''' ?* What is the home directory for the user "root"?* How do you determine the host name of your GNU/Linux workstation?* What command can display the NIC's MAC address?* What command is used to get a list of running processes on your newly-installed system?* What is the command to copy files to your USB key?* How can Shell Scripts be used to help automate a task performed in lab1? [[Category:OPS235]][[Category:OPS235 Labs]]
13,420
edits