0% found this document useful (0 votes)
38 views11 pages

Lab 1

The document outlines a lab exercise for installing a Core Linux Operating System on a server using virtualization tools like Oracle VM VirtualBox or VMWare Workstation with CentOS Linux. It includes detailed steps for creating a virtual machine, partitioning the virtual drive for security and performance, and completing the installation while providing specific deliverables such as a lab report and assessments. Additionally, it addresses key questions related to system time synchronization, the root user, and the importance of partitioning in a Linux environment.

Uploaded by

2dp6ks8jn6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views11 pages

Lab 1

The document outlines a lab exercise for installing a Core Linux Operating System on a server using virtualization tools like Oracle VM VirtualBox or VMWare Workstation with CentOS Linux. It includes detailed steps for creating a virtual machine, partitioning the virtual drive for security and performance, and completing the installation while providing specific deliverables such as a lab report and assessments. Additionally, it addresses key questions related to system time synchronization, the root user, and the importance of partitioning in a Linux environment.

Uploaded by

2dp6ks8jn6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

OSP201 Open Source Platform and Network Administration

LAB 1
Installing a Core Linux Operating System on a Server
Object of LAB1:
− Create a virtual machine and mount an installation ISO file.
− Partition a Linux hard disk for security hardening, performance, and application
support.
− Install Linux in the most secure manner.

A. Tools and Software


The following software and/or utilities are required to complete this lab. Students are encouraged to
explore the Internet to learn more about the products and tools used in this lab.

• Oracle VM Virtual Box or VMWare Workstation.


• CentOS Linux.

B. Deliverables
Upon completion of this lab, you are required to provide the following deliverables to your instructor:

• Lab Report file including screen captures of the following steps:


o Part 1, Steps 11 and 24;
o Part 2, Steps 14 and 42;
o Part 3, Step 26;
• Lab Assessments file.
• Optional: Challenge Questions file, if assigned by your instructor.

C. Hand-on Steps
I. Part 1: Create a Virtual Machine
1. double-click the Oracle VM VirtualBox icon to open the Oracle VM VirtualBox hypervisor.

2. From the Oracle VM VirtualBox Manager toolbar, click the New icon to begin the process
of creating a new virtual machine.

Lab1 thainvt@fe.edu.vn Page 1 of 11


OSP201 Open Source Platform and Network Administration

3. In the Create Virtual Machine Wizard, in the Name and operating system window, type
yourname, replacing yourname with your own name, in the Name text box.
4. From the Type drop-down list, select Linux.
5. From the Version drop-down list, select Other Linux (32 bit) and click Next to continue.
6. On the Memory size page, slide the memory handle to 1024 MB and click Next.
7. In the Hard drive page, accept the default (Create a virtual hard drive now) and click
Create to continue.
8. On the Hard drive file type page, accept the default VDI (VirtualBox Disk Image) and
click Next to continue.
9. On the Storage on physical hard drive page, accept the default (Dynamically allocated)
and click Next to continue.
10. On the File location and size page, type 20GB in the hard drive size box and click Create to
specify a size.

11. Make a screen capture showing the new virtual machine and paste it into the Lab Report file.
12. In the Oracle VM VirtualBox Manager console, click the Settings icon to configure the new
machine.
13. In the yourname Settings window, click Storage in the left pane.
14. In the Storage Tree pane, click the Empty CD icon (in the Controller: IDE tree).
15. In the Attributes pane, click the CD icon to expand the drop-down list, and select Choose a
virtual CD/DVD disk file to add an ISO to the virtual CD.

Lab1 thainvt@fe.edu.vn Page 2 of 11


OSP201 Open Source Platform and Network Administration

16. In the Please choose a virtual optical disk file dialog box, click the Desktop icon, click the CentOS-xx-
xx-bin-DVD1.iso file, and click Open to identify the location of the ISO file.

17. In the Settings window, click System in the left pane.


18. Click the Processor tab to continue.
19. Click the Enable PAE/NX checkbox to enable the physical address extension (PAE).

20. In the Settings window, click Network in the left pane.


21. In the Attached to drop-down list, select Bridged Adapter to allow the new virtual machine full access
to the network.

Lab1 thainvt@fe.edu.vn Page 3 of 11


OSP201 Open Source Platform and Network Administration

22. Click OK to close the Settings window.


23. From the Oracle VM VirtualBox Manager toolbar, click the Start icon to turn on the new virtual
machine.
24. Make a screen capture showing the status of the new virtual machine and paste it into the Lab Report file.

II. Part 2: Partition the Virtual Drive


1. When prompted, click the blue x icon to acknowledge that the auto capture is running.

2. When prompted, click the blue x icon to acknowledge mouse integration.


3. When prompted, on the Welcome to CentOS for i386 screen, press the Tab key to move the
highlight to the Skip button and press the spacebar to skip the media test.

