Skip to main content

Primary links

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

Misc

  • Linux
  • Hardware
  • Programming
  • Databases
  • CLI
  • Multimedia
  • Plugins
  • Windows
  • Contact

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

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

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

Debian: Install Cacti

# create container
export CONTAINER=cacti
wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/lxc/master/create.jessie.sh -O - | bash -s -- -f
sudo lxc-attach -n ${CONTAINER} -- sed -i 's|PermitRootLogin without-password|PermitRootLogin yes|' /etc/ssh/sshd_config
sudo lxc-attach -n ${CONTAINER} -- service ssh restart
# fix dns
echo nameserver 8.8.8.8 > /var/lib/lxc/${CONTAINER}/rootfs/etc/resolv.conf
# install applications

lxc-attach -n ${CONTAINER} --

LANG=en_US.UTF-8
apt-get update
# server

debconf-set-selections <<\EOF
cacti cacti/webserver select apache2
cacti cacti/dbconfig-install select true
mysql-server-5.5 mysql-server/root_password string t00r
mysql-server-5.5 mysql-server/root_password_again string t00r
libphp-adodb libphp-adodb/pathmove select true
EOF

apt-get install -y cacti

? apt-get install cacti-spine

# configure

http://your_server/cacti

# configure client
apt-get install snmpd 
cp  /etc/snmp/snmpd.conf  /etc/snmp/snmpd.conf.org

agentAddress udp:127.0.0.1:161
agentAddress udp:161

sed -i 's|agentAddress  udp:127.0.0.1:161|agentAddress  udp:161|g' /etc/snmp/snmpd.conf

#rocommunity public localhost
rocommunity public 192.168.1.0/24

sed -i 's|#rocommunity public  localhost|rocommunity public  192.168.1.0/24|g' /etc/snmp/snmpd.conf
service snmpd restart
# cronjob
# cat /etc/cron.d/cacti
MAILTO=root

*/1 * * * * www-data php --define suhosin.memory_limit=512M /usr/share/cacti/site/poller.php 2>&1 >/dev/null | if [ -f /usr/bin/ts ] ; then ts ; else tee ; fi >> /var/log/cacti/poller-error.log

Debian: Install MariaDB

<?php
$URL="https://raw.githubusercontent.com/panticz/installit/master/install.mariadb.sh";

echo "wget $URL -O - | bash -";
echo "<div><pre>";
</pre></div>

$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);

echo htmlspecialchars(curl_exec($c));

curl_close($c);

echo "";

?>

Debian Wheezy: Install PHP 5.6

apt-get install -y wget
# install PHP 5.6
echo "deb http://packages.dotdeb.org wheezy-php56 all" > /etc/apt/sources.list.d/dotdeb.org.list
echo "deb-src http://packages.dotdeb.org wheezy-php56 all" >> /etc/apt/sources.list.d/dotdeb.org.list
wget http://www.dotdeb.org/dotdeb.gpg -O - | apt-key add -
apt-get update
apt-get install php5

a2enmod php5

service apache2 restart

Links:
http://www.dotdeb.org/instructions/

LXC: create Debian Jessie container

<?php
$URL="https://raw.githubusercontent.com/panticz/lxc/master/create.jessie.sh";

echo "wget -q --no-check-certificate $URL -O - | bash -s";
echo "<div><pre>";
</pre></div>

$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);

echo htmlspecialchars(curl_exec($c));

curl_close($c);

echo "";

?>

(re)create container

wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/lxc/master/create.jessie.sh -O - | bash -s -- -f

Allow root SSH login with password

CONTAINER=jessie
sudo lxc-attach -n ${CONTAINER} -- sed -i 's|PermitRootLogin without-password|PermitRootLogin yes|' /etc/ssh/sshd_config
sudo lxc-attach -n ${CONTAINER} -- service ssh restart

Fix DNS

echo nameserver 8.8.8.8 | sudo tee /var/lib/lxc/${CONTAINER}/rootfs/etc/resolv.conf

Default login credentials
user: root
pass: root

FixMe
"Failed to mount cgroup at /sys/fs/cgroup/systemd: Permission denied"
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1346734

Failed to open /dev/autofs: No such file or directory
Failed to initialize automounter: No such file or directory
[FAILED] Failed to set up automount Arbitrary Executable File Formats File System Automount Point.
See 'systemctl status proc-sys-fs-binfmt_misc.automount' for details.
Unit proc-sys-fs-binfmt_misc.automount entered failed state.

Socket service systemd-udevd.service not loaded, refusing.
[FAILED] Failed to listen on udev Kernel Socket.
See 'systemctl status systemd-udevd-kernel.socket' for details.
Socket service systemd-udevd.service not loaded, refusing.
[FAILED] Failed to listen on udev Control Socket.
See 'systemctl status systemd-udevd-control.socket' for details.

Bugs
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1347020
https://wiki.debian.org/LXC#Incompatibility_with_systemd

Fix DNS

Pogoplug: Install Debian

Install Debian

# connect to PogoPlug
ssh root@192.168.2.155

