Friday, August 19, 2016

How To Install JBoss AS 7 in Ubuntu

This guide is aimed at developers wanting to set up their development environment.

First, you should have a JDK-7 installed on your machine. If you have a JDK-8, JBoss AS 7.x will not start.
Then, in your .profile file, set the JAVA_HOME environment variable pointing to java installation.

To download JBoss 7 application server issue the following command on terminal:

wget http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.tar.gz

Untar the archive:

tar -xvf jboss-as-7.1.1.Final.tar.gz 

Copy the directory to /opt/redhat-jboss-as-7:

sudo cp -r jboss-as-7.1.1.Final /opt/redhat-jboss-as-7

You don't want the jboss process to run as root on your machine, so you need to change the owner and owner group of jboss. Assume you are logged as the user max, to set the owner user and owner group on the jboss directory, issue the following command:

sudo chown -R max:max /opt/redhat-jboss-as-7

To start JBoss type on the shell:

max@ubuntu-host:/opt/redhat-jboss-as-7/bin$ ./standalone.sh

Monday, August 15, 2016

How To Install Tomcat in Ubuntu

Install Oracle's JDK

Install Java, see here

Set the JAVA_HOME, CATALINA_HOME and PATH environment variables

The JAVA_HOME variable is used by Java Servers such as Tomcat and JBoss, and by build tools such as Ant and Maven, and by other Java applications.

The CATALINA_HOME variable is required by when running Tomcat from command line to locate the files stored in $CATALINA_HOME/conf and $CATALINA_HOME/logs directories.

To set user environment variables edit the ~/.profile:

max@ubuntu-pc:~$ nano ~.profile

Append the following lines to the ~.profile file:

export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export CATALINA_HOME=/opt/apache-tomcat-8.0
export PATH=$PATH:$JAVA_HOME/bin:$CATALINA_HOME/bin

Thursday, August 11, 2016

How to Install Java In Ubuntu

Which Version of Java to Use?

  • JavaSE 7 supports:
    • eclipse mars
    • JBoss AS 7 with Java EE 6 features
    • Tomcat 7-8 with WebSockets
  • JavaSE 8 supports:
    • eclipse neon
    • JBoss WildFly with Java EE 7 features
    • Tomcat 9 with Java EE 8 features

Java SE Development Kit 7 (JDK-7) Installation

To install Oracle's Java, use PPA personal repositories by WEB UP8. Ubuntu public repositories only support OpenJDK.

Copy and paste the following lines into terminal, one-by-one:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

You can check Java installation by issuing the java -version command:

max@max-PC:~$ java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
max@max-PC:~$