- On acloud.guru Playground, create Server:
- Distribution:
Ubuntu 20.04 Focal Fossa LTS - Zone:
Europe - Size:
Medium
- Distribution:
- Login on Server and do initial password change
- Add an additional Harddisk
Add /dev/nvme1n1 - Hand Server IP, user and password to the apprentice
- Connect to the server with the IP
XXXXX- use the Usercloud_userand the PasswordXXXXX. - Enable SSH to Connect with your Public Key and without a Password.
- Install the
treeutility - Install the
apache2package
- For the user
cloud_user, create an alias nameddata-treefor the commandtree /data. This alias must be persistent.
There is a Hard Disk available: /dev/nvme1n1
- Create an LVM Volume Group (VG) named
vg-data, containing this Hard Disk - Create a LVM Logical Volume (LV) named
lv-datain the VGvg-data. It should be 500M in size. - Create an XFS Filesystem on the LV
lv-datain the VGvg-data - Mount the LV
lv-datafrom the VGvg-datapersistently at/data
- Create the directory
/data - Move the directory
/var/wwwand its contents to/data/ - Create a symlink named
/var/wwwpointing to/data/www
- Download the archive
https://github.com/a-Tell/linux-test/raw/main/vshn-page.tar.gz- Extract the contents of the archive to /data/www/html/, so in the end it should look like this:/data └── www └── html ├── img │ └── vshn-logo.svg ├── index.html
- Create a cronjob in
/etc/crontabthat executes the following command asrootevery minute:(you may use crontab.guru as a help)date >> /data/www/html/log.txt
- Using the
sed-command, replace allVSHNwithVSHN AGin the file/data/www/html/index.html. Write the command to/data/www/html/sed-command.txt.
- Make sure the Owner of
/data/wwwand all its contents iswww-data