Skip to main content

Primary links

  • Home
  • AI
  • Kubernetes
  • Incus
  • Ansible
  • Terraform
  • OpenStack
  • Virtualization
  • Linux
  • SmartHome
  • HowTo

Misc

  • Linux
  • Hardware
  • Programming
  • Databases
  • Multimedia
  • Windows

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

  • Virtualization
  • Incus
  • Docker
  • KVM
  • Kubernetes
  • LXC
  • LXD
  • QEMU
  • VMware
  • VirtualBox
  • multipass
  • podman
  • vagrant
  • XEN

Network

  • DNS
  • Firewall
  • Linux
  • OpenvSwitch
  • SSL
  • VLAN
  • VPN
  • iPXE
  • namespaces
  • nmcli
  • tcpdump

Storage

  • CEPH
  • DRBD
  • LVM
  • S3
  • ZFS
  • btrfs

Automation / CI/CD

  • Install
  • Ansible
  • GitLab
  • LLM
  • Preseed
  • Puppet
  • Terraform
  • Ubuntu autoinstall

Monitoring / Visualisation

  • Grafana
  • Icinga
  • Prometheus
  • Monitoring
  • ELK
  • mermaid

Configure proxy

export http_proxy=http://10.203.0.1:5187/
export https_proxy=$http_proxy
export ftp_proxy=$http_proxy
export rsync_proxy=$http_proxy
export no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
export PROXY_SERVER=192.168.0.222
export PROXY_USER=foo
export PROXY_PASS=bar

cat <> /etc/environment
export http_proxy="http://${PROXY_USER}:${PROXY_PASS}@${PROXY_SERVER}:8080"
export https_proxy="http://${PROXY_USER}:${PROXY_PASS}@${PROXY_SERVER}:8080"
export no_proxy="localhost,127.0.0.1,foo.example.com"
EOF

cat < /etc/apt/apt.conf.d/12proxy
Acquire::http::Proxy "http://${PROXY_USER}:${PROXY_PASS}@${PROXY_SERVER}:8080";
Acquire::https::Proxy "http://${PROXY_USER}:${PROXY_PASS}@${PROXY_SERVER}:8080";
EOF

Set http_proxy with special characters in password
https://www.cyberciti.biz/faq/unix-linux-export-variable-http_proxy-with-special-characters/
https://www.fourmilab.ch/webtools/unum/

#wget https://www.fourmilab.ch/webtools/unum/download/unum.tar.gz
#tar xzf unum.tar.gz
#./unum.pl 'F@o:o!B#ar$'

MY_NEW_PASS='F@o:o!B#ar$' 
echo ${MY_NEW_PASS}| uni2ascii -qp | sed 's/0x00/%/g'

sudo vi /etc/environment

#Replace with:
#F%40o%3Ao%21B%23ar%24

Socks

Atom editor

Install
https://flight-manual.atom.io/getting-started/sections/installing-atom/

Add-ons

ls -l ~/.atom/packages/
apm install atom-beautify

Alternatives
https://codevisualstudio.com/

Links
http://atom-packages.directory/category/tools-beautify/

Grafana

Install from repository

sudo apt-get install -y apt-transport-https software-properties-common wget
sudo mkdir -p /etc/apt/keyrings/
wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/grafana.gpg > /dev/null

echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list

sudo apt-get update

sudo apt-get install -y grafana

Credentials
http://SERVER_IP:3000/

Docker container

docker run -i -p 3000:3000 -e "GF_SERVER_ROOT_URL=http://10.0.3.164" -e "GF_SECURITY_ADMIN_PASSWORD=admin" grafana/grafana
user: admin
pass: admin

Configure Graphite datasource

Name: Graphite
Type: Graphite
Default: Y
Url: http://10.0.3.48:2003
Access: direct

Plugins

grafana-cli plugins install raintank-worldping-app
service grafana-server restart

Links
http://docs.grafana.org/installation/debian/

Install prometheus under Ubuntu

Install from repository

sudo apt-get install -y prometheus
# optional
sudo apt-get install -y prometheus-node-exporter
sudo apt-get install -y prometheus-alertmanager
sudo apt-get install -y prometheus-pushgateway

Ansible installation

https://github.com/panticz/ansible/tree/master/roles/prometheus
- hosts: localhost
  roles:
    - prometheus

Login
http://SERVER_IP:9090/

Commands

avg_over_time(node_memory_MemAvailable[5m])/1024/1024

