Installations and Environment Setup

      No Comments on Installations and Environment Setup

This post will be used to make note of the installations and environment setup that will be used in this website. The software list, versions etc. will be updated as needed.

1) JDK: Install JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html . I will be using Java SE Development Kit 8 for Windows x64. Make sure to set JAVA_HOME.

image

2) Maven: Install Maven from http://maven.apache.org/download.cgi . I will be using Version 3.3.3 (extract of binary zip). Setup environment variables M2_HOME and MAVEN_OPTS as shown in table at the end.

image

Create user level settings.xml in user.home location (which is defined using MAVEN_OPTS)  :

copy %M2_HOME%\conf\settings.xml C:\tvi\Software\Installs\mavenuserhome\.m2

In the user level settings.xml, add the following:

<localRepository>C:\tvi\Software\Installs\mavenuserhome\.m2\repository</localRepository>

To enable proxy settings for internet access (if needed), it can be configures in settings.xml  as shown here.

3) Eclipse: Install Eclipse IDE from https://eclipse.org/downloads/ . I will be using Eclipse IDE for Java EE 64-Bit (Version 4.5 – Eclipse Mars)

Open eclipse.ini and specify JDK path:

-vm
C:\Program Files\Java\jdk1.8.0_60\bin\javaw.exe

and -Dosgi.requiredJavaVersion=1.8

Windows –> Preferences –> Maven –> User Settings

image

Windows –> Preferences –> Java –> Installed JREs . If JDK is not selected, click add and select JDK:

image

 

4) JBOSS WildFly: Install JBOSS WildFly from http://wildfly.org/downloads/. I will be using Version 9.0.2 ‘Java EE7 Full & Web Distribution’ (extract of binary zip). Set environment variable JBOSS_HOME. Add %JBOSS_HOME%/bin to PATH.

The default http port is 8080. To change default port numbers: In standalone.xml, change the following line:
<socket-binding-group name=”standard-sockets” default-interface=”public” port-offset=”${jboss.socket.binding.port-offset:0}”>
change the jboss.socket.binding.port-offset value from  0 to some other value. I am using an offset of 100, which makes the http port to 8180 instead of the default 8080.

Verify the installation by starting JBOSS using:

%JBOSS_HOME%/bin/standalone.bat

Once started, access http://localhost:8180/ from browser:

image

5) Tomcat: Install Tomcat from http://tomcat.apache.org/download-80.cgi . I will be using ‘64-bit Windows zip’ (extract of binary zip). Set environment variable CATALINA_HOME, CATALINA_BASE and add %CATALINA_HOME%\bin to PATH. The default http port is 8080. To change, edit <Tomcat installation folder>\conf\server.xml, change the value in Connector port=”8080″. I will be using port 8280.

image

In Eclipse, Window -> Preferences -> Server -> Installed Runtimes
Click Add. Select Apache -> Apache Tomcat 8.0. Click Next. Provide Tomcat installation directory and JDK 8 as JRE. In eclipse ‘Java EE’ perspective, right click on servers tab and click New –> Server. Select Apache –> Tomcat v8.0 Server

image

6) PostgreSQL Database: Download and install using Windows graphical installer from : http://www.postgresql.org/download/windows/ . It installs PostgreSQL server and pgAmin III (graphical IDE). I will be installing Win x86-64 version at C:\Program Files\PostgreSQL\9.4. The installer prompts for id/passwd, data location (C:\Program Files\PostgreSQL\9.4\data) and port (default is 5432). Uncheck for ‘Launch Stack Builder at exit’ and click Finish. Start->AllPrograms->PostgerSQL -> pgAdmin III. ServerGroups –> Server, double click localhost and give id/passwd to verify connectivity.

image

7) Git: Download Git from http://www.git-scm.com/downloads . I downloaded for 64-bit windows Git-2.6.3-64-bit.exe. Default installation directory C:\Program Files\Git, default components. On the screen ‘Adjusting your PATH variable’, second option ‘Use Git from Windows command prompt’ to be able to use from command prompt as well as Git Bash; Use default options for all other screens. openSSH for ssh executable. For line ending conversions, select the default ‘Checkout windows style, Commit Unix style line endings’.

image 

Environment Variables (Indicative for reference):

Environment Variable Description
JAVA_HOME JDK install directory.
C:\Program Files\Java\jdk1.8.0_60
M2_HOME C:\tvi\Software\Installs\apache-maven-3.3.3
MAVEN_OPTS -Xmx1024m -Xms256m -Duser.home=%M2_HOME%\..\mavenuserhome
JBOSS_HOME C:\tvi\Software\Installs\wildfly-9.0.2.Final
CATALINA_HOME, CATALINA_BASE C:\tvi\Software\Installs\apache-tomcat-8.0.28
PATH %JAVA_HOME%\bin;%M2_HOME%\bin;%JBOSS_HOME%\bin;%CATALINA_HOME%\bin; C:\Program Files\Git\cmd

Directory Structure (Indicative for reference):

Directory Description
C:\tvi\ Home or root for all files used in this website.
C:\tvi\Software\eclipse_mars Eclipse Mars IDE install location
C:\tvi\Software\workspace_mars All project workspaces of Eclipse Mars
C:\tvi\Software\Installs Some installations are just extract of zip files. This directory is used for such installs (Tomcat, Maven). Also has install.txt showing directories of install which are not under C:\tvi\Software\Installs)

Leave a Reply

Your email address will not be published. Required fields are marked *