Install LXD

wget https://raw.githubusercontent.com/panticz/installit/master/install.lxd.sh -O - | bash -

#!/bin/bash

sudo apt-get install -y software-properties-common
sudo add-apt-repository -y ppa:ubuntu-lxc/lxd-stable

# use Ubunut Trusty repository on Utopic
sed -i 's|utopic|trusty|g' /etc/apt/sources.list.d/ubuntu-lxc-ubuntu-lxd-stable-utopic.list

sudo apt-get update
sudo apt-get install -y lxd lxc lxcfs

Links
https://linuxcontainers.org/lxd/getting-started-cli/

Compare zones between two Nameserver

OLD_NS=7.7.7.7
NEW_NS=8.8.8.8
for TYPE in A CNAME MX TXT; do
    for i in $(cat /tmp/example.com.inc | grep ${TYPE} | cut  -f1); do
        OLD=$(dig @${OLD_NS} +short ${TYPE} ${i}.example.com)
        NEW=$(dig @${NEW_NS} +short ${TYPE} ${i}.example.com)
 
        if [ "${NEW}" != "${OLD}" ]; then
            echo ${TYPE} ${i}
            echo OLD: ${OLD}
            echo NEW: ${NEW}
            echo
        fi
    done
done

PostgreSQL

-- enable formated output
\x on
 
-- show tables
\dt
 
-- exit
\q

Compile lshw

# install required applications
apt-get -y install build-essential
 
# download and extract
wget http://www.ezix.org/software/files/lshw-B.02.17.tar.gz -P /tmp
tar xzf /tmp/lshw-B.02.17.tar.gz -C /tmp/
 
# compile
cd /tmp/lshw-*/
make
 
# install (optional)
make install
 
# test
lshw -version
 
# executable
/tmp/lshw-*/src/lshw
 
# Links
http://www.ezix.org/project/wiki/HardwareLiSter

Debian: Install MariaDB

wget https://raw.githubusercontent.com/panticz/installit/master/install.mariadb.sh -O - | bash -

#!/bin/bash

apt-get install python-software-properties

apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
add-apt-repository 'deb http://mirror.netcologne.de/mariadb/repo/10.1/debian wheezy main'
apt-get update

apt-get install -y mariadb-server

Debian Wheezy: Install PHP 5.6

# 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 -q http://www.dotdeb.org/dotdeb.gpg -O - | apt-key add -

apt-get update

apt-get install php5

a2enmod php5
service apache2 restart

cat < /etc/apt/sources.list.d/dotdeb.org.list
deb http://packages.dotdeb.org squeeze all
deb-src http://packages.dotdeb.org squeeze all
EOF
apt-get update

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

WordPress

export CONTAINER=wordpress

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

lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = lxcbr0
lxc.network.name = eth0
lxc.network.hwaddr = 00:16:3e:f9:d3:03
lxc.network.mtu = 1500

apt-get install -y apache2 mysql-server php5-mysql wget vi php5
# libapache2-mod-auth-mysql

DMA (Dragonfly Mail Agent)

# preconfigure
echo "dma dma/relayhost string mail.example.com" | debconf-set-selections
echo "ddm dma/mailname string $(hostname -A)" | debconf-set-selections

# install
apt-get install -y dma

# configure relayhost
echo "foo|mail.example.com:bar" >> /etc/dma/auth.conf

# send testmail
echo "This is a test message from ${USER}@${HOSTNAME} at $(date)" | /usr/sbin/sendmail foo@exaple.com

view log
journalctl _COMM=sendmail -f

# configuration (/etc/dma/dma.conf)
SMARTHOST mail.example.com
PORT 25
AUTHPATH /etc/dma/auth.conf
SECURETRANSFER
STARTTLS

Syndicate content