Repositroy
https://github.com/cloudalchemy/ansible-prometheus

Docker

docker run --name prometheus -d -p 127.0.0.1:9090:9090 quay.io/prometheus/prometheus

Ports
https://github.com/prometheus/prometheus/wiki/Default-port-allocations

API
http://SERVER_IP:9090/metrics

Query

node_disk_io_now{device="sda"}

Deploy node_exporter without installation

# https://prometheus.io/download/#node_exporter
wget https://github.com/prometheus/node_exporter/releases/download/v0.16.0/node_exporter-0.16.0.linux-amd64.tar.gz -qO /tmp/node_exporter.tar.gz
tar xzf /tmp/node_exporter.tar.gz -C /tmp/
mv /tmp/node_exporter-0.16.0.linux-amd64/node_exporter /usr/bin/prometheus-node-exporter
nohup /usr/bin/prometheus-node-exporter &
prometheus-node-exporter --version

node_exporter Ansible installation

https://github.com/panticz/ansible/tree/master/roles/prometheus-node-exporter
- hosts: localhost
  roles:
    - prometheus-node-exporter

Use SSH tunnel to access node_exporter metrics
https://mkezz.wordpress.com/2017/08/04/prometheus-in-docker-ssh-tunnel-to-target-nodes/

Alerting
http://prometheus.example.com:9093/

Install Couch DB under Ubuntu

Installation

wget https://couchdb.apache.org/repo/bintray-pubkey.asc -qO - | sudo apt-key add -
echo "deb https://apache.bintray.com/couchdb-deb $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/couchdb.list
sudo apt update

debconf-set-selections <<\EOF
couchdb couchdb/adminpass string admin
couchdb couchdb/adminpass_again string admin
couchdb couchdb/mode select standalone
couchdb couchdb/bindaddress string 0.0.0.0
EOF

sudo apt-get install -y couchdb

Login
http://SERVER_IP:5984/_utils/
user: admin
pass: admin

Commands

# check connection
curl -X GET http://admin:admin@u1804:5984
# create DB
curl -X PUT http://admin:admin@u1804:5984/store1
# list DBs
curl -X GET http://admin:admin@u1804:5984/_all_dbs
# delete DB
curl -X DELETE http://admin:admin@u1804:5984/store2
# create object to DB
curl -X PUT http://admin:admin@u1804:5984/store1/product1 -d'{ "Name": "foo" , "Size": "5", "Note" : "test1" }'
# get object from DB
curl -X GET http://admin:admin@u1804:5984/store1/product1

Links
https://websiteforstudents.com/install-apache-couchdb-on-ubuntu-16-04-17-10-18-04/
http://docs.couchdb.org/en/latest/install/setup.html
https://wiki.ubuntuusers.de/CouchDB/
http://docs.couchdb.org/en/2.1.2/intro/tour.html

Build Wildfly deb package

# http://wildfly.org/downloads/
# https://github.com/mattthias/wildfly-packaging
VERSION=13.0.0.Final
REVISION=1
sudo apt-get install -y devscripts
# Download the "source" (the binary "Java EE7 Full & Web Distribution")
# wget http://download.jboss.org/wildfly/10.1.0.Final/wildfly-10.1.0.Final.tar.gz
# https://github.com/ilanddev/wildfly-debian/tree/master/debian
# download archive
mkdir /tmp/wildfly
wget http://download.jboss.org/wildfly/${VERSION}/wildfly-${VERSION}.tar.gz -q -O /tmp/wildfly/wildfly-${VERSION}.tar.gz
# create a link to archive

cd /tmp/wildfly

ln -s wildfly-${VERSION}.tar.gz wildfly_${VERSION}.orig.tar.gz
# unpack and enter directory
tar -xzf wildfly-${VERSION}.tar.gz

cd wildfly-${VERSION}

# Lets start with packaging (create debian/ dir and changelog)
mkdir debian

dch --create --package wildfly --newversion=${VERSION}-${REVISION} "Build WildFly ${VERSION} package at $(date -I)"

# 2. debian/compat
echo "9" > debian/compat
# 3. debian/rules
echo -ne '#!/usr/bin/make -f\n%:\n\tdh $@\n' > debian/rules
# 4. debian/control
cat < debian/control

Source: wildfly
Maintainer: Foo
Standards-Version: 3.9.5
Build-Depends: debhelper

Package: wildfly
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: WildFly application server
EOF

