# vim ~/.fluxbox/init
Den Wert unter session.screen0.edgeSnapThreshold: von 0 auf etwa 10 anpassen.
# vim ~/.fluxbox/init
# aptitude install sun-java6-jdk
# update-alternatives --config javaauswaehlen.
# vim /etc/profile
JAVA_HOME="/usr/lib/jvm/java-6-sun"
export PATH JAVA_HOME PS1
# wget http://apache.eu.lucid.dk/tomcat/tomcat-6/v6.0.18/bin/apache-tomcat-6.0.18.tar.gz
# tar -xzvf apache-tomcat-6.0.18.tar.gz
# mv apache-tomcat-6.0.18 /usr/local
# ln -s /usr/local/apache-tomcat-6.0.18 /usr/local/tomcat
#!/bin/sh
case $1 in
start)
sh /usr/local/tomcat/bin/startup.sh
;;
stop)
sh /usr/local/tomcat/bin/shutdown.sh
;;
restart)
sh /usr/local/tomcat/bin/shutdown.sh
sh /usr/local/tomcat/bin/startup.sh
;;
esac
exit 0
# chmod +x /etc/init.d/tomcat
# update-rc.d tomcat defaults
# vim /usr/local/tomcat/conf/tomcat-users.xml
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users>
<role rolename="manager"/>
<role rolename="admin"/>
<user username="admin" password="gas" roles="admin,manager"/>
</tomcat-users>
# /etc/init.d/tomcat start
# aptitude install apache2 libapache2-mod-jk
workers.tomcat_home=/usr/local/tomcat
workers.java_home=/usr/lib/jvm/java-6-sun
ps=/
worker.list=default
worker.default.port=8009
worker.default.host=localhost
worker.default.type=ajp13
worker.default.lbfactor=1
<ifmodule mod_jk.c>
JkWorkersFile /etc/apache2/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel error
</ifmodule>
# /etc/init.d/apache2 stop
# /etc/init.d/tomcat restart
# /etc/init.d/apache2 start
JkMount /*.jsp defaultDadurch werden alle *.jsp Files an den Tomcat uebergeben.
# /etc/init.d/apache2 reload
<host name="servername" appBase="/var/www/" unpackWARs="true" autoDeploy="true">
<context path="" docBase="." debug="0" reloadable="true"/>
<valve className="org.apache.catalina.valves.AccessLogValve"
directory="/var/www/logs" prefix="tomcat_access_" suffix=".log"
pattern="common" resolveHosts="false"/>
</host>
/etc/init.d/tomcat restart
<IfModule dir_module>
DirectoryIndex index.html index.php index.jsp
</IfModule>
# vim /var/www/helloworld.jsp
<head>
<title>Hello World JSP</title>
</head>
<body>
<h1>
<%
out.println("Hello World");
%>
</h1>
</body>
</html>
apt-get install ntp ntpdate
driftfile /var/lib/ntp/ntp.drift
# Timeserver der physikalisch-Technischen Bundesanstalt
server ptbtime1.ptb.de
server ptbtime2.ptb.de
restrict ptbtime1.ptb.de
restrict ptbtime2.ptb.de
restrict 127.0.0.1
restrict 10.2.2.0 mask 255.255.255.0
restrict default notrust nomodify nopeer
/etc/init.d/ntp start
apt-get install ntp ntp-simple ntpdate
driftfile /var/lib/ntp/ntp.drift
server 10.2.2.1
restrict 10.2.2.1
restrict 127.0.0.1
restrict default notrust nomodify nopeer
/etc/init.d/ntp restart
ntpq -p
ntpdc -p
# aptitude install openvpn
# modprobe tunnachladen bzw in die /etc/modules eintragen.
# sudo mkdir -p /dev/net
# sudo mknod /dev/net/tun c 10 200
# sudo chmod 600 /dev/net/tun
# cd /etc/openvpn
Key erstellen:
# openvpn --genkey --secret name.key
# chmod go-rwx name.key
# vim /etc/openvpn/name.conf
dev tun
ifconfig 10.0.0.1 10.0.0.2
secret ./name.key
port 1194
proto udp
# vim /etc/openvpn/servername.conf
remote servername.domain.de
dev tun
ifconfig 10.0.0.2 10.0.0.1
secret /home/username/name.key
port 1194
proto udp
interface eth0 internet
...
server custom openvpn "tcp/1194 udp/1194" default accept
# /etc/init.d/openvpn restart
# openvpn --config /etc/openvpn/servername.conf
Fuer LAN (vorausgesetzt tun0 ist das Tunnelinterface und eth1 das Interface zum LAN)
router vpn2lan inface tun0 outface eth1
# client all accept
# server all accept
masquerade
route all accept
router vpn2internet inface tun0 outface eth0
# Wenn nicht alles erlaubt sein soll, dann ggf. wie gewohnt erlauben/blocken
masquerade
route all accept
# neues gateway
route-gateway 10.0.0.1
# Netz und Maske des entfernten LANs
route 192.168.0.0 255.255.255.0
# bisheriges Standardgateway erstetzen
redirect-gateway
# Saemtliche Adressen ueber den VPN Server routen
route 0.0.0.0 0.0.0.0
route add 192.168.99.0 mask 255.255.255.0 10.0.0.1 metric 1 -p
aptitude install openssl
# cd /etc/ssl/erstellen.
# /usr/lib/ssl/misc/CA.sh -newca
openssl ca -gencrl -out name
openssl dhparam -out dh2048.pem 2048(Das dauert ewig)
openssl req -nodes -new -keyout servername.key -out servername.csr
openssl ca -out servername.crt -in servername.csr
dev tun
ifconfig 10.0.0.1 10.0.0.2
tls-server
dh /etc/ssl/FBCA/dh2048.pem
ca /etc/ssl/FBCA/cacert.pem
cert /etc/ssl/FBCA/newcerts/fblxfw0.pem
key /etc/ssl/FBCA/private/fblxfw0.key
crl-verify /etc/ssl/FBCA/crl.pem
port 1194
proto udp
verb 3
remote servername.bla.de
dev tun
ifconfig 10.0.0.2 10.0.0.1
tls-client
ca /home/username/cacert.pem
cert /home/username/username.pem
key /home/username/username.key
port 1194
proto udp
verb 3
// Routing wie bei Methode 1. je nach dem was man will.
openvpn --config pfadzurconfigstarten.
/etc/init.d/openvpn start.
openssl ca -revoke /etc/ssl/CABLA/newcerts/certifikateTorevoke.pem
crl-verify /etc/ssl/FBCA/crl.pem
comp-lzo
openvpn --genkey --secret tlsauth.key
tls-auth tlsauth.key
reneg-sec 1800
auth-user-pass-verify skript.sh via-env
#!/bin/sh
USER="bam"
PASSWD="gas"
if [ "$username" == "$USER" ] && [ "$password" == "$PASSWD" ]
then exit 0
fi
exit 1
# aptitude install bind9
forwarders {
IP1;
IP2; ...
};
# aptitude install dhcp3-server
ddns-update-style none;
option domain-name-servers 192.168.0.1;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.3 192.168.0.100;
option routers 192.168.0.1;
}
host server1 {
hardware ethernet 00:11:22:33:44:5;
fixed-address 192.168.0.2;
}
aptitude install libpopt-dev libxmu-dev libxinerama-dev
wget http://repetae.net/computer/whaw/drop/whaw-0.1.2.tar.gz
tar -xzf whaw-0.1.2.tar.gz
cd whaw-0.1.2
./configure
make
make install
whaw &
/usr/share/fonts/truetype/
~/.fonts/
fc-cache -fv
fc-list | col | sort | less
XTerm*background: Black
XTerm*foreground: White
XTerm*locale: true
XTerm*utf8: 1
XTerm*faceName: Courier New
XTerm*faceSize: 7
xrdb ~/.Xdefaults
aptitude install xosd-bin
#!/bin/bash
ACTION="$1"
MIXER="Master"
VALUE="1"
FONT="-adobe-helvetica-bold-*-*-*-34-*-*-*-*-*-*-*"
[ -z "${ACTION}" ] && echo "Usage: $0 [up|down|toggle]"
if [ "${ACTION}" == "up" ]; then
amixer sset ${MIXER} ${VALUE}+ unmute
elif [ "${ACTION}" == "down" ]; then
amixer sset ${MIXER} ${VALUE}- unmute
elif [ "${ACTION}" == "toggle" ]; then
amixer -q set ${MIXER} toggle
fi
killall osd_cat > /dev/null 2>&1
if [ "$(amixer sget $MIXER,0 | grep "off")" == "" ]; then
PERCENT=$(amixer sget $MIXER,0 | grep "Front Left:" | cut -d "[" -f2 | cut -d "%" -f1)
osd_cat -p bottom -A center -o 30 -b percentage -P ${PERCENT} -d 1
else
echo "MUTE" | osd_cat -f ${FONT} -p bottom -A center -o -120 -d 1
fi
a2enmod rewrite && invoke-rc.d apache2 restart
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\..* [NC]
RewriteCond %{HTTP_HOST} ^([^\.]+)\.domain\.de([.*]?)$
RewriteCond /var/www/%1 -d
RewriteRule ^(.*) http://domain\.de/%1$1 [L]
kernel = '/usr/lib/xen/boot/hvmloader'
builder = 'hvm'
memory = 1024
device_model = '/usr/lib/xen/bin/qemu-dm'
name = 'asd'
vif = [ 'type=ioemu, bridge=eth0' ]
# This is for using an LVM volume as a virtual disk
disk = [ 'phy:/dev/vg0/lvm-disk,hda,w', 'file:/home/images/Microsoft/Windows/2003_x64/EN_CD_01.iso,hdc:cdrom,r' ]
boot='cd'
# the number of cpus guest platform has, default=1
#vcpus=1
# enable/disable HVM guest ACPI, default=0 (disabled)
acpi=1
# enable/disable HVM guest APIC, default=0 (disabled)
apic=1
# enable SDL library for graphics, default = 0
#sdl=0
# enable VNC library for graphics, default = 0
#vnc=1
#vnclisten='0.0.0.0'
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
dcpromo
# actually check for color-support and set real fancy prompt
if (tput setaf 1) >&/dev/null
then
if [ $USER = 'root' ]
then
PS1='\[\e[0;31m\]\u@\h\[\e[m\]:\w\$ '
else
PS1='\[\e[0;32m\]\u@\h\[\e[m\]:\w\$ '
fi
fi
source .bashrc
aptitude install eterm
background: none
fbsetbg -f /usr/share/backgrounds/warty-final-ubuntu.png
xrdb ~/.Xdefaults
unclutter -idle 1 &
whaw &
fbpager -w &
qbat &
nm-applet &
bluetooth-applet &
xcompmgr -c &
xterm &
exec /usr/bin/fluxbox
Mod1 F1 :RootMenu
OnDesktop Mouse1 :HideMenus
!OnDesktop Mouse2 :WorkspaceMenu
!OnDesktop Mouse3 :RootMenu
Mod1 r :Reconfigure
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Close Window
!!!!!!!!!!!!!!!!!!!!!!!!!
Mod1 F4 :Close
Mod1 Shift F4 :KillWindow
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Window - handling
!!!!!!!!!!!!!!!!!!!!!!!!
Mod1 Tab :NextWindow 1
Mod1 Shift Tab :PrevWindow
Mod1 Return :Fullscreen
Mod4 Return :Fullscreen
Mod4 m :Minimize
Mod4 s :Stick
Mod4 f :Shade
Mod4 Shift Right :MoveRight 1
Mod4 Shift Left :MoveLeft 1
Mod4 Shift Up :MoveUp 1
Mod4 Shift Down :MoveDown 1
Mod4 Control Left :Resize -1 0
Mod4 Control Right :Resize 1 0
Mod4 Control Up :Resize 0 -1
Mod4 Control Down :Resize 0 1
Mod4 Shift Control Left :MoveTo 0 * Left
Mod4 Shift Control Right :MoveTo 0 * Right
Mod4 Shift Control Up :MoveTo * 0 Upper
Mod4 Shift Control Down :MoveTo * 0 Lower
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Frame/Tab - handling
!!!!!!!!!!!!!!!!!!!!!!!!
Mod4 Left :PrevTab
Mod4 Right :NextTab
Mod4 d :DetachClient
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Workspace - handling
!!!!!!!!!!!!!!!!!!!!!!!!
Mod1 Control Right :NextWorkspace
Mod1 Shift Control Right :TakeToNextWorkspace
Mod1 Control Left :PrevWorkspace
Mod1 Shift Control Left :TakeToPrevWorkspace
!Mod1 Control Tab :NextWorkspace
!Mod1 Control Shift Tab :PrevWorkspace
Mod1 1 :Workspace 1
Mod1 Shift 1 :TakeToWorkspace 1
Mod1 2 :Workspace 2
Mod1 Shift 2 :TakeToWorkspace 2
Mod1 3 :Workspace 3
Mod1 Shift 3 :TakeToWorkspace 3
Mod1 4 :Workspace 4
Mod1 Shift 4 :TakeToWorkspace 4
!!!!!!!!!!!!!!!!!!!!!!!!!
! Sound
!!!!!!!!!!!!!!!!!
!XF86AudioMute :ExecCommand amixer -q set Master toggle
!XF86AudioRaiseVolume :ExecCommand amixer -q set Master 1+ unmute
!XF86AudioLowerVolume :ExecCommand amixer -q set Master 1- unmute
!http://supernerd0.blogspot.com/2008/12/debianxosd-volume-mit-amixer.html
XF86AudioMute :ExecCommand /path/amixerxosd.sh toggle
XF86AudioRaiseVolume :ExecCommand /path/amixerxosd.sh up
XF86AudioLowerVolume :ExecCommand /path/amixerxosd.sh down
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! Direct Commands
!!!!!!!!!!!!!!!!!!!!!!!!!
Mod1 F2 :ExecCommand fbrun -bg black -fg white -font Matto -title Run -w 200 -h 30 -pos 0 729
Mod1 Escape :ExecCommand xterm
!Mod1 asciicircum :ExecCommand xterm
Mod4 L :ExecCommand sleep 0.1; xtrlock
shell -$SHELL
startup_message off
defscrollback 10000
defutf8 on
altscreen on
vbell off # turn off visual bell
activity '[%c] Activity in %n%f %t!'
pow_detach_msg 'Bye'
autodetach on
bind r source ${HOME}/.screenrc
bind + resize +3
bind - resize -3
bind ^[ #disable copy with C-a Esc
bindkey -k F1 prev
bindkey -k F2 next
##
# yellow blue
#caption always "%{+u wk}%L=%-w%50>%?%F%{+b by}%:%{+b kd}%? %n %t %{-}%+w%-0< %-= %H - %c"
##
# gray
caption always "%{+u wk}%L=%-w%50>%?%F%{+b kd}%:%{+b dk}%? %n %t %{-}%+w%-0< %-= %H - %c"
##
# screen farben:
# 0 Black . leave color unchanged
# 1 Red b blue
# 2 Green c cyan
# 3 Brown / yellow d default color
# 4 Blue g green b bold
# 5 Purple k blacK B blinking
# 6 Cyan m magenta d dim
# 7 White r red r reverse
# 8 unused/illegal w white s standout
# 9 transparent y yellow u underline
##
# caption description:
# ------------------------------------------------------------------------------
# caption always "%?%F%{-b bc}%:%{-b bb}%?%C|%D|%M %d|%H%?%F%{+u wb}%? %L=%-Lw%45>%{+b by}%n%f* %t%{-}%+Lw%-0<"
#
# Anything I don't describe is treated literally.
#
# %? - Start of a conditional statement.
# %F - Use this part of the statement if the window has focus (i.e. it
# is the only window or the currently active one).
# %{-b bc} - Turn off bold, blue foreground, cyan background.
# %: - else
# %{-b bb} - Turn off bold, blue foreground, blue background (this obscures
# the text on non-focused windows and just gives a blue line).
# %? - End conditional statement.
# %C - time (hh:mm, leading space) in 12 hour format
# %D - Three-letter day-of-week appreviation
# %M - Three-letter month appreviation
# %d - Day of the month
# %H - hostname
# %? - Start of conditional statement.
# %F - Use this part of the statement if the window has focus.
# %{+u wb} - underlined, white foreground, blue background
# %? - End conditional (if not focused, text remaind blue on blue).
# %L= - truncation/padding point. With the 'L' qualifier, basically
# just acts as a reference point. Further truncation/padding is
# done relative to here, not the beginning of the string
# %-Lw - window list up to but not including the current window (-),
# show window flags (L)
# %45> - truncation/padding marker; place this point about 45% of the
# way into the display area (45)
# %{+b by} - add bold (still underlined from before), blue foreground,
# yellow background
# %n - number of the current window
# %f - flags for current window
# %t - title of current window
# %{-} - undo last color change (so now we're back to underlined white
# on blue) (technically, this is a pop; a second invocation
# would drop things back to unadorned blue on cyan)
# %+Lw - window list from the next window on (-), show window flags (L)
# %-0< - truncation/padding point. Place this point zero spaces (0)
# from the right margin (-).
set nocompatible " disable vi shit
set autoindent " nice indent activate all three
set smartindent
set cindent
set showmatch " Show matching brackets
"set guioptions-=T " No toolbar
set vb t_vb= " turn off beep
set novisualbell " turn off visual bell
set showcmd " display incomplete commands
set hlsearch " highlight searches
set incsearch " find while search
"set virtualedit=all " to be able to set curser behind text
set nobackup " do not keep a backup file
set number " show line numbers
set ignorecase
set scrolloff=5 " keep 5 lines when scrolling
set nowrap " don't wrap lines
set laststatus=2 " 2 line statusbar
set tb=icons " set Toolbar in GUI
syntax on " syntax highlighing
"colorscheme elflord " use this color scheme
colorscheme delek
set background=dark " adapt colors for background
set mouse=a
map[62~
aptitude install pythonpyopenssl make gcc ncursesdev pythontwisted libvncserverdev libzdev patch bin86 libssldev gettext libx11dev pythondev tetexextra tetexbase gscommon pdfjam graphviz fig2dev transfig bridgeutils bcc build-essential mercurial
wget http://bits.xensource.com/oss‐xen/release/3.3.0/xen‐3.3.0.tar.gz
tar xvzpf xen‐3.3.0.tar.gz
cd xen‐3.3.0
make dist
./install.sh
aptitude search linux‐image‐xen
aptitude install linux‐image‐xen‐XXXX
update-rc.d xend defaults 20 21
update-rc.d xendomains defaults 21 20
mkdir /var/lock/subsys/
echo 0 > /proc/sys/net/bridge/bridge-nf-call-iptables
echo 0 > /proc/sys/net/bridge/bridge-nf-call-ip6tables
echo 0 > /proc/sys/net/bridge/bridge-nf-call-arptables
echo 1 > /proc/sys/xen/independent_wallclock