warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/ on line 33.

Brother MFC-1910W

Install printer
wget -O - | bash -



# Install printer
wget -q -P /tmp
wget -q -P /tmp
dpkg -i /tmp/mfc1910*.deb
lpadmin -p Brother-MFC-1910 -E -v socket://${IP}:9100  -P /usr/share/ppd/brother/brother-MFC1910W-cups-en.ppd -o PageSize=A4

# Install scanner
wget -q -P /tmp
dpkg -i /tmp/brscan4-0.4.3-3.amd64.deb
brsaneconfig4 -a name=MFC-1910W2 model=MFC-1910W ip=${IP}

Check for newer DEB packages

Install OpenRA (Command & Conquer Red Alert) under Ubuntu

wget -O - | bash -s


sudo apt-get install libmono-i18n4.0-all
wget -q -O /tmp/openra_release_all.deb
sudo dpkg -i /tmp/openra_release_all.deb
sudo apt-get install -f

Check for latest version


# Network configuration

# show release
cat /etc/redhat-release

# update packages
yum update
yum upgrade -y

# install ssh
yum install -y openssh-server

# allow sudo for a user
usermod -a -G wheel

# PHP 5.6 on CentOS 7

# Nework configuration
vi /etc/sysconfig/network-scripts/ifcfg-eth0

Install SonarQube

wget -O - | bash -


# install Java
wget -q --no-check-certificate -O - | bash -

# install SonarQube
echo "deb binary/" > /etc/apt/sources.list.d/sonar.list
sudo apt-get update
sudo apt-get install -y --force-yes sonar

# autostart SonarQube
sudo update-rc.d sonar defaults


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


Install SSH VPN server

export CONTAINER=vpn

# create container
# TODO: configure MAC on create container
wget -q --no-check-certificate -O - | bash -s -- -f

# configure container MAC address
sed -i 's| = .*| = 00:11:22:33:44:5e|' /var/lib/lxc/${CONTAINER}/config

# enable autostart
echo " = 1" | tee -a /var/lib/lxc/${CONTAINER}/config

# configure container
##echo "lxc.hook.autodev=/var/lib/lxc/vpn/autodev" >> /var/lib/lxc/${CONTAINER}/config

LXC: create Ubuntu Trusty container

wget -q --no-check-certificate -O - | bash -s


[ -z ${CONTAINER} ] && CONTAINER=trusty

# force, remove previous container
if [ "$1" == "-f" ]; then
  [ $(sudo lxc-ls ${CONTAINER} | wc -l) -gt 0 ] && sudo lxc-destroy -f -n ${CONTAINER}

# create container
sudo lxc-create -t ubuntu -n ${CONTAINER} -- template-options -r trusty $@

# workaround for "Failed to mount cgroup at /sys/fs/cgroup/systemd: Permission denied"
echo "lxc.aa_profile = unconfined" | sudo tee -a /var/lib/lxc/${CONTAINER}/config

# start container in background
sudo lxc-start -d -n ${CONTAINER}

# wait 3 seconds until network is up
sleep 3

# copy APT proxy configuration from host
APT_PROXY=$(grep -h "Acquire::http::Proxy" /etc/apt/* -r | head -1)
[ -n "${APT_PROXY}" ] && echo ${APT_PROXY} | sudo tee /var/lib/lxc/${CONTAINER}/rootfs/etc/apt/apt.conf.d/01proxy

# update packages in container
sudo lxc-attach -n ${CONTAINER} -- apt-get update
sudo lxc-attach -n ${CONTAINER} -- apt-get dist-upgrade -y

# show containers status
sudo lxc-ls ${CONTAINER} -f

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

Debian: Install MariaDB

wget -O - | bash -


apt-get install python-software-properties

apt-key adv --recv-keys --keyserver 0xcbcb082a1bb943db
add-apt-repository 'deb wheezy main'
apt-get update

apt-get install -y mariadb-server

DMA (Dragonfly Mail Agent)

# ansible role

# preconfigure
echo "dma dma/relayhost string" | debconf-set-selections
echo "dma dma/mailname string $(hostname -f)" | debconf-set-selections

# install
apt-get install -y dma

# configure relayhost
echo "user|smarthost:password" >> /etc/dma/auth.conf

# send testmail
echo "This is a test message from ${USER}@$(hostname -f) at $(date)" | /usr/sbin/sendmail

Configuration files
# /etc/dma/dma.conf
AUTHPATH /etc/dma/auth.conf


# 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

Use ecrypted home directory and sshuttle

sudo apt-get install -y ecryptfs-utils sshuttle

sudo adduser --encrypt-home foo

ecryptfs-mount-private foo

sudo usermod -aG sudo foo

su - foo
sshuttle --dns --remote -x

Syndicate content