linux

rsync under OpenElec / Kodi

mkdir /tmp/deb
wget http://ftp.us.debian.org/debian/pool/main/r/rsync/rsync_3.1.1-3_armhf.deb -qP /tmp/
wget http://ftp.us.debian.org/debian/pool/main/a/attr/libattr1_2.4.47-2_armhf.deb -qP /tmp/
wget http://ftp.us.debian.org/debian/pool/main/a/acl/libacl1_2.2.52-2_armhf.deb -qP /tmp/
wget http://ftp.us.debian.org/debian/pool/main/p/popt/libpopt0_1.16-10_armhf.deb -qP /tmp/
dpkg -x /tmp/rsync_3.1.1-3_armhf.deb /tmp/deb
dpkg -x /tmp/libattr1_2.4.47-2_armhf.deb /tmp/deb
dpkg -x /tmp/libacl1_2.2.52-2_armhf.deb /tmp/deb
dpkg -x /tmp/libpopt0_1.16-10_armhf.deb /tmp/deb

Install SonarQube

<?php
$URL="https://raw.githubusercontent.com/panticz/installit/master/install.sonarqube.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 "

";
?>

WebGUI
http://172.29.14.185:9000/

Logfile
tail -f /opt/sonar/logs/sonar.log

Links
http://sonar-pkg.sourceforge.net/
http://docs.sonarqube.org/display/SONAR/Requirements
https://github.com/Godin/sonar-native-packages
https://gist.github.com/micheleorsi/bd20912b2489f3432558

LXC: Installation under Ubuntu / Debian

<?php
$URL="https://raw.githubusercontent.com/panticz/installit/master/install.lxc.sh";
echo "wget --no-check-certificate $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 "

";
?>

# install under Debian Jessie
apt-get install bridge-utils
wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/installit/master/install.lxc.sh -O - | bash -s -- -b
#wget http://mirrors.kernel.org/ubuntu/pool/main/l/lxc/lxc_1.0.7-0ubuntu0.2_amd64.deb -P /tmp/
#dpkg -x /tmp/lxc_1.0.7-0ubuntu0.2_amd64.deb /tmp/
#cp -a /tmp/etc/* /etc/

# Check kernel configuration
lxc-checkconfig

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 "

";
$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
echo nameserver 8.8.8.8 > /var/lib/lxc/${CONTAINER}/rootfs/etc/resolv.conf

# test
http://without-systemd.org/wiki/index.php/How_to_remove_systemd_from_a_Debian_jessie/sid_installation