Install GlassFish 4 with Oracle JDK RedHat / CentOS

glassfishDie Installation von GlassFish 4.0 schlägt auf Linux-Systemen welche nicht in englisch installiert sind fehlt. Die folgenden Schritte funktionieren:

 

# uninstall openJDK
   0   yum remove java-1.6.0-openjdk      

# download Oracle JDK
   0   http://www.oracle.com/technetwork/java/javase/downloads/index.html
# install Oracle JAVA
   0   yum reinstall '/tmp/jdk-7u45-linux-x64.rpm' 
   1   java
   2   java -version
   3   alternatives --install /usr/bin/java java /usr/java/jdk1.7.0_45/jre/bin/java 20000
   4   alternatives --install /usr/bin/jar jar /usr/java/jdk1.7.0_45/bin/jar 20000
   5   alternatives --install /usr/bin/javac javac /usr/java/jdk1.7.0_45/bin/javac 20000
   6   alternatives --install /usr/bin/javaws javaws /usr/java/jdk1.7.0_45/jre/bin/javaws 20000
   7   java -version
   8   ls -lA /etc/alternatives/
   9   alternatives --set java /usr/java/jdk1.7.0_45/jre/bin/java
   10  alternatives --set javaws /usr/java/jdk1.7.0_45/jre/bin/javaws
   11  alternatives --set javac /usr/java/jdk1.7.0_45/bin/javac
   12  alternatives --set jar /usr/java/jdk1.7.0_45/bin/jar
   13  update-alternatives --install "/usr/bin/jar" "jar" "/usr/java/jdk1.7.0_45/bin/jar" 1
   14  java -version
   15  export JAVA_HOME=/usr/java/jdk1.7.0_45/bin/java

# install GlassFisht 4.0
   0   wget http://download.java.net/glassfish/4.0/release/glassfish-4.0.zip
   1   unzip -d /opt/oracle/ glassfish-4.0.zip
       # Full edition:
   2a wget http://download.java.net/glassfish/4.0/release/glassfish-4.0-unix.sh
./glassfish-4.0-unix.sh
       # Webedition:
   2b wget http://download.java.net/glassfish/4.0/release/glassfish-4.0-web-unix.sh
./glassfish-4.0-web-unix.sh
       # Avoid error: Fehler beim Rendern von SWIXML Frame=content area Verursacht durch: Invalid SwiXML Descriptor.
   3   LANG=EN sh ./glassfish-4.0-unix.sh
   4   Follow this perfect instructions: https://blog.hazrulnizam.com/?p=207

Script to create Public/Private-key SSH login without password (UPDATE: added port settings)

SSH_Communications_Security_logo.svgTo increment your servers security one position might by to disable ssh login with password and use certificated login instead. But if you are not familiar withe the given tools, creating the requested certificates and how to install them on the server and your client the following script will help you. Just run it on your Mac or *nix system.  Continue reading “Script to create Public/Private-key SSH login without password (UPDATE: added port settings)”

How to set dd (disc dump) verbose (mac / bsd / linux)

Because of the missing verbose mode in GNU dd there is an other application with verbose mode by default. It’s dcfldd.

dcfldd is an enhanced version of GNU dd written by Nicholas Harbour

I especially used it for duplicating Raspberry Pi SD Cards. Without dcfldd you don’t know what time it will take to create the backup or SD Card.

Running Example:

Mac:Downloads andreas$ sudo dcfldd if=RaspberryPi.img of=/dev/disk1 bs=512
1798144 blocks (878Mb) written.

How to install dcfldd:

  1. Download dcfldd-1.3.4-1 :
    (wget http://andreasprang.de/?attachment_id=534)
  2. tar -xvf dcfldd-1.3.4-1.tar
  3. cd dcfldd-1.3.4-1
  4. ./configure
  5. sudo make install clean

Raspberry Pi – set sound interface shell script

Raspberry Pi
Raspberry Pi B © GijsbertPeijs/Flickr (CC BY 2.0)

 

For selecting the audio output I wrote a little script.

 

 

 

 

#!/bin/bash

if test $1  #check if parameter 1 / 0=auto, 1=analog, 2=hdmi is set
then

        echo "Try to select sound Interface:" $1
        sudo amixer cset numid=3  $1

else
        echo " select interface :" 
        echo "0=auto"
        echo "1=analog"
        echo "2=hdmi"
        read -p "Which interface should be used? " interfaceID
        echo "Try to select sound Interface:"  $interfaceID
        sudo amixer cset numid=3 interfaceID
fi

FreeBSD mit XFCE unter VMWare

Für einen unserer Server musste eine Unix / Linux Distribution aufgesetzt werden. Die Wahl hierfür fiel auf FreeBSD. Wir setzen unsere Server gern zunächst in einer VM unter VMWare Fusion auf.

FreeBSD hat sich von durchweg als eine gute Wahl herausgestellt!

Einzige Probleme ergaben sich nach der ausnahmsweise benötigten Installation von X.Org und XFCE. Weder Maus noch Tastatur funktionierten unter dem X-Windows-Server. Continue reading “FreeBSD mit XFCE unter VMWare”