LXC: create Ubuntu Bionic container
sudo lxc-create -t ubuntu -n bionic -- template-options -r bionic
sudo lxc-create -t ubuntu -n bionic -- template-options -r bionic
echo "deb http://archive.ubuntu.com/ubuntu yakkety main" > /etc/apt/sources.list.d/yakkety.list
apt-get update
apt-get install -y ssh
rm /etc/apt/sources.list.d/yakkety.list
apt-get update
ssh -V
OpenSSH_7.3p1 Ubuntu-1, OpenSSL 1.0.2g 1 Mar 2016
mkdir ~/.ssh/config.d
sed -i '1iInclude config.d/*' ~/.ssh/config
Links
https://superuser.com/questions/247564/is-there-a-way-for-one-ssh-config-file-to-include-another-one
ansible-playbook dist-upgrade.yml -i your_inventory [-l host_name]
<?php
$URL="https://raw.githubusercontent.com/panticz/ansible/master/dist-upgrade.yml";
echo "
"; $c = curl_init(); curl_setopt($c, CURLOPT_URL, $URL); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); echo htmlspecialchars(curl_exec($c)); curl_close($c); echo "
";
?>
<?php
$URL="https://raw.githubusercontent.com/panticz/lxc/master/create_ubuntu_xenial.sh";
echo "wget -q --no-check-certificate $URL -O - | bash -s";
echo "
"; $c = curl_init(); curl_setopt($c, CURLOPT_URL, $URL); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); echo htmlspecialchars(curl_exec($c)); curl_close($c); echo "
";
?>
Allow root SSH login with password
sed -i 's|PermitRootLogin without-password|PermitRootLogin yes|' /etc/ssh/sshd_config
sed -i 's|PasswordAuthentication no|PasswordAuthentication yes|' /etc/ssh/sshd_config
service ssh restart
Install printer
<?php
$URL="https://raw.githubusercontent.com/panticz/installit/master/hardware/install.brother-mfc-1910w.sh";
echo "wget $URL -O - | bash -";
echo "
"; $c = curl_init(); curl_setopt($c, CURLOPT_URL, $URL); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); echo htmlspecialchars(curl_exec($c)); curl_close($c); echo "
";
?>
Check for newer DEB packages
http://support.brother.com/g/b/downloadlist.aspx?c=as_ot&lang=en&prod=mfc1910w_eu_as&os=128
<?php
$URL="https://raw.githubusercontent.com/panticz/installit/master/install.openra.sh";
echo "wget $URL -O - | bash -s";
echo "
"; $c = curl_init(); curl_setopt($c, CURLOPT_URL, $URL); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); echo htmlspecialchars(curl_exec($c)); curl_close($c); echo "
";
?>
Check for latest version
http://www.openra.net/download/
<?php
$URL="https://raw.githubusercontent.com/panticz/lxc/master/create.trusty.sh";
echo "wget -q --no-check-certificate $URL -O - | bash -s";
echo "
"; $c = curl_init(); curl_setopt($c, CURLOPT_URL, $URL); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); echo htmlspecialchars(curl_exec($c)); curl_close($c); echo "
";
?>
Allow root SSH login with password
sed -i 's|PermitRootLogin without-password|PermitRootLogin yes|' /etc/ssh/sshd_config
sed -i 's|PasswordAuthentication no|PasswordAuthentication yes|' /etc/ssh/sshd_config
service ssh restart
# display logs from current boot
journalctl -b
sudo journalctl --since yesterday
journalctl -u nginx.service
# journals disc usage
sudo journalctl --disk-usage
journalctl -p err -b
# links
https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs
http://0pointer.de/blog/projects/journalctl.html
http://blog.delouw.ch/2013/07/24/why-journalctl-is-cool-and-syslog-will-survive-for-another-decade/
<?php
$URL="https://raw.githubusercontent.com/panticz/installit/master/install.gnome-fallback.sh";
echo "wget $URL -O - | bash -";
echo "
"; $c = curl_init(); curl_setopt($c, CURLOPT_URL, $URL); curl_setopt($c, CURLOPT_RETURNTRANSFER, 1); echo htmlspecialchars(curl_exec($c)); curl_close($c); echo "
";
?>
Installation
apt install -y bridge-utils debootstrap lxc-templates lxc
http://www.panticz.de/install_lxc
Create container
export LANG=en_US.UTF-8
export CONTAINER=wheezy
sudo sudo lxc-destroy -n ${CONTAINER}
sudo lxc-create -t debian -n ${CONTAINER}
sudo lxc-start -d -n ${CONTAINER}
echo 'Acquire::http::Proxy "http://apt-cacher:3142/";' | sudo tee /var/lib/lxc/${CONTAINER}/rootfs/etc/apt/apt.conf
sudo lxc-attach -n ${CONTAINER} -- apt-get clean
sudo lxc-attach -n ${CONTAINER} -- apt-get update