Archive for the ‘Linux Solution’ Category

Docker – Wireguard VPN Server leicht gemacht (Update) #3

Donnerstag, August 22nd, 2024

MinIO Enterprise Object Store – Cache

Mittwoch, August 21st, 2024

Zabbix 7.x – deploying with Docker containers

Dienstag, August 20th, 2024

Zabbix Documentation

 

root@pve-zabbix-01:~# apt-get install curl
root@pve-
zabbix-01:~#
root@pve-zabbix-01:~# curl -fsSL https://get.docker.com -o get-docker.sh
root@pve-zabbix-01:~#
root@pve-zabbix-01:~# chmod +x get-docker.sh
root@pve-zabbix-01:~#
root@pve-zabbix-01:~# ./get-docker.sh
root@pve-zabbix-01:~#
root@pve-zabbix-01:~# docker network create –subnet 172.20.0.0/16 –ip-range 172.20.240.0/20 zabbix-net
root@pve-zabbix-01:~# docker network ls
NETWORK ID NAME DRIVER SCOPE
9d8fd60f83ee bridge bridge local
7040ec4eeca9 host host local
6e4a988e829f none null local
5c2d01f09b94 zabbix-net bridge local

root@pve-zabbix-01:~#
root@pve-zabbix-01:~# docker run –name mysql-server -t \
-e MYSQL_DATABASE=“zabbix“ \
-e MYSQL_USER=“zabbix“ \
-e MYSQL_PASSWORD=“<password>“ \
-e MYSQL_ROOT_PASSWORD=“<password>“ \
–network=zabbix-net \
–restart unless-stopped \
-d mysql:8.0-oracle \
–character-set-server=utf8 –collation-server=utf8_bin \
–default-authentication-plugin=mysql_native_password
root@pve-zabbix-01:~#
root@pve-zabbix-01:~# docker run –name zabbix-java-gateway -t \
–network=zabbix-net \
–restart unless-stopped \
-d zabbix/zabbix-java-gateway:alpine-7.0-latest
root@pve-zabbix-01:~#
root@pve-zabbix-01:~# docker run –name zabbix-server-mysql -t \
-e DB_SERVER_HOST=“mysql-server“ \
-e MYSQL_DATABASE=“zabbix“ \
-e MYSQL_USER=“zabbix“ \
-e MYSQL_PASSWORD=“<password>“ \
-e MYSQL_ROOT_PASSWORD=“<password>“ \
-e ZBX_JAVAGATEWAY=“zabbix-java-gateway“ \
–network=zabbix-net \
-p 10051:10051 \
–restart unless-stopped \
-d zabbix/zabbix-server-mysql:alpine-7.0-latest
root@pve-zabbix-01:~#
root@pve-zabbix-01:~# docker run –name zabbix-web-nginx-mysql -t \
-e ZBX_SERVER_HOST=“zabbix-server-mysql“ \
-e DB_SERVER_HOST=“mysql-server“ \
-e MYSQL_DATABASE=“zabbix“ \
-e MYSQL_USER=“zabbix“ \
-e MYSQL_PASSWORD=“<password>“ \
-e MYSQL_ROOT_PASSWORD=“<password>“ \
–network=zabbix-net \
-p 80:8080 \
–restart unless-stopped \
-d zabbix/zabbix-web-nginx-mysql:alpine-7.0-latest
root@pve-zabbix-01:~#
root@pve-zabbix-01:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5f359d30d3f2 zabbix/zabbix-web-nginx-mysql:alpine-7.0-latest „docker-entrypoint.sh“ 22 hours ago Up 15 seconds 8443/tcp, 0.0.0.0:80->8080/tcp, :::80->8080/tcp zabbix-web-nginx-mysql
1efdb286e825 zabbix/zabbix-server-mysql:alpine-7.0-latest „/usr/bin/docker-ent…“ 22 hours ago Up 15 seconds 0.0.0.0:10051->10051/tcp, :::10051->10051/tcp zabbix-server-mysql
22ce0cc2280e zabbix/zabbix-java-gateway:alpine-7.0-latest „docker-entrypoint.s…“ 22 hours ago Up 15 seconds 10052/tcp zabbix-java-gateway
913d0c0ec7b3 mysql:8.0-oracle „docker-entrypoint.s…“ 22 hours ago Up 15 seconds 3306/tcp, 33060/tcp mysql-server
root@pve-zabbix-01:~#
root@pve-zabbix-01:~# netstat -tulpn | grep LISTEN
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 221/systemd-resolve
tcp 0 0 127.0.0.54:53 0.0.0.0:* LISTEN 221/systemd-resolve
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 470/master
tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 716/docker-proxy
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 708/docker-proxy
tcp6 0 0 ::1:25 :::* LISTEN 470/master
tcp6 0 0 :::10051 :::* LISTEN 735/docker-proxy
tcp6 0 0 :::22 :::* LISTEN 1/init
tcp6 0 0 :::80 :::* LISTEN 733/docker-proxy

