#Updates...
yum update
#Few packages I like throwing on every system (optional)
yum install htop mlocate
updatedb
#Installing the rpmforge repo (optional)
rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
rpm -i rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
#Install JRE
cd /tmp
wget -O jre.bin "http://download.oracle.com/otn-pub/java/jdk/6u26-b03/jre-6u26-linux-x64-rpm.bin"
chmod +x jre.bin
./jre.bin
#Edit profile to insure correct pathing
vi /etc/profile
export JAVA_HOME="/usr/java/latest"
export JAVA_PATH="$JAVA_HOME"
export PATH="$PATH:$JAVA_HOME:$MAVEN_HOME/bin:$MULE_HOME/bin"
export MAVEN_HOME="/opt/apache/maven/bin"
export MAVEN_OPTS='-Xmx512m -XX:MaxPermSize=256m'
export MULE_HOME="/opt/mule"
source /etc/profile
**Note
You must also endorse the JDK with a proper JAXP (Java API for XML Processing) implementation. To do this, download Apache Xerces and Xalan and drop the JARs into your JVM's jre/lib/endorsed directory. If that directory does not yet exist, create it.
wget http://apache.mirrors.hoobly.com/xml/xalan-j/xalan-j_2_7_1-bin-2jars.tar.gz
wget http://apache.mirrors.hoobly.com//xerces/j/Xerces-J-src.2.11.0.tar.gz
tar xzvf xalan-j_2_7_1-bin-2jars.tar.gz
tar xzvf Xerces-J-src.2.11.0.tar.gz
cp xerces-2_11_0/*.jar $JAVA_HOME/lib/endorsed/
cp xalan-j_2_7_1/xalan.jar $JAVA_HOME/lib/endorsed/
#Install Maven
mkdir /opt/apache
cd /opt/apache
wget http://newverhost.com/pub//maven/binaries/apache-maven-2.2.1-bin.tar.gz
tar xzvf apache-maven-2.2.1-bin.tar.gz
ln -s apache-maven-2.2.1 maven
Check the installation:
mvn --version
Create a Maven repository directory with no spaces in the path
mkdir /opt/apache/maven-repo
#Setup Mule ESB
cd /usr/src
wget http://s3.amazonaws.com/MuleEE/mule-ee-distribution-standalone-mmc-3.1.2.tar.gz
tar xzvf mule-ee-distribution-standalone-mmc-3.1.2.tar.gz
cp -r mule-enterprise-standalone-3.1.2 /opt/mule
cd /opt/mule/bin
./populate_m2_repo /opt/apache/maven-repo
#import mule license
mule -installLicense ~/license_esb.lic