# 5. debian/source/format
mkdir -p debian/source
echo "3.0 (quilt)" > debian/source/format
# 6. Add all dir to install
for i in $(ls | grep -v debian); do
    echo $i opt/wildfly/

done > debian/wildfly.install

Install and configure autofs under Ubuntu

# install autofs package
apt-get install -y autofs
# create required directories
mkdir /etc/auto.master.d
# Configure NFS mount nas.example.com:/volume1/backup to /media/backup
echo "/media /etc/auto.media" >> /etc/auto.master.d/media.autofs
echo "backup -fstype=nfs,rw,async,vers=3 nas.example.com:/volume1/backup" >> /etc/auto.media
# check (directory will by created on access)

ll /media/backup

# debug
service autofs stop
sudo automount -f -v

Ansible playbook
https://github.com/panticz/ansible/blob/master/autofs-test.yml

oVirt

# install

https://www.ovirt.org/download/

sed -i 's|localhost|ovirt|g' /etc/hosts
sed -i 's|localdomain|dev|g' /etc/hosts

reboot

Nginx access control / GeoIP

cat < /etc/nginx/conf.d/geoip.conf 
geoip_country /usr/share/GeoIP/GeoIP.dat;

map $geoip_country_code $allowed_country {
    default no;
    DE yes;
    CH yes;
}

log_format allow "allow $remote_addr;";
EOF
chmod 644 /etc/nginx/conf.d/geoip.conf


cat < /usr/local/bin/nginx-allow
#!/bin/bash

while inotifywait --quiet --event create,delete --exclude "[^c][^o][^n][^f]$" /tmp
do
    /usr/sbin/nginx -t && /usr/sbin/service nginx reload
done
EOF
chmod 755 /usr/local/bin/nginx-allow


cat < /etc/systemd/system/nginx-allow.service
[Unit]
Description=Nginx configuration monitor service
After=nginx.service

[Service]
Type=simple
ExecStart=/usr/local/bin/nginx-allow
Restart=on-abort

[Install]
WantedBy=multi-user.target
EOF
chmod 644 /etc/systemd/system/nginx-allow.service


systemctl daemon-reload
systemctl enable nginx-allow.service 
systemctl start nginx-allow.service 



cat < /etc/cron.hourly/clean_nginx_allow
#!/bin/bash

find /tmp -ctime +2 -name nginx_allow_*.conf -delete
EOF


cat /etc/nginx/sites-available/nginx-allow
...
set $backend $scheme://10.0.10.101;
error_page 403 =404 /404.gif;

location /nginx-allow/ {
    if ($allowed_country = yes) {
        access_log /tmp/nginx_allow_$remote_addr.conf allow;
        proxy_pass $backend;
    }

    proxy_pass $backend/404.html;
}

location ~ ^(/wp-admin|/admin) {
    include /tmp/nginx_allow_*.conf;
    deny all;

    proxy_pass $backend;
}
...

cat < /root/bin/nginx_allow_ddns.sh
#!/bin/bash -e

DDNS=foo.dyndns.com

sleep 3

IP=$(getent hosts ${DDNS} | cut -d" " -f1)
[ -n ${IP} ] && echo "allow ${IP};" > /tmp/nginx_allow_${IP}.conf

service nginx reload
EOF

# crontab -e
@reboot /root/bin/nginx_allow_ddns.sh

Links
https://docs.nginx.com/nginx/admin-guide/mail-proxy/mail-proxy/
https://docs.nginx.com/nginx/admin-guide/security-controls/controlling-access-by-geoip/

OpenProject

# Docker

https://hub.docker.com/r/openproject/community/

Alternatives
https://storyboard.openstack.org/#!/page/about

Links
https://packager.io/gh/opf/openproject-ce
https://github.com/opf/openproject/tree/dev/config

Pagination

  • First page
  • Previous page
  • …
  • Page 19
  • Page 20
  • Page 21
  • Page 22
  • Page 23
  • Page 24
  • Page 25
  • Page 26
  • Page 27
  • …
  • Next page
  • Last page
Profiles GitHub StackOverflow LinkedIn Xing
Contact Imprint
© panticz 2026

Cookie-Einstellungen

Diese Website nutzt eingebettete Inhalte von Drittanbietern (z.B. YouTube, SoundCloud). Beim Laden dieser Inhalte werden Daten an die jeweiligen Anbieter übermittelt. Datenverarbeitungserklärung