install

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.

XEN: Install Hypervisor (Dom0) under Debian

wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/installit/master/install.xen.sh -O - | bash -

#!/bin/bash

if [ "$(lsb_release -is)" == "Ubuntu" ]; then
 # install Ubuntu xen kernel
 apt-get install -y xen-system-amd64 xen-tools
 
  # create network bridge
 sed -i 's|auto eth0|#auto eth0|g' /etc/network/interfaces
 sed -i 's|iface eth0 inet dhcp|#iface eth0 inet dhcp|g' /etc/network/interfaces

 cat <<EOF>> /etc/network/interfaces
auto xenbr0
iface xenbr0 inet dhcp
  bridge_ports eth0
EOF
else 
 # install Debian xen kernel
 apt-get install -y xen-linux-system xen-tools debootstrap
 
 # OPTINAL: install qemu for HVM guests
 . /etc/os-release
 if [ ${VERSION_ID} -lt 7 ]; then
    apt-get install -y xen-qemu-dm-4.0
 fi
 
 # Workaround for wheezy "powernow-k8: transition frequency failed" 
 if [[ "$(uname -r)" == *3.2.0* ]]; then
  echo "blacklist powernow_k8" >> /etc/modprobe.d/blacklist.conf
 fi
fi

# configure grub to start xen kernel
dpkg-divert --divert /etc/grub.d/09_linux_xen --rename /etc/grub.d/20_linux_xen
if [ $(grep -c GRUB_DISABLE_OS_PROBER /etc/default/grub) -eq 0 ]; then
    echo "GRUB_DISABLE_OS_PROBER=true" >> /etc/default/grub
fi
update-grub

# OPTIONAL: configure memory for dom0
if [ $(grep -c GRUB_CMDLINE_XEN /etc/default/grub) -eq 0 ]; then
    echo GRUB_CMDLINE_XEN=\"\" >> /etc/default/grub
fi
sed -i 's|GRUB_CMDLINE_XEN="|GRUB_CMDLINE_XEN="dom0_mem=512M |g' /etc/default/grub
sed -i 's|(enable-dom0-ballooning yes)|(enable-dom0-ballooning no)|g' /etc/xen/xend-config.sxp
update-grub
 
# configure network bridge
sed -i 's|# (network-script network-bridge)|(network-script network-bridge)|g' /etc/xen/xend-config.sxp
 
# dont save domU, just shutdown
sed -i 's|XENDOMAINS_SAVE=/var/lib/xen/save|XENDOMAINS_SAVE="" |g' /etc/default/xendomains
sed -i 's|XENDOMAINS_RESTORE=true|XENDOMAINS_RESTORE=false |g' /etc/default/xendomains
 
# create dir for domU autostart
[ -d /etc/xen/auto ] || mkdir /etc/xen/auto
 
# set more cpu time for dom0
sed -i '$ i\xm sched-credit -d Domain-0 -w 512' /etc/rc.local

# FIX for first generatio Athlon / Opteron AMD CPUs
if [[ $(cat /proc/cpuinfo | grep 'model name' | cut -d':' -f2) =~ AMD.*(Athlon.*64.*Processor|Opteron.*185) ]]; then
   sed -i 's|GRUB_CMDLINE_XEN="|GRUB_CMDLINE_XEN="allow_unsafe |g' /etc/default/grub
   update-grub
fi

# clean up blanks
sed -i 's| "|"|g' /etc/default/grub

Enable XL toolstacks
sed -i 's|TOOLSTACK=|TOOLSTACK=xl|g' /etc/default/xen

configure perfomance
http://wiki.xen.org/wiki/Credit_Scheduler
xm sched-credit
xm sched-credit -d www -w 512

# OPTIONAL: sync time
apt-get install -y ntpdate
ntpdate ntp.ubuntu.com
hwclock --systohc
rm /etc/cron.daily/ntpdate

# updae bootstrap
http://www.panticz.de/update_debootstrap

# manually update xen-create-image
wget http://ftp.de.debian.org/debian/pool/main/x/xen-tools/xen-tools_4.3.1-1_all.deb -O /tmp/xen-tools_4.3.1-1_all.deb
dpkg -x /tmp/xen-tools_4.3.1-1_all.deb /tmp/
mv /usr/bin/xen-create-image /usr/bin/xen-create-image.org
cp /tmp/usr/bin/xen-create-image /usr/bin/xen-create-image

# OPTIONAL: enable ip forward in dom0
cp /etc/sysctl.conf /etc/sysctl.conf.org
sed -i 's|#net.ipv4.ip_forward=1|net.ipv4.ip_forward=1|g' /etc/sysctl.conf

# OPTIONAL: PCI delegation
http://www.panticz.de/xen_pci_delegation

