- 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_user
and the PasswordXXXXX
. - Enable SSH to Connect with your Public Key and without a Password.
- Install the
tree
utility - Install the
apache2
package
- For the user
cloud_user
, create an alias nameddata-tree
for 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-data
in the VGvg-data
. It should be 500M in size. - Create an XFS Filesystem on the LV
lv-data
in the VGvg-data
- Mount the LV
lv-data
from the VGvg-data
persistently at/data
- Create the directory
/data
- Move the directory
/var/www
and its contents to/data/
- Create a symlink named
/var/www
pointing 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/crontab
that executes the following command asroot
every minute:(you may use crontab.guru as a help)date >> /data/www/html/log.txt
- Using the
sed
-command, replace allVSHN
withVSHN AG
in the file/data/www/html/index.html
. Write the command to/data/www/html/sed-command.txt
.
- Make sure the Owner of
/data/www
and all its contents iswww-data