root@pve-zabbix-01:~#

Raspberry Pi 5 – new version with 2 GB on sale now

Dienstag, August 20th, 2024

Linux command ‚rsync‘ – how to set speed limit from eating all bandwidth with ‚trickle‘ option

Donnerstag, August 15th, 2024

Linux command ‚trickle‘ – control network traffic bandwidth of applications

# apt-get update -y
# apt-get install trickle

# trickle -s -d 10000 -u 10000 -t 10 -l 100 rsync –progress -v –temp-dir=/tmp srv:/tmp/* /tmp

Proxmox Virtual Environment (VE) 8.2.4 – can’t delete partitions with the GUI on an old disk

Dienstag, August 13th, 2024
# wipefs –all –force /dev/sdb
# shutdown -r now

Proxmox Virtual Environment (VE) 8.2.4 – update with No Subscription Repository

Dienstag, August 13th, 2024

Linux Mint 22 – die Neuerungen im Überblick

Donnerstag, August 8th, 2024

Geekom AE7 Ryzen 7840HS 16 threads 96 GB DDR5 – 2200 LXC Machines on a Proxmox system

Donnerstag, August 8th, 2024

MinIO Enterprise Object Store – is designed for commercial customers who are tackling the challenges of large scale data infrastructure presented by AI/ML analytics and application workloads

Mittwoch, August 7th, 2024

Linux command ’lnav‘ – the Log File Navigator (lnav) is an advanced log file viewer for the console so if you have a bunch of log files that you need to look through to find issues

Montag, August 5th, 2024

Linux command ’lnav‘ – is an advanced log file viewer for the terminal it provides an easy-to-use interface for monitoring and analyzing your log files with little to no setup. Simply point lnav at your log files and it will automatically detect the Log Formats index their contents and display a combined view of all log messages andou can navigate through your logs using a variety of hotkeys