4. In the resulting window’s menu, click View and select Switch to Scaled Mode.
5. In the VirtualBox - Information dialog box, click Switch.
6. On the CentOS splash screen, click Next to continue the installation process.
7. On the language selection screen, accept the default selection English (English) and click Next.

Lab1 thainvt@fe.edu.vn Page 4 of 11


OSP201 Open Source Platform and Network Administration

8. On the keyboard layout screen, accept the default keyboard layout U.S. English and click Next.
9. On the storage devices screen, accept the default selection Basic Storage Devices and click Next.
Click the Yes, discard any data button to dismiss the Storage Device Warning pop-up.
10. In the hostname screen, type yourname, replacing yourname with your own name (all in lowercase
and with no spaces) in the Hostname text box, and click Next.

11. In the time zone page, select America/Los Angeles from the drop-down list, click the System Clock uses
UTC checkbox to deselect it, and click Next.
12. In the password page, type Admin@123 in the Root Password box, type Admin@123 in the Confirm
box, and click Next.
13. On the installation type page, click the Create Custom Layout radio button.
14. Make a screen capture showing the installation types and paste it into your Lab Report file.
15. Click Next to continue.
16. In the Please Select A Device page, click the Create button to create a partition.
17. In the Create Storage dialog box, accept the default Standard Partition, and click Create.
18. In the Add Partition dialog box, type /boot in the Mount Point box.
19. In the Size (MB) box, type 500 to change the size of the /boot partition and click OK to continue.

Lab1 thainvt@fe.edu.vn Page 5 of 11


OSP201 Open Source Platform and Network Administration

20. In the Please Select A Device window, click the Create button to create a second partition.
21. In the Create Storage dialog box, accept the default Standard Partition, and click Create.
22. In the Add Partition window, select swap from the Filesystem Type drop-down list.
23. In the Size (MB) box, type 4000 to change the size of the swap partition and click OK to continue.

24. In the Please Select A Device window, click the Create button to create a new partition.
25. In the Create Storage window, click the LVM Physical Volume radio button and click Create.
26. In the Size (MB) box, type 15000 to change the size of the partition and click OK to continue.
27. Your new Linux system should have the same partitions (ignore any leftover free space) as in the
following figure.

Lab1 thainvt@fe.edu.vn Page 6 of 11


OSP201 Open Source Platform and Network Administration

28. In the Please Select A Device window, click the Create button to create a new partition.
29. In the Create Storage window, click the LVM Volume Group radio button and click Create.
30. In the Make LVM Volume Group window, type vg_yourname, replacing yourname with your own
name (all in lowercase and with no spaces) in the Volume Group Name box, and click Add.

31. In the Make Logical Volume dialog box, type /var in the Mount Point box.
32. In the Size (MB) box, type 2000 to change the size of the volume and click OK.

33. In the Make LVM Volume Group box, click the Add button to add a new volume.
34. In the Make a Logical Volume dialog box, type /tmp in the Mount Point box.
35. In the Size (MB) box, type 2000 to change the size of the volume and click OK.
36. In the Make LVM Volume Group box, click the Add button to add a new volume.
37. In the Make a Logical Volume dialog box, type /home in the Mount Point box
38. In the Size (MB) box, type 2000 to change the size of the volume and click OK.
39. In the Make LVM Volume Group box, click the Add button to add a new volume.
40. In the Make a Logical Volume dialog box, type / in the Mount Point box to add a root drive.
41. In the Size (MB) box, type 8000 to change the size of the volume and click OK to view the completed
volumes.

Lab1 thainvt@fe.edu.vn Page 7 of 11


OSP201 Open Source Platform and Network Administration

42. In the Make LVM Volume Group windows, click OK to return to the Please Select A Device page.
43. Make a screen capture showing the completed partition in the Please Select A Device page and paste it into the
Lab Report file.
44. In the Please Select A Device page, click Next to continue.
45. In the Format Warnings window, click the Format button to dismiss the pop-up.
46. In the Writing storage configuration to disk window, click the Write changes to disk button to continue.
47. The virtual hard drive will be formatted and partitioned based on your selection in the previous lab
parts; this process can take several (2–5) minutes.

III. Complete the Installation and Configure Linux


1. On the boot loader page, click the Use a boot loader password checkbox to select it.
2. When prompted, type Admin@123 to set the boot loader password, type Admin@123 to confirm the boot loader
password, and click OK.
3. On the boot loader page, click Next to continue.
4. In the default installation screen, click the Minimal radio button, click the Customize now radio button (at the
bottom of the screen), and click Next.
5. When you are done reviewing the software packages, verify that no checkboxes are selected and click
Next to start the installation.

6. Close the installation window, without waiting for the installation process to complete.
7. When prompted, click the Power off the machine radio button and click OK to stop the process.
Lab1 thainvt@fe.edu.vn Page 8 of 11
OSP201 Open Source Platform and Network Administration

