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.

Install Sun / Oracle Java JDK under Ubuntu

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

#!/bin/bash

# ensure that this script is run by root
if [ $(id -u) -ne 0 ]; then
  sudo $0
  exit
fi

# install debconf
apt-get install -y debconf-utils

# create answer file
debconf-set-selections <<\EOF
oracle-java8-installer shared/accepted-oracle-license-v1-1 select true
EOF

# ensure that add-apt-repository is installed
. /etc/os-release
if [ "${ID}" == "debian" ] && [ "${VERSION_ID}" == "7" ] ; then
  # Debian Wheezy
  apt-get install -y python-software-properties
else
  # Ubuntu and Debian Jessie
  apt-get install -y software-properties-common
fi

# add repository
add-apt-repository -y ppa:webupd8team/java

# fix distribution name on Debian
for FILE in $(find /etc/apt/sources.list.d/ -name "*webupd8team*.list"); do
  sed -i 's|wheezy|precise|g;s|jessie|trusty|g' ${FILE}
done

# update repository
apt-get update -qq

#  bypass the apt-cacher-ng proxy
echo 'Acquire::HTTP::Proxy::download.oracle.com "DIRECT";' > /etc/apt/apt.conf.d/99_oracle

# install
apt-get install -y oracle-java8-installer

# set Java environment variables
apt-get install -y oracle-java8-set-default

# set java 8 as default java version
update-java-alternatives -s java-8-oracle

# move java desktop symbols
[ -f /usr/share/applications/JB-mission-control-jdk8.desktop ] && sed -i 's|Categories=Development;Java;|Categories=Application;Network;|g' /usr/share/applications/JB-mission-control-jdk8.desktop

Install JDK under Debian 7 (minimal)
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" > /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
echo 'Acquire::HTTP::Proxy::download.oracle.com "DIRECT";' > /etc/apt/apt.conf.d/99_oracle
apt-get update
echo "oracle-java7-installer shared/accepted-oracle-license-v1-1 select true" | debconf-set-selections
apt-get install -y oracle-java7-installer
apt-get install -y oracle-java7-set-default

Download JDK manually
# v7
URL=http://download.oracle.com/otn-pub/java/jdk/7u71-b14/jdk-7u71-linux-x64.tar.gz
# v8
URL=http://download.oracle.com/otn-pub/java/jdk/8u77-b03/jdk-8u77-linux-x64.tar.gz
# download
wget --continue --no-check-certificate --header "Cookie: oraclelicense=a" ${URL} -O /tmp/${URL##*/}

# http://download.oracle.com/otn-pub/java/jdk/8u77-b03/jdk-8u77-linux-x64.tar.gz?AuthParam=1458983739_a16ec49d4ccc02fd689b10ad958ab0ce

# fix repo key
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886

OPTIONAL: Uninstall OpenJDK
sudo apt-get remove -y openjdk-7-jre-headless

Display your current java version
java -version

# configure systemwide profile
echo "export JAVA_HOME=/opt/jvm/current" > /etc/profile.d/java.sh

Links
http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html
http://www.webupd8.org/2012/11/oracle-sun-java-6-installer-available.html - HowTo, install Java under Ubuntu and Debian
https://launchpad.net/~webupd8team/+archive/java - webupd8team Java repository
https://www.thomas-krenn.com/de/wiki/Oracle_Java_JRE_unter_Ubuntu_installieren

Install Jameica + Hibiscus online banking

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

#!/bin/bash

# install Java
wget https://raw.githubusercontent.com/panticz/installit/master/install.java-jdk.sh -O - | bash -

# download Jameica
if [ "$(uname -m)" == "x86_64" ]; then
  # 64 bit
  URL=http://www.willuhn.de/products/jameica/releases/current/jameica/jameica-linux64.zip
else
  # 32 bit
  URL=http://www.willuhn.de/products/jameica/releases/current/jameica/jameica-linux.zip
fi
wget ${URL} -P /tmp

# install Jameica
sudo unzip /tmp/jameica-linux*.zip -d /opt/

# download Hibiscus
wget http://www.willuhn.de/products/hibiscus/releases/current/hibiscus.zip -P /tmp

# install Hibiscus
sudo unzip /tmp/hibiscus.zip -d /opt/jameica/plugins/

# create start entry
cat << EOF | sudo tee /usr/share/applications/Hibiscus.desktop
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Hibiscus
Type=Application
Terminal=false
Exec=/opt/jameica/jameica.sh
Icon=/opt/jameica/jameica-icon.png
Categories=Office;Finance;
EOF

Links
https://launchpad.net/~dennis-benndorf/+archive/ubuntu/ppa - PPA
https://www.willuhn.de/wiki/doku.php?id=support:bezugsquellen
http://wiki.ubuntuusers.de/Hibiscus
http://www.willuhn.de/products/jameica/download.php
http://www.willuhn.de/products/hibiscus/download.php
http://www.heise.de/download/linux/office/finanzsoftware/homebanking-50003505037/

Install thttpd

apt-get install thttpd

sed -i 's|ENABLED=no|ENABLED=yes|g' /etc/default/thttpd

/etc/init.d/thttpd restart

# Links
http://wiki.zaphot.net/index.php?title=Thttpd

Install glusterfs server

wget -q http://installit.googlecode.com/hg/install.glusterfs-server.sh -O - | bash -


  
  
  Error 404 (Not Found)!!1
  
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}}#logo{background:url(//www.google.com/images/branding/googlelogo/1x/googlelogo_color_150x54dp.png) no-repeat;margin-left:-5px}@media only screen and (min-resolution:192dpi){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat 0% 0%/100% 100%;-moz-border-image:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) 0}}@media only screen and (-webkit-min-device-pixel-ratio:2){#logo{background:url(//www.google.com/images/branding/googlelogo/2x/googlelogo_color_150x54dp.png) no-repeat;-webkit-background-size:100% 100%}}#logo{display:inline-block;height:54px;width:150px}
  
  
  404. That’s an error.
  The requested URL /hg/install.glusterfs-server.sh was not found on this server.  That’s all we know.
