linux

warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/panticz.de/modules/taxonomy/taxonomy.pages.inc on line 33.

Ubuntu 14.04 LTS (Trusty Tahr)

Enable root ssh login
sed -i 's|PermitRootLogin without-password|PermitRootLogin yes|g' /etc/ssh/sshd_config
echo "root:t00r" | chpasswd
service ssh restart

Repository
# Ubuntu Trusty updates repository
cat < /etc/apt/sources.list.d/trusty-updates.list
deb http://de.archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
EOF

apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32 40976EAF437D05B5

Fileserver (Samba and DHCP)

#!/bin/bash
 
# set domU name
DOMAIN_NAME=srv
 
# install vm
xen-create-image --hostname=$DOMAIN_NAME --dhcp --mac=00:11:cc:ab:cd:ef \
--lvm=vg01 --dist=jaunty --mirror=http://archive.ubuntu.com/ubuntu/ --size=4Gb --memory=1Gb --swap=1Gb
 
# rename config file
mv /etc/xen/${DOMAIN_NAME}.cfg /etc/xen/${DOMAIN_NAME}
 
# add to autostart
ln -s /etc/xen/${DOMAIN_NAME} /etc/xen/auto
 
# create lvm for home
lvcreate --name ${DOMAIN_NAME}-media --size 200G vg01
mkfs.ext3 /dev/vg01/${DOMAIN_NAME}-media
 
# configure domU
vi /etc/xen/${DOMAIN_NAME}
(add)
'phy:/dev/vg01/srv-media,xvda3,

Update debootstrap

# update debootstrap
wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/xen/master/scripts/update_debootstrap.sh -O - | bash -
 
#
# OLD?
#
# create recipe
cd /usr/lib/xen-tools/
[ ! -f  lucid.d ] && ln -s karmic.d lucid.d
[ ! -f  maverick.d ] && ln -s karmic.d maverick.d
[ ! -f  natty.d ] && ln -s karmic.d natty.d
[ ! -f  oneiric.d ] && ln -s karmic.d oneiric.d
[ ! -f  precise.d ] && ln -s karmic.d precise.d
[ ! -f  quantal.d ] && ln -s karmic.d quantal.d
[ ! -f  raring.d ] && ln -s karmic.d raring.d
[ ! -f  precise.d ] && ln -s karmic.d trusty.d
[ !

Add proposed repository

#!/bin/bash
 
cat <<EOF>> /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ hardy-proposed main restricted universe
EOF

Configure network bridge

#!/bin/bash
 
# backup original network config
mv /etc/network/interfaces /etc/network/interfaces.org
 
# configure network bridge for xen
cat <<EOF> /etc/network/interfaces
auto lo
iface lo inet loopback
 
# eth0 (internal lan)
auto eth0 eth1 xenbr1
iface eth0 inet static
        address 192.168.1.111
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.5
        #post-up ethtool -K eth0 tx off
 
# eth1 (DSL)
iface eth1 inet manual
        up ifconfig eth1 0.0.0.0 promisc up
 
# xenbr1 (bridge between second nic

extractEbook.sh

#!/bin/bash
 
# install
# apt-get install pdftk
 
FILE=$1
PAGES=$2
OUT=$3
 
COVER=/media/lagerliste/vorlagen/ebook/cover.pdf
 
# check if file already exists
if [ -f ${OUT} ]; then
	echo "${OUT} already exists"
	exit 0
fi
 
# get pages
pdftk A=${COVER} B="${FILE}" cat A1 B${PAGES} output /tmp/pdftk.out.pdf
 
# reduce image resolution
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dPDFSETTINGS=/ebook -sOutputFile="${OUT}" -f /tmp/pdftk.out.pdf
 
# view
if [ -n ${DISPLAY} ]; then
	evince "${OUT}"
fi
 
 
# USAGE
# ./mkEbook.sh s02_s201.pdf 1-3  ../ebook/l83_1.1_antike.pdf

Compile error on Intrepid

/home/pako/xserver-xorg-video-ati-6.6.3# fakeroot ./debian/rules binary
 
mkdir stampdir
>stampdir/stampdir
if [ ! -e stampdir/patches ]; then \
		mkdir stampdir/patches; \
		ln -s stampdir/patches .pc; \
		echo 2 >stampdir/patches/.version; \
	fi; \
	if [ ! -e stampdir/log ]; then \
		mkdir stampdir/log; \
	fi; \
	if [ ! -e patches ]; then \
		ln -s debian/patches patches; \
	fi; \
	>stampdir/prepare
if ! [ `which quilt` ]; then \
		echo "Couldn't find quilt.

Install MySQL Server

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

#!/bin/bash

debconf-set-selections <<\EOF
mysql-server-5.5 mysql-server/root_password_again string root
mysql-server-5.5 mysql-server/root_password string root
EOF
 
# install
sudo apt-get -y install mysql-server

Huawei UMTS USB Stick

Mobile Connect Settings (under Mac OS X)
Profile Name: t-mobile
Access Point Name: internet.t-mobile
Telephone Number: *99***1#
Account Name: t-mobile
Password: tm
Authentication: CHAP

NetzClub APN
pinternet.interkom.de

disable pin on sim card
sudo mmcli -i 0 --disable-pin --pin=
#sudo apt-get install gsm-utils
#sudo gsmctl -d /dev/ttyACM0 -o unlock sc all YOUR_PIN_NUMBER

Links
http://blog.surgeons.org.uk/2008/02/three-cheers-for-vodafone.html
http://www.draisberghof.de/usb_modeswitch/

Syndicate content