- 1 Literature
- 2 Lesson 1 (Linux history, Virtualbox, Debian instalation)
- 3 Lesson 2 (Bash script)
- 4 Lesson 3 (init process, systemd)
- 5 Lesson 4 (hard disks management, RAID)
- 6 Lesson 5 (user management, file permissions, disk quota)
- 7 Lesson 6 (networking, iptables)
- 8 Lesson 7 (LAMP, DHCP, NFS)
- 9 Final Test version A
- 10 Final Test version B
You can find much information on the internet, use Google
Lesson 1 (Linux history, Virtualbox, Debian instalation)
Install Virtualbox (www.virtualbox.org) on your computer or use Virtualbox on computer in class.
Download iso file with network installation of debian distribution of GNU/Linux. (www.debian.org)
Install debian on your virtual PC identically as in lecture.
Lesson 2 (Bash script)
- Linux and command line. http://linuxcommand.org
- Basic linux command https://maker.pro/education/basic-linux-commands-for-beginners
On your server in the /opt/SOS/villages/ directory create a directory structure where the directory name will match the names of all villages in the Czech Republic whose name contains "ova" and does not contain the word "Nova". Replace any spaces with underscores. List of villages in text form can be found here: http://seidl.cs.vsb.cz/download/seznam-obci-cr.txt
- BASH programming http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
- Advanced Bash-Scripting Guide http://tldp.org/LDP/abs/html/
- Bash Scripting Tutorial https://ryanstutorials.net/bash-scripting-tutorial/
On your server in the /opt/SOS/post/ directory, create a directory structure where the name of the directories will match the names of all the post offices in the Czech Republic whose phone number contains a 5 digit and does not contain a pocket of numbers 55. Replace any spaces with underscores. You can find a list of Czech postal text here: http://seidl.cs.vsb.cz/download/posty.csv.txt >>> "Praha 10";"10000";"Cernokostelecka 2020/20, Praha";"274774998";"274776503";"B" <<< phone number is bold In each folder, create a text file with any name. In the file, list all names of the post offices in the Czech Republic with the same number of letters as the current folder name.
Lesson 3 (init process, systemd)
Create a bash script and serviced for systemd. The script scans all the subdirectories in the / home folder. If it finds a file whose name ends in * .backup, it moves this file to the / backup directory. Use find to search.
Create a bash script and serviced for systemd. The script finds the size of all directories in the / home folder. If the size of one of the directories is larger than 1kB, a file named "THE MAX FILE SIZE HAS BEEN EXCEEDED" will be placed in this folder.
Lesson 4 (hard disks management, RAID)
Add another four SATA drives to your virtualized PC. Create a RAID 5 with one spare disk above them. Create file system ext4 on raid a mount raid to /home folder. Copy all data. Modify the / etc / fstab file so that the raid connection to the / home automatically happens after the system starts. Try set one disk from raid as demage, and check if raid work correctly.
Lesson 5 (user management, file permissions, disk quota)
Test user file: http://seidl.cs.vsb.cz/download/jmena.txt
Create a script that creates 50 users in your virtualized PC. Generate and set the primary password for each user. After the first user logon, please force a new password. Define disk quotas for all newly created users.
Lesson 6 (networking, iptables)
Configure your virtual machine so that the "hostonly" interface receives a static IP address after the PC restarts. Create a startup script that initializes the firewall using iptables. The default policy for INPUT will be DROP. Disable all traffic to the server (INPUT), enable only tcp port ports 80 and 443. Only enable port 22 from defined IPs. Configure SNAT for all packets coming out of the enp0s3 interface.
Lesson 7 (LAMP, DHCP, NFS)
Install MySQL in debian
https://httpd.apache.org/ https://www.isc.org/downloads/dhcp/ http://nfs.sourceforge.net/nfs-howto/ar01s03.html
Install on your virtual PC LAMP server and run Mediawiki.
Minimum points from Final test is 30. Maximum is 50.
You can use all information source (webpage, own notes, books).
Please, during the test do not use any online communication!
The test lasts 2 hours.
Final Test version A
* ( 5p) Create clear virtual PC and install Debian 9 on virtual PC as small installation (insrtall only ssh package during installation proces) * (10p) Add next 3 disks and create RAID1 with one SpareDisk * ( 5p) Format the Raid as EXT4 file system, and mount the RAID as /home directory (correctly edit file /etc/fstab) * (10p) Write script an bash language, create 100 users, with default pasword a add user quota for all new users * ( 5p) Create group “share” and add 5 users to this group * ( 5p) Create directory /share with all permission for group share and set no permission for others * (10p) Install LAMP server, and run Mediawiki * (10p) Write script in bash language, set firewall in this script, set default policy in INPUT chain as DROP, enable connection to the web server only from defined network * ( 5p) Create service Firewall and start your script with previous item after computer started
Final Test version B
* ( 5p) Create clear virtual PC and install Debian 9 on virtual PC as small installation (insrtall only ssh package during installation proces) * (10p) Add next 3 disks and create RAID5 without one SpareDisk * ( 5p) Format the Raid as EXT4 file system, and mount the RAID as /home directory (correctly edit file /etc/fstab) * (10p) Write script an bash language, create 100 users, with clear pasword a add user quota for all new users * ( 5p) Create group “student” and add 5 users to this group * ( 5p) Create directory /student with all permission for group student and set no permission for others * (10p) Install LAMP server, and run Mediawiki * (10p) Write script in bash language, set firewall in this script, set default policy in OUTPUT chain as DROP, enable connection to the web server only from 10 defined address * ( 5p) Create service Firewall and start your script with previous item after computer started