# reboot
reboot

# Ubuntu Xen Dom0
apt-get install -y xen-hypervisor-4.2-amd64 xen-tools

# LINKS
http://wiki.debian.org/Xen
http://wiki.xensource.com/xenwiki/XenBestPractices
http://www.panticz.de/configure_network_bridge
http://www.panticz.de/update_debootstrap
http://www.chrisk.de/blog/2008/12/how-to-run-xen-in-ubuntu-intrepid-without-compiling-a-kernel-by-yourself/
http://wiki.debian.org/Xen
https://help.ubuntu.com/community/Xen

Update Ubuntu PXE files

Update pxe configuration
wget http://installit.googlecode.com/hg/preseed/preseed.squeeze.amd64.conf -O /var/lib/tftpboot/pxelinux.cfg/preseed.squeeze.amd64.conf
wget http://installit.googlecode.com/hg/preseed/preseed.wheezy.amd64.conf -O /var/lib/tftpboot/pxelinux.cfg/preseed.wheezy.amd64.conf
wget http://installit.googlecode.com/hg/preseed/preseed.precise.i386.conf -O /var/lib/tftpboot/pxelinux.cfg/preseed.precise.i386.conf
wget http://installit.googlecode.com/hg/preseed/preseed.precise.amd64.conf -O /var/lib/tftpboot/pxelinux.cfg/preseed.precise.amd64.conf

Install Scribus under Ubuntu

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

#!/bin/bash
cat < /etc/apt/sources.list.d/scribus.list
deb http://debian.scribus.net/debian/ raring main
deb http://debian.tagancha.org/debian/ raring main
EOF

sudo gpg --keyserver wwwkeys.pgp.net --recv-keys EEF818CF
sudo gpg --armor --export EEF818CF | sudo apt-key add -

sudo apt-get update
sudo apt-get install -y --force-yes scribus

sudo apt-get remove qt-at-spi

Links
http://wiki.scribus.net/canvas/Debian

Install SQuirreL SQL

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

#!/bin/bash

# download link
URL=http://switch.dl.sourceforge.net/project/squirrel-sql/1-stable/3.5.0-plainzip/squirrel-sql-3.5.0-standard.tar.gz

# install Java JRE
wget http://installit.googlecode.com/hg/install.java-jre.sh -O - | bash -

# download
wget ${URL} -O /tmp/squirrel-sql-3.5.0-standard.tar.gz

# extract
sudo tar xzf /tmp/squirrel-sql-3.5.0-standard.tar.gz -C /usr/lib/
sudo chown root:root -R /usr/lib/squirrel-sql
sudo chmod +r -R /usr/lib/squirrel-sql
sudo ln -s /usr/lib/squirrel-sql-3.5.0-standard /usr/lib/squirrel-sql

# create starter
cat <<EOF> /tmp/squirrel-sql.desktop
[Desktop Entry]
Name=SQuirreL SQL
Comment=SQuirreL SQL Client
Exec=/usr/lib/squirrel-sql-3.5.0-standard/squirrel-sql.sh
Icon=/usr/lib/squirrel-sql-3.5.0-standard/icons/acorn.xpm
Terminal=false
Type=Application
Categories=GTK;Database;Development;Application
EOF

sudo mv /tmp/squirrel-sql.desktop /usr/share/applications/squirrel-sql.desktop
sudo chmod +r /usr/share/applications/squirrel-sql.desktop

# cleanup
rm /tmp/squirrel-sql-3.5.0-standard.tar.gz

Install Brother P-Touch QL-500 / QL-550 / QL-560 / QL-570 under Ubuntu

wget https://raw.githubusercontent.com/panticz/installit/master/hardware/install.brother-ql-labelprinter.sh -O - | bash -

#!/bin/bash

[ ! -d /usr/share/cups/model ] && mkdir /var/spool/lpd
[ ! -d /usr/share/cups/model ] && mkdir /usr/share/cups/model
#ln -s /etc/init.d/cups /etc/init.d/cupsys

# create outdated cupsys init script
cat < /etc/init.d/cupsys
#!/bin/bash

/etc/init.d/cups \$@
EOF
chmod a+x /etc/init.d/cupsys

cat < /var/lib/dpkg/info/ql570cupswrapper.list
./
./usr/
./usr/local/
./usr/local/Brother/
./usr/local/Brother/PTouch/
./usr/local/Brother/PTouch/ql570/
./usr/local/Brother/PTouch/ql570/cupswrapper/
./usr/local/Brother/PTouch/ql570/cupswrapper/cupswrapperql570pt1
./usr/local/Brother/PTouch/ql570/cupswrapper/brcupsconfpt1
EOF

mkdir -p /var/spool/lpd/ql570