ceadmin

# prepare USB flash (1GB root, 256MB swap)

printf "o\nn\np\n1\n\n+1G\nn\np\n2\n\n+256M\nt\n2\n82\nw\n" | fdisk /dev/sda

# download and execute debian installation script
cd /tmp
wget http://projects.doozan.com/debian/dockstar.debian-squeeze.sh
chmod +x dockstar.debian-squeeze.sh
export PATH=$PATH:/usr/sbin:/sbin
./dockstar.debian-squeeze.sh

ok

# login to new debian intallation
ssh root@192.168.1.X

pass: root

# change root password

passwd

Configure netconsole

# configure uBoot netconsole

fw_setenv serverip 192.168.2.199 # your desktop IP
fw_setenv ipaddr 192.168.2.1 # PogoPlug IP
fw_setenv if_netconsole 'ping $serverip'
fw_setenv start_netconsole 'setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;'
fw_setenv preboot 'run if_netconsole start_netconsole'

# start output netconsole (require http://packages.ubuntu.com/quantal/amd64/netcat-openbsd/download)

xterm -title "netconsole output" -e nc -l -u -p 6666 &

# start input netconsole

xterm -title "netconsole input" -e nc -u 192.168.2.1 6666 &

Install more programs see:
http://www.panticz.de/Pogoplug-Debian-extra-programs

# todo

diff /etc/fstab.old /etc/fstab
tmpfs /tmp tmpfs defaults 0 0
tmpfs /tmp tmpfs defaults,size=512M 0 0

Links
http://projects.doozan.com/debian/
http://forum.doozan.com/read.php?4,8277 - Rescue System V3.0
http://forum.doozan.com/read.php?3,14,14 - Use netconsole to troubleshoot uBoot without a serial cable
http://www.cyrius.com/debian/kirkwood/sheevaplug/install.html
http://forum.doozan.com/read.php?2,6300 - How To: Create an 802.11n AP (Access Point) w/ Debian on a Dockstar/Pogoplug/kirkwood device

Install glusterfs server

<?php
$URL="http://installit.googlecode.com/hg/install.glusterfs-server.sh";

echo "wget -q $URL -O - | bash -";
echo "<div><pre>";
</pre></div>

$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);

echo htmlspecialchars(curl_exec($c));

curl_close($c);

echo "";

?>

Auto install Xen Dom0 server with RAID1 and LVM2 under Debian Squezze

# get Debain boot files for PXE

http://www.panticz.de/Debian

# PXE net boot file

http://installit.googlecode.com/hg/preseed/debian-preseed.seed

# 1th stage

http://www.panticz.de/pxe/preseed/xen.seed

# 2th stage

http://www.panticz.de/pxe/preseed/rc.local

# 3th stage

http://www.panticz.de/pxe/preseed/late_command.txt

# configure locale (broken)

http://installit.googlecode.com/hg/scripts/fix.locale.sh

# install xen

http://code.google.com/p/installit/source/browse/install.xen.sh

Create Boot CD
http://www.panticz.de/Ubuntu_customized_preseed_NetBoot_CD

Debian

<?php
$URL="https://raw.githubusercontent.com/panticz/scripts/master/debian/repositories.sh";

echo "<div><pre>";
</pre></div>

$c = curl_init();
curl_setopt($c, CURLOPT_URL, $URL);
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);

echo htmlspecialchars(curl_exec($c));

curl_close($c);

echo "";

?>

apt-get update && apt-get -y dist-upgrade

Upgrade squeeze to wheezy

sed -i 's|squeeze|wheezy|g' /etc/apt/sources.list
apt-get update
apt-get -y dist-upgrade

fix wget certificate errors

apt-get install -y ca-certificates

Debian Mirrors
http://www.debian.org/mirror/list

Netinstall CD
http://cdimage.debian.org/debian-cd/current/amd64/iso-cd/
http://ftp.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/netboot/mini.iso - squeeze netinstall cd

Net install from PXE

mkdir -p /var/lib/tftpboot/debian/squeeze/amd64
wget -q http://ftp.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/netboot/debian-installer/amd64/linux -O /var/lib/tftpboot/debian/squeeze/amd64/linux
wget -q http://ftp.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/netboot/debian-installer/amd64/initrd.gz -O /var/lib/tftpboot/debian/squeeze/amd64/initrd.gz
cat < /var/lib/tftpboot/pxelinux.cfg/debian-squeeze.conf

label linux
menu label Debian Squeeze installer 64 bit
kernel debian/squeeze/amd64/linux
APPEND initrd=debian/squeeze/amd64/initrd.gz auto url=http://installit.googlecode.com/hg/preseed/debian-preseed.seed locale=en_US console-setup/layoutcode=en netcfg/choose_interface=eth0 debconf/priority=critical DEBCONF_DEBUG=developer --
IPAPPEND 2
EOF

echo "MENU INCLUDE pxelinux.cfg/debian-installer.cfg" >> /var/lib/tftpboot/pxelinux.cfg/default

Net install Debian (boot installer from HDD)

debian