More language highlighting

This commit is contained in:
RealStickman 2022-12-16 11:50:40 +01:00
parent 78eec895b0
commit a6c40777f9
6 changed files with 226 additions and 145 deletions

View File

@ -4,62 +4,72 @@ visible: true
--- ---
[toc] [toc]
## Keyboard layout ## Keyboard layout
`loadkeys de_CH-latin1`
`loadkeys de_CH-latin1`
## Check UEFI mode ## Check UEFI mode
If the following command works, the system is booted in EFI. If the following command works, the system is booted in EFI.
`ls /sys/firmware/efi/efivars` `ls /sys/firmware/efi/efivars`
## Verify internet connection ## Verify internet connection
`ping www.realstickman.net`
`ping www.realstickman.net`
## Update system clock ## Update system clock
`timedatectl set-ntp true`
`timedatectl set-ntp true`
## Creating partitions ## Creating partitions
`cfdisk`
`cfdisk`
Use `EFI System` for EFI partition Use `EFI System` for EFI partition
Use `Linux filesystem` for other partitions Use `Linux filesystem` for other partitions
## (LUKS) Create encrypted partition ## (LUKS) Create encrypted partition
*Note: Do not put your /efi partition on an encrypted partition!*
_Note: Do not put your /efi partition on an encrypted partition!_
Create encrypted Partition Create encrypted Partition
`cryptsetup luksFormat /dev/(partition) --type luks1` `cryptsetup luksFormat /dev/(partition) --type luks1`
To view if this worked correctly To view if this worked correctly
`cryptsetup luksDump /dev/(partition)` `cryptsetup luksDump /dev/(partition)`
Open the partition Open the partition
Give it a fitting name Give it a fitting name
`cryptsetup open /dev/(partition) (name)` `cryptsetup open /dev/(partition) (name)`
Check if this worked with `ls /dev/mapper/` Check if this worked with `ls /dev/mapper/`
The name should show up there The name should show up there
## Format partitions ## Format partitions
Fat 32: Fat 32:
`mkfs.fat -F32 /dev/(partition)` `mkfs.fat -F32 /dev/(partition)`
*For EFI or BOOT partition* _For EFI or BOOT partition_
Ext4: Ext4:
`mkfs.ext4 /dev/(partition)` `mkfs.ext4 /dev/(partition)`
*All other partitions* _All other partitions_
btrfs: btrfs:
`mkfs.btrfs /dev/(partition)` `mkfs.btrfs /dev/(partition)`
*All other partitions* _All other partitions_
F2FS: F2FS:
`mkfs.f2fs -O extra_attr,inode_checksum,sb_checksum,compression /dev/(partition)` `mkfs.f2fs -O extra_attr,inode_checksum,sb_checksum,compression /dev/(partition)`
*All other partitions* _All other partitions_
## Mounting partitions ## Mounting partitions
Generally partitions have to be mounted where you will later use them in your system. Generally partitions have to be mounted where you will later use them in your system.
BTRFS with its subvolumes is a special case BTRFS with its subvolumes is a special case
For EFI, prefer the /efi mountpoint For EFI, prefer the /efi mountpoint
``` ```
Root: /mnt Root: /mnt
EFI: /mnt/efi or /mnt/boot EFI: /mnt/efi or /mnt/boot
@ -68,39 +78,40 @@ etc...
``` ```
### (BTRFS) Btrfs preparation of subvolumes and mounting ### (BTRFS) Btrfs preparation of subvolumes and mounting
Mount root partition Mount root partition
`mount /dev/(partition) /mnt` `mount /dev/(partition) /mnt`
Root subvolume Root subvolume
`btrfs subv create /mnt/@` `btrfs subv create /mnt/@`
Home subvolume Home subvolume
`btrfs subv create /mnt/@home` `btrfs subv create /mnt/@home`
Snapshots subvolume for snapper Snapshots subvolume for snapper
`btrfs subv create /mnt/@snapshots` `btrfs subv create /mnt/@snapshots`
Snapshots subvolume for timeshift Snapshots subvolume for timeshift
`btrfs subv create /mnt/@timeshift` `btrfs subv create /mnt/@timeshift`
Var subvolume Var subvolume
`btrfs subv create /mnt/@var_log` `btrfs subv create /mnt/@var_log`
*If you want to use a swapfile with Snapper, create a new subvolume now* _If you want to use a swapfile with Snapper, create a new subvolume now_
Swap subvolume Swap subvolume
`btrfs subv create /mnt/@swap` `btrfs subv create /mnt/@swap`
`umount /mnt` `umount /mnt`
Mount root Mount root
`mount -o noatime,compress-force=zstd,space_cache=v2,subvol=@ /dev/(partition) /mnt` `mount -o noatime,compress-force=zstd,space_cache=v2,subvol=@ /dev/(partition) /mnt`
With /efi With /efi
`mkdir -p /mnt/{efi,home,.snapshots,var/log,swap}` `mkdir -p /mnt/{efi,home,.snapshots,var/log,swap}`
With /boot With /boot
`mkdir -p /mnt/{boot,home,.snapshots,var/log,swap}` `mkdir -p /mnt/{boot,home,.snapshots,var/log,swap}`
With /boot and timeshift With /boot and timeshift
`mkdir -p /mnt/{boot,home,timeshift-btrfs,var/log,swap}` `mkdir -p /mnt/{boot,home,timeshift-btrfs,var/log,swap}`
Mount home Mount home
`mount -o noatime,compress-force=zstd,space_cache=v2,subvol=@home /dev/(partition) /mnt/home` `mount -o noatime,compress-force=zstd,space_cache=v2,subvol=@home /dev/(partition) /mnt/home`
@ -108,118 +119,140 @@ Mount home
Mount snapshots for snapper Mount snapshots for snapper
`mount -o noatime,compress-force=zstd,space_cache=v2,subvol=@snapshots /dev/(partition) /mnt/.snapshots` `mount -o noatime,compress-force=zstd,space_cache=v2,subvol=@snapshots /dev/(partition) /mnt/.snapshots`
Mount snapshots for timeshift Mount snapshots for timeshift
`mount -o noatime,compress-force=zstd,space_cache=v2,subvol=@timeshift /dev/(partition) /mnt/timeshift-btrfs` `mount -o noatime,compress-force=zstd,space_cache=v2,subvol=@timeshift /dev/(partition) /mnt/timeshift-btrfs`
Mount var Mount var
`mount -o noatime,compress-force=zstd,space_cache=v2,subvol=@var_log /dev/(partition) /mnt/var/log` `mount -o noatime,compress-force=zstd,space_cache=v2,subvol=@var_log /dev/(partition) /mnt/var/log`
Swap subvolume Swap subvolume
`mount -o noatime,compress-force=zstd,space_cache=v2,subvol=@swap /dev/(partition) /mnt/swap` `mount -o noatime,compress-force=zstd,space_cache=v2,subvol=@swap /dev/(partition) /mnt/swap`
**Don't forget mounting other partitions!!** **Don't forget mounting other partitions!!**
### (F2FS) Mounting ### (F2FS) Mounting
Mount partition with compression algorithm specified Mount partition with compression algorithm specified
`mount -o compress_algorithm=zstd /dev/(partition) /mnt` `mount -o compress_algorithm=zstd /dev/(partition) /mnt`
With /efi With /efi
`mkdir -p /mnt/efi` `mkdir -p /mnt/efi`
With /boot With /boot
`mkdir -p /mnt/boot` `mkdir -p /mnt/boot`
**Don't forget mounting other partitions!!** **Don't forget mounting other partitions!!**
## Swap ## Swap
### Swap partition ### Swap partition
TODO TODO
### Swapfile ### Swapfile
#### Normal way #### Normal way
**NOT FOR BTRFS!** **NOT FOR BTRFS!**
`dd if=/dev/zero of=/mnt/swapfile bs=1M count=(size) status=progress` `dd if=/dev/zero of=/mnt/swapfile bs=1M count=(size) status=progress`
#### (BTRFS) Swapfile in btrfs #### (BTRFS) Swapfile in btrfs
*Does not work with snapper*
*Use a separate subvolume in that case*
`truncate -s 0 /mnt/swapfile`
`chattr +C /mnt/swapfile` _Does not work with snapper_
_Use a separate subvolume in that case_
`truncate -s 0 /mnt/swapfile`
`btrfs property set /mnt/swapfile compression none` `chattr +C /mnt/swapfile`
`fallocate -l (size)M /mnt/swapfile` `btrfs property set /mnt/swapfile compression none`
`fallocate -l (size)M /mnt/swapfile`
#### Initialising swapfile #### Initialising swapfile
`chmod 600 /mnt/swapfile`
`mkswap /mnt/swapfile` `chmod 600 /mnt/swapfile`
`swapon /mnt/swapfile` `mkswap /mnt/swapfile`
`swapon /mnt/swapfile`
## Essential packages ## Essential packages
Some things like the userspace utilities for file management will vary. Some things like the userspace utilities for file management will vary.
See [file systems](https://wiki.archlinux.org/index.php/File_systems#Types_of_file_systems) See [file systems](https://wiki.archlinux.org/index.php/File_systems#Types_of_file_systems)
`pacstrap /mnt base linux linux-firmware vim git openssh networkmanager network-manager-applet dialog base-devel linux-headers` `pacstrap /mnt base linux linux-firmware vim git openssh networkmanager network-manager-applet dialog base-devel linux-headers`
### Microcode ### Microcode
`amd-ucode`
`intel-ucode` `amd-ucode`
`intel-ucode`
### Filesystems ### Filesystems
Fat32: Fat32:
`dosfstools mtools` `dosfstools mtools`
Ext4: Ext4:
`e2fsprogs` `e2fsprogs`
Btrfs: Btrfs:
`btrfs-progs compsize` `btrfs-progs compsize`
F2FS: F2FS:
`f2fs-tools` `f2fs-tools`
### Wifi ### Wifi
`wpa_supplicant`
`wpa_supplicant`
### Snapper ### Snapper
`snapper`
`snapper`
### Certificates ### Certificates
`ca-certificates ca-certificates-mozilla`
`ca-certificates ca-certificates-mozilla`
### other ### other
`cups hplip xdg-utils xdg-user-dirs inetutils`
`cups hplip xdg-utils xdg-user-dirs inetutils`
## Generate fstab ## Generate fstab
`genfstab -U /mnt >> /mnt/etc/fstab` `genfstab -U /mnt >> /mnt/etc/fstab`
**Make sure the fstab file has everything included** **Make sure the fstab file has everything included**
## Chroot into the system ## Chroot into the system
`arch-chroot /mnt`
`arch-chroot /mnt`
## Set timezone ## Set timezone
`ln -sf /usr/share/zoneinfo/Europe/Zurich /etc/localtime`
`ln -sf /usr/share/zoneinfo/Europe/Zurich /etc/localtime`
## Set hardware clock ## Set hardware clock
`hwclock --systohc`
`hwclock --systohc`
## Set locale ## Set locale
`vim /etc/locale.gen` `vim /etc/locale.gen`
Uncomment the locales that should be generated. Uncomment the locales that should be generated.
Make sure to use a UTF-8 entry. Make sure to use a UTF-8 entry.
`locale-gen` `locale-gen`
`echo "LANG=de_CH.UTF-8" > /etc/locale.conf` `echo "LANG=de_CH.UTF-8" > /etc/locale.conf`
## Set keymap permanently ## Set keymap permanently
`echo "KEYMAP=de_CH-latin1" > /etc/vconsole.conf`
`echo "KEYMAP=de_CH-latin1" > /etc/vconsole.conf`
## Set hostname ## Set hostname
`echo "(hostname)" > /etc/hostname`
Edit `/etc/hosts` `echo "(hostname)" > /etc/hostname`
Edit `/etc/hosts`
``` ```
127.0.0.1 localhost 127.0.0.1 localhost
::1 localhost ::1 localhost
@ -227,121 +260,134 @@ Edit `/etc/hosts`
``` ```
## Change root password ## Change root password
`passwd`
`passwd`
## Bootloader installation ## Bootloader installation
### GRUB UEFI ### GRUB UEFI
`pacman -S grub efibootmgr`
If you are using encryption, see the next section first. **Make sure to come back here again though** `pacman -S grub efibootmgr`
`grub-install --target=x86_64-efi --efi-directory=(efi partition mountpoint) --bootloader-id=GRUB`
`grub-mkconfig -o /boot/grub/grub.cfg` If you are using encryption, see the next section first. **Make sure to come back here again though**
`grub-install --target=x86_64-efi --efi-directory=(efi partition mountpoint) --bootloader-id=GRUB`
`grub-mkconfig -o /boot/grub/grub.cfg`
#### (LUKS) Encryption with /efi #### (LUKS) Encryption with /efi
Create keyfile and add it to mkinitcpio.conf
`dd bs=512 count=4 if=/dev/random of=/crypto_keyfile.bin iflag=fullblock`
`chmod 600 /crypto_keyfile.bin` Create keyfile and add it to mkinitcpio.conf
`dd bs=512 count=4 if=/dev/random of=/crypto_keyfile.bin iflag=fullblock`
`chmod 600 /crypto_keyfile.bin`
**This command should be run after installing a new kernel!** **This command should be run after installing a new kernel!**
`chmod 600 /boot/initramfs-linux*` `chmod 600 /boot/initramfs-linux*`
`cryptsetup luksAddKey /dev/(partition) /crypto_keyfile.bin` `cryptsetup luksAddKey /dev/(partition) /crypto_keyfile.bin`
Include the file in `/etc/mkinitcpio.conf` Include the file in `/etc/mkinitcpio.conf`
`FILES=(/crypto_keyfile.bin)` `FILES=(/crypto_keyfile.bin)`
Edit the `HOOKS` section as well. *Example:* Edit the `HOOKS` section as well. _Example:_
`HOOKS=(base udev autodetect keyboard keymap modconf block encrypt filesystems fsck)` `HOOKS=(base udev autodetect keyboard keymap modconf block encrypt filesystems fsck)`
`mkinitcpio -p linux` `mkinitcpio -p linux`
Edit `/etc/default/grub` Edit `/etc/default/grub`
`GRUB_ENABLE_CRYPTODISK=y` `GRUB_ENABLE_CRYPTODISK=y`
Some options in `GRUB_CMDLINE_LINUX_DEFAULT` Some options in `GRUB_CMDLINE_LINUX_DEFAULT`
**Make sure to change /dev/(partition) to UUID ASAP!** **Make sure to change /dev/(partition) to UUID ASAP!**
*Not sure how to actually do that though, will have to read some more.* _Not sure how to actually do that though, will have to read some more._
`cryptdevice=/dev/(partition):(name)` `cryptdevice=/dev/(partition):(name)`
`cryptkey=/dev/mapper/(name):(filesystem):/crypto_keyfile.bin` `cryptkey=/dev/mapper/(name):(filesystem):/crypto_keyfile.bin`
**Go back and install grub!!** **Go back and install grub!!**
#### (LUKS) Encryption with /boot #### (LUKS) Encryption with /boot
Edit the `HOOKS` section in `/etc/mkinitcpio.conf` *Example:*
`HOOKS=(base udev autodetect keyboard keymap modconf block encrypt filesystems fsck)`
`mkinitcpio -p linux` Edit the `HOOKS` section in `/etc/mkinitcpio.conf` _Example:_
`HOOKS=(base udev autodetect keyboard keymap modconf block encrypt filesystems fsck)`
Next, edit `/etc/default/grub` `mkinitcpio -p linux`
Next, edit `/etc/default/grub`
Add an option in `GRUB_CMDLINE_LINUX_DEFAULT` Add an option in `GRUB_CMDLINE_LINUX_DEFAULT`
**Make sure to change /dev/(partition) to UUID ASAP!** **Make sure to change /dev/(partition) to UUID ASAP!**
*Not sure how to actually do that though, will have to read some more.* _Not sure how to actually do that though, will have to read some more._
`cryptdevice=/dev/(partition):(name)` `cryptdevice=/dev/(partition):(name)`
**Go back and install grub!!** **Go back and install grub!!**
## Mkinitcpio ## Mkinitcpio
### BTRFS ### BTRFS
Load required modules Load required modules
`vim /etc/mkinitcpio.conf` `vim /etc/mkinitcpio.conf`
`MODULES=(btrfs)` `MODULES=(btrfs)`
`BINARIES=("/usr/bin/btrfs")` `BINARIES=("/usr/bin/btrfs")`
`mkinitcpio -p linux` `mkinitcpio -p linux`
**Go back and install grub!!** **Go back and install grub!!**
### EXT4 ### EXT4
### F2FS ### F2FS
## Networking ## Networking
`systemctl enable NetworkManager`
`systemctl enable NetworkManager`
## (CUPS) Printing ## (CUPS) Printing
`systemctl enable cups`
`systemctl enable cups`
## Add user ## Add user
`useradd -mG wheel (user)`
`useradd -mG wheel (user)`
Set password Set password
`passwd (user)` `passwd (user)`
### Enable sudo ### Enable sudo
`visudo` `visudo`
Uncomment `%wheel ALL=(ALL) ALL` Uncomment `%wheel ALL=(ALL) ALL`
## Finishing installation ## Finishing installation
`exit` `exit`
`poweroff` `poweroff`
Remove the installation cd Remove the installation cd
## (Snapper) Setup ## (Snapper) Setup
`# umount /.snapshots`
`# rm -r /.snapshots` `# umount /.snapshots`
`# rm -r /.snapshots`
Create snapper config Create snapper config
`# snapper -c root create-config /` `# snapper -c root create-config /`
Delete unneeded volume Delete unneeded volume
`# btrfs subv del /.snapshots/` `# btrfs subv del /.snapshots/`
`# mkdir /.snapshots` `# mkdir /.snapshots`
Mount snapshots volume Mount snapshots volume
`# mount -a` `# mount -a`
`# chmod 750 /.snapshots` `# chmod 750 /.snapshots`
`# vim /etc/snapper/configs/root` `# vim /etc/snapper/configs/root`
Change these things: Change these things:
`ALLOW_USERS="(user)"` `ALLOW_USERS="(user)"`
``` ```
TIMELINE_LIMIT_HOURLY="5" TIMELINE_LIMIT_HOURLY="5"
TIMELINE_LIMIT_DAILY="7" TIMELINE_LIMIT_DAILY="7"
@ -352,26 +398,30 @@ TIMELINE_LIMIT_YEARLY="0"
Enable snapper Enable snapper
`# systemctl enable --now snapper-timeline.timer` `# systemctl enable --now snapper-timeline.timer`
`# systemctl enable --now snapper-cleanup.timer` `# systemctl enable --now snapper-cleanup.timer`
Allow user to access snapshots Allow user to access snapshots
`# chmod a+rx /.snapshots` `# chmod a+rx /.snapshots`
`# chown :(user) /.snapshots` `# chown :(user) /.snapshots`
## Install AUR helper ## Install AUR helper
### yay ### yay
```
```sh
git clone https://aur.archlinux.org/yay.git git clone https://aur.archlinux.org/yay.git
cd yay cd yay
makepkg -si makepkg -si
``` ```
### paru ### paru
```
```sh
git clone https://aur.archlinux.org/paru.git git clone https://aur.archlinux.org/paru.git
cd paru cd paru
makepkg -si makepkg -si
``` ```
## (Snapper) Snap pac and GUI ## (Snapper) Snap pac and GUI
`$ paru -S snap-pac-grub snapper-gui`
`$ paru -S snap-pac-grub snapper-gui`

View File

@ -4,13 +4,17 @@ visible: true
--- ---
[toc] [toc]
## Podman ## Podman
### Network and Pod ### Network and Pod
`# podman network create net_hedgedoc` `# podman network create net_hedgedoc`
`# podman pod create --name pod_hedgedoc --network net_hedgedoc -p 127.0.0.1:5432:5432 -p 3005:3000` `# podman pod create --name pod_hedgedoc --network net_hedgedoc -p 127.0.0.1:5432:5432 -p 3005:3000`
### Database ### Database
```
```sh
# podman run --name hedgedocdb \ # podman run --name hedgedocdb \
-e POSTGRES_PASSWORD=hedgedoc \ -e POSTGRES_PASSWORD=hedgedoc \
-e PGDATA=/var/lib/postgresql/data/pgdata \ -e PGDATA=/var/lib/postgresql/data/pgdata \
@ -18,14 +22,16 @@ visible: true
--pod pod_hedgedoc \ --pod pod_hedgedoc \
-d docker.io/postgres:14 -d docker.io/postgres:14
``` ```
`# podman exec -it hedgedocdb bash` `# podman exec -it hedgedocdb bash`
`# psql -U postgres` `# psql -U postgres`
Create database used by hedgedoc Create database used by hedgedoc
`=# CREATE DATABASE hedgedocdb;` `=# CREATE DATABASE hedgedocdb;`
### Application ### Application
```
```sh
# podman run -d --name hedgedoc \ # podman run -d --name hedgedoc \
-e CMD_DB_URL=postgres://postgres:hedgedoc@localhost:5432/hedgedocdb \ -e CMD_DB_URL=postgres://postgres:hedgedoc@localhost:5432/hedgedocdb \
-e CMD_DOMAIN=(url) \ -e CMD_DOMAIN=(url) \
@ -38,14 +44,17 @@ Create database used by hedgedoc
--pod pod_hedgedoc \ --pod pod_hedgedoc \
quay.io/hedgedoc/hedgedoc:latest quay.io/hedgedoc/hedgedoc:latest
``` ```
## Create user ## Create user
Because `CMD_ALLOW_EMAIL_REGISTER` is set to `false`, registration of new users has to be done through the CLI interface using `bin/manage_users` in the container.
Because `CMD_ALLOW_EMAIL_REGISTER` is set to `false`, registration of new users has to be done through the CLI interface using `bin/manage_users` in the container.
`# podman exec -it hedgedocdb bash` `# podman exec -it hedgedocdb bash`
`# bin/manage_users --add (email)` `# bin/manage_users --add (email)`
## Nginx config ## Nginx config
```
```nginx
server { server {
server_name SERVER_NAME; server_name SERVER_NAME;
@ -65,7 +74,7 @@ server {
proxy_set_header X-Forwarded-Protocol $scheme; proxy_set_header X-Forwarded-Protocol $scheme;
proxy_set_header X-Forwarded-Host $http_host; proxy_set_header X-Forwarded-Host $http_host;
} }
location /socket.io/ { location /socket.io/ {
proxy_pass http://(SERVER); proxy_pass http://(SERVER);
proxy_set_header Host $host; proxy_set_header Host $host;

View File

@ -4,30 +4,36 @@ visible: true
--- ---
[toc] [toc]
## Container Image ## Container Image
```
```sh
# podman run -d --name jellyfin -p 8096:8096 \ # podman run -d --name jellyfin -p 8096:8096 \
-v /mnt/jellyfin/cache:/cache \ -v /mnt/jellyfin/cache:/cache \
-v /mnt/jellyfin/config:/config \ -v /mnt/jellyfin/config:/config \
-v /mnt/media:/media \ -v /mnt/media:/media \
docker.io/jellyfin/jellyfin:latest docker.io/jellyfin/jellyfin:latest
``` ```
## Apt Packate
`# apt install nginx apt-transport-https`
`# wget -O - https://repo.jellyfin.org/jellyfin_team.gpg.key | apt-key add -` ## Apt Packate
`# apt install nginx apt-transport-https`
`# wget -O - https://repo.jellyfin.org/jellyfin_team.gpg.key | apt-key add -`
`# echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/$( awk -F'=' '/^ID=/{ print $NF }' /etc/os-release ) $( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release ) main" | tee /etc/apt/sources.list.d/jellyfin.list` `# echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/$( awk -F'=' '/^ID=/{ print $NF }' /etc/os-release ) $( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release ) main" | tee /etc/apt/sources.list.d/jellyfin.list`
`# apt update` `# apt update`
`# apt install jellyfin` `# apt install jellyfin`
## Nginx ## Nginx
Create a new nginx configuration file in `/etc/nginx/sites-available` Create a new nginx configuration file in `/etc/nginx/sites-available`
*Make sure to replace "DOMAIN\_NAME" with your domain name* _Make sure to replace "DOMAIN_NAME" with your domain name_
*Replace "IPV4" with an ipv4 address and "IPV6" with an ipv6 address* _Replace "IPV4" with an ipv4 address and "IPV6" with an ipv6 address_
```
```nginx
server { server {
server_name DOMAIN_NAME; server_name DOMAIN_NAME;
@ -105,7 +111,7 @@ server {
``` ```
Enable the config Enable the config
`$ ln -s /etc/nginx/sites-available/(config) /etc/nginx/sites-enabled/` `$ ln -s /etc/nginx/sites-available/(config) /etc/nginx/sites-enabled/`
Restart nginx Restart nginx
`# systemctl restart nginx` `# systemctl restart nginx`

View File

@ -4,18 +4,23 @@ visible: false
--- ---
[toc] [toc]
## Podman ## Podman
### Network and Pod ### Network and Pod
`# podman network create net_kaizoku` `# podman network create net_kaizoku`
`# podman pod create --name pod_kaizoku --network net_kaizoku -p 3000:3000` `# podman pod create --name pod_kaizoku --network net_kaizoku -p 3000:3000`
#### Port Mappings #### Port Mappings
``` ```
3000: Kaizoku WebUI 3000: Kaizoku WebUI
``` ```
### Database ### Database
```
```sh
# podman run --name kaizoku-db \ # podman run --name kaizoku-db \
-e POSTGRES_USER=kaizoku \ -e POSTGRES_USER=kaizoku \
-e POSTGRES_PASSWORD=kaizoku \ -e POSTGRES_PASSWORD=kaizoku \
@ -26,7 +31,8 @@ visible: false
``` ```
### Redis ### Redis
```
```sh
# podman run --name kaizoku-redis \ # podman run --name kaizoku-redis \
-v /mnt/kaizoku_redis:/data \ -v /mnt/kaizoku_redis:/data \
--pod pod_kaizoku \ --pod pod_kaizoku \
@ -34,7 +40,8 @@ visible: false
``` ```
### Application ### Application
```
```sh
# podman run --name kaizoku-app \ # podman run --name kaizoku-app \
-e DATABASE_URL=postgresql://kaizoku:kaizoku@kaizoku-db:5432/kaizoku \ -e DATABASE_URL=postgresql://kaizoku:kaizoku@kaizoku-db:5432/kaizoku \
-e KAIZOKU_PORT=3000 \ -e KAIZOKU_PORT=3000 \

View File

@ -4,12 +4,15 @@ visible: true
--- ---
[toc] [toc]
## Create directories ## Create directories
`# mkdir -p /var/kavita/{config,content}` `# mkdir -p /var/kavita/{config,content}`
`# mkdir -p /var/kavita/content/{manga,books,tech}` `# mkdir -p /var/kavita/content/{manga,books,tech}`
## Run Kavita ## Run Kavita
```
```sh
# podman run --name kavita -p 5000:5000 \ # podman run --name kavita -p 5000:5000 \
-v /var/kavita/content:/content \ -v /var/kavita/content:/content \
-v /var/kavita/config:/kavita/config \ -v /var/kavita/config:/kavita/config \
@ -18,7 +21,8 @@ visible: true
``` ```
## Nginx Config ## Nginx Config
```
```nginx
server { server {
server_name kavita.exu.li; server_name kavita.exu.li;
@ -56,4 +60,5 @@ server {
``` ```
## Systemd Service ## Systemd Service
> See [Podman](/linux/podman#generate-systemd-service) to generate a service file.
> See [Podman](/linux/podman#generate-systemd-service) to generate a service file.

View File

@ -5,14 +5,16 @@ visible: true
[toc] [toc]
> I'm not using Komga anymore. This article might be out of date > I'm not using Komga anymore. This article might be out of date
## Create directories ## Create directories
`# mkdir -p /var/komga/{config,content}` `# mkdir -p /var/komga/{config,content}`
`# mkdir -p /var/komga/content/{manga,books,tech}` `# mkdir -p /var/komga/content/{manga,books,tech}`
## Run Komga ## Run Komga
```
```sh
# podman run --name komga -p 8080:8080 \ # podman run --name komga -p 8080:8080 \
-v /var/komga/config:/config \ -v /var/komga/config:/config \
-v /var/komga/content:/content \ -v /var/komga/content:/content \
@ -21,7 +23,8 @@ visible: true
``` ```
## Nginx Config ## Nginx Config
```
```nginx
server { server {
server_name komga.exu.li; server_name komga.exu.li;
@ -59,4 +62,5 @@ server {
``` ```
## Systemd Service ## Systemd Service
> See [Podman](/linux/podman#generate-systemd-service) to generate a service file.
> See [Podman](/linux/podman#generate-systemd-service) to generate a service file.