1

Brother MFC 7320

Install printer
wget https://raw.githubusercontent.com/panticz/installit/master/hardware/install.brother-mfc-7320.printer.sh -O - | bash -

#!/bin/bash

# enable multiverse repository
cat <<EOF> /etc/apt/sources.list.d/extra-repository.list
deb http://archive.ubuntu.com/ubuntu $(lsb_release -cs) universe
deb http://archive.ubuntu.com/ubuntu $(lsb_release -cs) multiverse
EOF
apt-get update -qq

# install printer driver
apt-get install -y brother-cups-wrapper-laser

# remove multiverse repository
rm /etc/apt/sources.list.d/extra-repository.list
apt-get update -qq

# create printer
lpadmin -p Brother-MFC-7320 -E -v usb://Brother/MFC-7320 -P /usr/share/ppd/Brother/MFC7220.ppd -o PageSize=A4

# FIXME: set resolution to 1200
# -o Resolution=1200x600dp

Install scanner
wget https://raw.githubusercontent.com/panticz/installit/master/hardware/install.brother-mfc-7320.scanner.sh -O - | bash -

#!/bin/bash

# patch udev rules
cat <<EOF>> /lib/udev/rules.d/40-libsane.rules
ATTRS{idVendor}=="04f9", ENV{libsane_matched}="yes"
EOF

# restart udev
sudo service udev restart

# download driver
wget http://pub.brother.com/pub/com/bsc/linux/dlf/brscan3-0.2.11-4.i386.deb -P /tmp

# install driver
sudo dpkg -i /tmp/brscan3-0.2.11-4.i386.deb

Install OpenElec PXE TFTP boot

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

#!/bin/bash

URL=http://www.openelec.tv/get-openelec/download/finish/4-fusion-builds/253-openelec-stable-fusion-x86-64

wget -q ${URL} -O /tmp/OpenELEC-Fusion.x86_64.tar
tar xf /tmp/OpenELEC-Fusion.x86_64.tar -C /tmp/

cp /tmp/OpenELEC*/target/KERNEL /var/lib/tftpboot/openelec/KERNEL
cp /tmp/OpenELEC*/target/SYSTEM /media/openelec/

if [ $(grep openelec /etc/fstab | wc -l) == 0 ]; then
cat <<EOF>> /etc/fstab
/media/openelec       /export/openelec none    bind  0  0
EOF
fi

if [ $(grep openelec /etc/exports | wc -l) == 0 ]; then
cat <<EOF>> /etc/exports
/export/openelec  192.168.2.0/24(rw,nohide,insecure,no_subtree_check,async)
EOF
fi

if [ -f /var/lib/tftpboot/pxelinux.cfg/openelec.conf ]; then
cat <<EOF> /var/lib/tftpboot/pxelinux.cfg/openelec.conf
LABEL linux
   MENU LABEL OpenElec
   KERNEL openelec/KERNEL
   APPEND ip=dhcp boot=NFS=192.168.2.1:/export/openelec disk=NFS=192.168.2.1:/export/openelec/storage overlay ssh
# nosplash
EOF
fi

Configuration
# create autostartfile
storage/00252233d9d1/.config/autostart.sh

# xbmc config
storage/00252233d9d1/.xbmc/userdata/guisettings.xml

# configure remote
storage/00252233d9d1/.xbmc/userdata/keymaps/Keymap.xml

# system lirc / keyboard config
/usr/share/xbmc/system

Links
http://openelec.tv/get-openelec

Instal twinkle

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

#!/bin/bash

RELEASE=$(lsb_release -rs | tr -d ".")
if [ ${RELEASE} -ge 1404 ]; then
  # use precise, trusty seams to by broken
  apt-get remove -y twinkle
  echo "deb http://ubuntu.mirror.cambrium.nl/ubuntu/ precise main universe" > /etc/apt/sources.list.d/twinkle.list
  apt-get update
  apt-get install -y twinkle/precise
  echo "twinkle hold" | sudo dpkg --set-selections
  rm /etc/apt/sources.list.d/twinkle.list
  apt-get update
else
  apt-get install -y twinkle
fi

# Links
https://bugs.launchpad.net/ubuntu/+source/twinkle/+bug/1297649

Install DLNA server under Debian / Ubuntu Linux (MiniDLNA)

# configure domU
[ -z $DOMAIN_NAME ] && DOMAIN_NAME=dlna
[ -z $DOMAIN_MAC ] && DOMAIN_MAC=00:d1:1a:00:00:00
[ -z $DOMAIN_RAM ] && DOMAIN_RAM=256Mb
[ -z $DOMAIN_HDD ] && DOMAIN_HDD=2Gb

# create domU
http://www.panticz.de/DomU-Debian-Sid

# add repository (squezze only)
if [ $(lsb_release -cs) == "squeeze" ]; then
echo "deb http://ftp.de.debian.org/debian sid main" > /etc/apt/sources.list.d/sid.list
apt-get update
fi

# install minidlna
apt-get install -y minidlna

# remove repository (squezze only)
if [ $(lsb_release -cs) == "squeeze" ]; then

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

Syndicate content