Magnesium-Server

bin noch mit der Einrichtung beschäftigt.

<hi #ffc90e>Hier soll definitiv die einzelnen Schritte beschrieben werden und was man anpassen/aufpassen muss. Muss nicht super detaiert sein, aber so, dass jemand “normales” es versteht. </hi>

Later on you would just have to copy the files from a gitea location

Prerequsities

a working computer

USB thumb drive with at least 4GB of space (it will be formatted in the process)

Install Media Creation

If you don’t already have a boot drive ready, go to their website and download their latest stable .iso from there. From that you have to create a boot drive. Because you are most probably a windows user, download Etcher (also latest) and install it. It doesn’t matter whether you use the portable or the installer version. The pros of the portable version are, that you can use the program shortly after you’ve downloaded it. Run the program, choose your prefered drive to install the boot-media onto and choose the Debian .iso you‘ve downloaded earlier. Click „write“ when everything is selected correctly. This process might take a while. Insert the USB-Drive with the installation-media into the future server, after the flashing process finished. While starting the Server, make sure to repeatedly hit „F12“ or „entf“ to get into the boot menu.

Installation of Debian (RAID1)

Go through the installer with your desired configuration until you get choose the installation disk. At some point you will be asked to choose login data etc., choose the following:

login: magnesium

password: standard magnesium password

root-login: root

password: <hidden>HMaser</hidden>

name of the computer: thingol

Preparing our Drives

Choose to manually partition the disk. Next choose the first of your future RAID Drives in the installer to create an empty partition. Repeat the process for the second drive. Now choose to configure software RAID on the screen and confirm your two partitioned drives. The screen should look like this: Continue and choose to create a MD device. Select RAID on the next screen. You will be asked for the following drive configurations:

Number of active devices: 2

Number of spare drives: 0

Active drives: the two drives you partitioned earlier

Confirm your configuration and finish disk partitioning.

LVM Configuration

Next up we have to configure the Logical Volume Manager. For that select it from the menu and continue: Select yes, when asked to keep the current partition layout and continue. Now we are creating a new volume group: Choose a name for the volume group afterwards and continue. On the next screen you will select the previously created MD device. Confirm to keep the partition layout afterwards. Next create the first logical volume and name it root. Choose about 900G as the Volume Size. It might vary depending on your choosen hdd. Calcute your need beforehand. Repeat the steps for the second LV and name it swap with 4G as the volume size. Confirm and finish afterwards. Next up, format root volume. Select the root volume that was created previously. Pay attention to the name next to the LV. During this installation it should be “LV root”. Click continue. Select “Do not use” for the “Use as” setting for the partition. Continue with Ext4 journaling file system. Next set the Mount point to “/ - root file system”. Confirm with the option Done setting up the partition. Now we will do the same for swap. Choose it from the shown list: Choose to use it as swap area. It should look like this in the end: Finish and confirm your setup:

In the end choose to install Debian on the root partition.

Installing Software

After you are greeted with the desktop of our debian installation, start the terminal and update the system:

sudo apt update sudo apt upgrade

Config Files

There are three basic steps to follow:

install Debian in RAID

install all the programs (Docker, Grafana, influxdb)

get the configuration and all the connections running