0% found this document useful (0 votes)
31 views5 pages

Laboratory #3 (Linux Server)

This document outlines a laboratory exercise focused on installing and configuring a Linux server using VirtualBox and Ubuntu Server. It includes detailed tasks for installation, basic configuration, setting up a LAMP stack, user management, and troubleshooting, along with reflection questions. The lab aims to provide hands-on experience with Linux server management and its applications in web hosting and enterprise environments.

Uploaded by

Squall Lionheart
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)
31 views5 pages

Laboratory #3 (Linux Server)

This document outlines a laboratory exercise focused on installing and configuring a Linux server using VirtualBox and Ubuntu Server. It includes detailed tasks for installation, basic configuration, setting up a LAMP stack, user management, and troubleshooting, along with reflection questions. The lab aims to provide hands-on experience with Linux server management and its applications in web hosting and enterprise environments.

Uploaded by

Squall Lionheart
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

Laboratory #3

Linux Server Installation and Configuration

Learning Objectives
1. Install a Linux Server distribution in a virtual machine.
2. Configure basic system settings (hostname, static IP address).
3. Manage the system using the command line interface (CLI).
4. Install and configure Apache web server, PHP, and MySQL.
5. Understand the role of Linux servers in enterprise and web hosting environments.

Lab Setup Requirements


• Software/Tools:
o VirtualBox
o Ubuntu Server ISO (20.04 LTS or later)
• Hardware Requirements:
o Host PC: 8 GB RAM minimum, 50 GB free disk space (Physical PC)
o Allocate to VM: 2 GB RAM, 20 GB disk, 1–2 vCPUs
Laboratory Tasks
Part 1: Install Linux Server
1. Create a new VM in VirtualBox/VMware.
o Name: LINUX-SERVER
o Type: Linux → Ubuntu (64-bit)
2. Mount the Linux Server ISO and boot.
3. During installation:
o Choose English as the language.
o Set hostname: linux-server01.
o Create user:
▪ Username: student
▪ Password: Student@123
o Use Guided partitioning with entire disk.
o Select OpenSSH server for remote access.
4. Finish installation and reboot.
Note: Screenshot Needed. Students should log in with their username and password.
Part 2: Basic Configuration
1. Update system packages:
2. sudo apt update && sudo apt upgrade -y
3. Set a static IP address: (Depende sa ISP)
o Edit netplan config file:
o sudo nano /etc/netplan/01-netcfg.yaml
o Example config:
o network:
o version: 2
o ethernets:
o ens33:
o dhcp4: no
o addresses: [192.168.1.20/24]
o gateway4: 192.168.1.1
o nameservers:
o addresses: [8.8.8.8, 1.1.1.1]
o Apply changes:
o sudo netplan apply
4. Verify IP address:
5. ip addr show
6. Test connectivity:
7. ping -c 4 google.com
Note: Screenshot Needed. Students should confirm static IP is working and internet is
reachable.
Part 3: Install Web Server (LAMP Stack)
1. Install Apache:
2. sudo apt install apache2 -y
Test by opening http://192.168.1.20 in the host machine’s browser.
3. Install PHP:
4. sudo apt install php libapache2-mod-php -y
Create test file:
echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/info.php
Open http://192.168.1.20/info.php to verify PHP.
5. Install MySQL:
6. sudo apt install mysql-server -y
Secure MySQL installation:
sudo mysql_secure_installation
Note: Screenshot Needed. Apache, PHP, and MySQL should be installed and running.

Part 4: Basic User and Service Management


1. Create a new user:
2. sudo adduser testuser
3. Add user to sudo group:
4. sudo usermod -aG sudo testuser
5. Check running services:
6. systemctl status apache2
7. systemctl status mysql
8. Restart Apache:
9. sudo systemctl restart apache2
Note: Screenshot Needed. Students should be able to manage users and services.
Part 5: Reflection and Troubleshooting
• Questions:
1. Why are Linux servers widely used in web hosting and cloud computing?
2. What are the advantages of CLI-based administration compared to GUI?
3. Why is it important to secure services like MySQL?
4. How does Linux differ from Windows Server in server management?
• Troubleshooting: (If needed)
1. If Apache doesn’t start, check which port is in use:
2. sudo lsof -i :80
3. If MySQL login fails, check service status:
4. systemctl status mysql
5. If static IP is not applied, recheck netplan YAML formatting.
Note: Use Microsoft Word.

Points System

Part 1: Installation (15 pts)

Part 2: Basic Configuration (20 pts)

Part 3: Web Server Setup (Apache, PHP, MySQL) (20 pts)

Part 4: User & Service Management (15 pts)

Part 5: Reflection Questions (15 pts)

Bonus: Troubleshooting Experience (15 pts)

You might also like