root@rpi-NodeRed-01:~#
root@rpi-NodeRed-01:~# apt-get install lnav
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
lnav is already the newest version (0.9.0-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
root@rpi-NodeRed-01:~#
root@rpi-NodeRed-01:~# lnav -V
lnav 0.9.0
root@rpi-NodeRed-01:~#

Some usefull hotkeys

e / E : jump to next/previous ERROR
w / W: jump to next/previous WARNING
d / D : forward / backward 24 hours
0 / shift 0 : next / previous day
ctrl-r : reset all filters and highlights
i : show a histogram with number of errors per day :exclamation:
p / shift p : show / stop showing JSON messages in a pretty way :exclamation:
/ : search a string of regular expression
g / G : go to top or bottom of the file

root@rpi-NodeRed-01:~# lnav

Log analysis in lnav can be done using the SQLite interface

Log messages can be accessed via virtual tables that are created for each file format and the tables have the same name as the log format and each message is its own row in the table a simple query to perform on an Apache access log might be to get the average and maximum number of bytes returned by the server grouped by IP@

;SELECT c_ip, avg(sc_bytes), max(sc_bytes) FROM access_log GROUP BY c_ip

Raspberry Pi – simple trick to protect your SD card from crashing with an overlay file system

Dienstag, Juli 30th, 2024

NVIDIA Container Toolkit 1.15.0 – enables users to build and run GPU accelerated containers and the toolkit includes a container runtime library and utilities to automatically configure containers to leverage NVIDIA GPUs

Montag, Juli 15th, 2024

Microsoft Windows Subsystem for Linux (WSL) Windows 11 – how to install & update

Samstag, Juli 13th, 2024
Microsoft Windows [Version 10.0.22631.3880]
(c) Microsoft Corporation. Alle Rechte vorbehalten.
 C:\Users\josef> wsl –install
Windows Subsystem für Linux hat keine Distributionen installiert.
Verwenden Sie ‚wsl.exe –list –online‘, um verfügbare Distributionen aufzulisten
und ‚wsl.exe –install <Distro>‘ zum Installieren.
C:\Users\josef>
 C:\Users\josef> wsl –update
Es wird nach Updates gesucht.
Die neueste Version von Windows-Subsystem für Linux ist bereits installiert.

C:\Users\josef>
C:\Users\josef>wsl –list –online
Nachstehend finden Sie eine Liste der gültigen Distributionen, die installiert werden können.
Führen Sie die Installation mithilfe des Befehls „wsl.exe –install <Distro>“ aus.
NAME FRIENDLY NAME
Ubuntu Ubuntu
Debian Debian GNU/Linux
kali-linux Kali Linux Rolling
Ubuntu-18.04 Ubuntu 18.04 LTS
Ubuntu-20.04 Ubuntu 20.04 LTS
Ubuntu-22.04 Ubuntu 22.04 LTS
Ubuntu-24.04 Ubuntu 24.04 LTS
OracleLinux_7_9 Oracle Linux 7.9
OracleLinux_8_7 Oracle Linux 8.7
OracleLinux_9_1 Oracle Linux 9.1
openSUSE-Leap-15.5 openSUSE Leap 15.5
SUSE-Linux-Enterprise-Server-15-SP4 SUSE Linux Enterprise Server 15 SP4
SUSE-Linux-Enterprise-15-SP5 SUSE Linux Enterprise 15 SP5
openSUSE-Tumbleweed openSUSE Tumbleweed
C:\Users\josef>
To install WSL2 on Windows open Command Prompt as administrator and run
C:\Users\josef>wsl –install -d Ubuntu-24.04

Installing, this may take a few minutes…
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: js
New password:
Retype new password:
passwd: password updated successfully
Installation successful!
To run a command as administrator (user „root“), use „sudo <command>“.
See „man sudo_root“ for details.
Welcome to Ubuntu 24.04 LTS (GNU/Linux 5.15.153.1-microsoft-standard-WSL2 x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/pro
System information as of Sat Jul 13 15:50:55 CEST 2024
System load: 0.51 Processes: 27
Usage of /: 0.1% of 1006.85GB Users logged in: 0
Memory usage: 13% IPv4 address for eth0: 172.29.33.244
Swap usage: 0%
This message is shown once a day. To disable it please create the
/home/js/.hushlogin file.
js@DESKTOP-UVPS2F8:~$

Proxmox Virtual Environment (VE) 8.2.4 – update with No Subscription Repository

Mittwoch, Juli 10th, 2024
root@pve-10:~#
root@pve-10:~# vi /etc/apt/sources.list.d/pve-enterprise.list
# deb https://enterprise.proxmox.com/debian/pve bookworm pve-enterprise
root@pve-10:~#
root@pve-10:~# vi /etc/apt/sources.list.d/pve-no-subscription.list
deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription
root@pve-10:~#
root@pve-10:~# vi /etc/apt/sources.list
deb http://deb.debian.org/debian bookworm main contrib
deb http://deb.debian.org/debian bookworm-updates main contrib
# security updates
deb http://security.debian.org/debian-security bookworm-security main contrib
root@pve-10:~#
root@pve-10:~# vi /etc/apt/sources.list.d/ceph.list
# deb https://enterprise.proxmox.com/debian/ceph-quincy bookworm enterprise
deb http://download.proxmox.com/debian/ceph-reef bookworm no-subscription
root@pve-10:~#