wget http://www.brother.com/pub/bsc/linux/dlf/ql570lpr-1.0.1-0.i386.deb -P /tmp
dpkg -i --force-all /tmp/ql570lpr-*.i386.deb

wget http://www.brother.com/pub/bsc/linux/dlf/ql570cupswrapper-1.0.1-0.i386.deb -P /tmp
dpkg -i --force-all /tmp/ql570cupswrapper-*.i386.deb

# connect and power-on the printer

# delete default printer
lpadmin -x QL-570

# create new printer (example for QL-500)
lpadmin -p Brother_P-Touch -E -v usb://Brother/QL-500 -P /usr/share/cups/model/Brother/brother_ql570_printer_en.ppd

# recreate printer
lpadmin -x QL-500
lpadmin -p Brother_QL-500 -E -v usb://Brother/QL-500 -P /usr/share/cups/model/brql500.ppd

lpadmin -p Brother_38x90 -v socket://PRINTSERVER_IP:9100 -E -P /usr/share/cups/model/Brother/brother_ql570_printer_en.ppd -o PageSize=38x90 -o PageRegion=38x90 -o ImageableArea=38x90 -o PaperDimension=38x90

# set Label to 38x90 mm
lpadmin -p Brother_38x90 -v usb://Brother/QL-500 -E -P /usr/share/cups/model/Brother/brother_ql570_printer_en.ppd -o PageSize=38x90 -o PageRegion=38x90 -o ImageableArea=38x90 -o PaperDimension=38x90 -o BrPriority=BrQuality -o orientation-requested-default=4

# test
sudo apt-get install -y psutils

# LINKS
http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/faq_esp.html
http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/instruction_esp1.html
http://solutions.brother.com/linux/en_us/download_esp.html#QL-500
http://welcome.solutions.brother.com/bsc/public_s/es/os/linux/linux_ql500550.html

HowTo: Compile Nautilus

Install compiled 64bit version
wget http://dl.panticz.de/nautilus/nautilus_3.2.1-0ubuntu3.1_amd64.deb
sudo dpkg -i /tmp/nautilus_3.2.1-0ubuntu3.1_amd64.deb
nautilus -q

Automatic installation script
wget http://dl.panticz.de/scripts/rebuild.nautilus.sh -O - | bash -

#!/bin/bash

cd /usr/src/
sudo apt-get install -y dpkg-dev
sudo apt-get source nautilus
sudo apt-get -y build-dep nautilus
sudo sed -i 's|gtk_toolbar_insert (GTK_TOOLBAR (self->priv->toolbar), item, 0);|gtk_toolbar_insert (GTK_TOOLBAR (self->priv->toolbar), item, 2);|g' nautilus-*/src/nautilus-toolbar.c
cd ./nautilus-*/
sudo dpkg-buildpackage -us -uc -b
sudo dpkg -i /usr/share/nautilus_*-0ubuntu*.deb
nautilus -q

Links
http://www.omgubuntu.co.uk/2011/12/how-to-move-nautilus-navigation-buttons-back-to-the-left
http://ubuntuforums.org/showthread.php?p=11501676#post11501676

Install Handbrake

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

#!/bin/bash

sudo apt-add-repository -y ppa:stebbins/handbrake-snapshots
sudo apt-get update -qq
sudo apt-get install -y handbrake-cli handbrake-gtk

Install Chromium

Automatic installation script
wget https://raw.githubusercontent.com/panticz/installit/master/install.chromium.sh -O - | bash -

#!/bin/bash

sudo apt-get install -y chromium-browser

# fix key?
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1397BC53640DB551

Install proftpd FTP server

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

#!/bin/bash

debconf-set-selections <<\EOF
proftpd-basic shared/proftpd/inetd_or_standalone select standalone
EOF

# install
apt-get install proftpd
# ServerType: standalone

# configure 
sed -i 's|# RequireValidShell|RequireValidShell|g' /etc/proftpd/proftpd.conf
sed -i 's|# DefaultRoot|DefaultRoot|g' /etc/proftpd/proftpd.conf
cat <<EOF>> /etc/proftpd/proftpd.conf
<Limit LOGIN>
    DenyGroup !ftpuser
</Limit>
EOF

# create ftpuser group
addgroup ftpuser

# restart
/etc/init.d/proftpd restart

Create new ftp user
adduser ftp_user_1 -shell /bin/false -home /var/www/ftp_user_1/

# add ftp user to grup
adduser ftp_user_1 ftpuser

# clear user dir
rm /var/www/ftp_user_1/.*

Links
http://www.thomas-krenn.com/de/wiki/FTP-Server_unter_Debian_einrichten
http://www.debian-administration.org/article/228/Setting_up_an_FTP_server_on_Debian

Syndicate content