8. In the Oracle VM VirtualBox Manager console, click the Install Complete virtual machine to select it
and click the Start icon to open that machine in a new window.

9. When prompted, click Switch to switch to Scale mode.


10. When prompted, click the blue x icon to acknowledge that the auto capture is running.
11. When prompted, click the blue x icon to acknowledge mouse integration, and wait while the Linux
server boots up (approximately 2-5 minutes).

12. When prompted, type root and press Enter to log in as the root user.
13. At the password prompt, type Admin@123 (the same password you used for the new server you
created earlier in this lab) and press Enter.
14. At the prompt, type adduser student and press Enter to add the student account.
15. At the prompt, type passwd student and press Enter to access the password information for the student
account.

Lab1 thainvt@fe.edu.vn Page 9 of 11


OSP201 Open Source Platform and Network Administration

16. When prompted for the new password, type pass=7890 and press Enter to change the password for the
student account to pass=7890.
17. When prompted to confirm the password, type pass=7890 and press Enter.

18. At the prompt, type exit and press enter to log off the root account.
19. At the login prompt, type student and press Enter to log in as the student account.
20. At the password prompt, type pass=7890 and press Enter.
21. At the prompt, type sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0 and press Enter to configure networking
in the vi Editor with the elevated privileges of the sudo command.
22. At the password prompt, type pass=7890 (the password for the student account) and press Enter.

23. At the prompt, type su and press Enter to log in as the root user.
24. When prompted, type Admin@123 and press Enter.
25. At the prompt, type whoami and press Enter to confirm the root account is logged in.
26. Make as screen capture showing the result of the whoami command and paste it into the Lab Report file.
27. At the prompt, type sestatus and press Enter to verify that SELinux (Security Enhanced Linux) is
enabled and the current mode is enforcing.
28. At the prompt, type iptables –L and press Enter to see if the iptables firewall is running.
29. At the prompt, type ntpd –q and press Enter to set the Network Time Protocol (NTP).
30. Close the virtual lab

IV. Lab Assessment Q&A


1) During the Minimal install, NTP (Network Time Protocol) server was not installed. From a
security perspective, why is it important for a system to keep accurate time?
Note following Part 3, Step 29. System time must be synchronized with other network servers and/or an atomic-time server on the
Internet for consistent operations and valid chronology of events. Synchronized timestamps aid in searching logs for errors and
potential security breaches. Certain network services also rely on synchronized system clocks to verify security and other network
tokens across the network. If the clocks are out of sync, many services may malfunction.
2) During the install, you set a password for the root user. What is the root user, and when is it
appropriate to use this account?
Note following Part 2, Step 12. The root user is the system’s super user. This user account has access to anything and everything on
the system. Therefore, extreme care should be taken when using this account.

Lab1 thainvt@fe.edu.vn Page 10 of 11


OSP201 Open Source Platform and Network Administration

3) The Minimal installation process that was used in the lab did not include an X-Window interface.
Why is it best practice not to run X-Window in a production environment?
Note following Part 3 Step 4. In a production environment, it is recommended that you not run the X-Window environment because
it is not needed and X-Window adds both overhead and an increased security risk. In a production environment, a desktop
environment may be helpful in certain situations; however, best practice recommends setting the default runlevel to 3 in this case.
Runlevel 3 is a multi-user mode without running X-Window or any GUI services.
4) What partitioning options are available when installing CentOS?
Part 2, Step 14. Use All Space, Replace Existing Linux System(s), Shrink Current System, Use Free Space, and Create Custom
Layout.
5) Why is it important to put the swap file on a separate partition from the root (/) partition?
Note: The swap partition in Linux should be partitioned separate from the root (/) partition for performance reasons.
6) What is the significance of the swap partition in a Linux system?
Note: Swapping is necessary for two important reasons. First, when the system requires more memory than is physically available,
the kernel swaps out less frequently used pages and gives memory to the current application (or process) that needs the memory
immediately. Second, a significant number of the pages used by an application during its startup phase may only be used for
initialization and then never used again. The system can swap out those pages to free up the memory for other applications or even
for the disk cache.
7) How is the passwd file used, and what fields make up its content? Explain.
Note following Part 3, Step 15. In Linux operating systems, the /etc/passwd file is a text-based database of information about users
who may log into the system or other operating-system identities that own running processes. The /etc/passwd file is a text file with
one record per line, each describing a user account. Each record consists of seven fields separated by colons.
8) Why create a Logical Volume Manager (LVM) partition?
Note following Part 2, Step 28. LVM creates a logical physical volume and then a logical volume as a group on top of the physical
volume. From LVM, several partitions can be created, such as those for /tmp, /home, and /var. If disk space becomes an issue, LVM
can allocate more disk space to volumes from other partitions within the LVM without risking disk loss. Additional hard drives
can be added and can immediately become part of the LVM as well.

Lab1 thainvt@fe.edu.vn Page 11 of 11

You might also like