Posted in Java, JEE, JEE / J2EE / JSP / Servlets

How to Install Jenkins on Windows 8 and Linux


To Install Jenkins on Windows 8 and Linux, CentOS, Ubuntu and Other Linux Distribution follow the below steps

Cloud Computing – Download Free EBooks and Whitepapers
Java – Download Free EBooks and Whitepapers
Windows – Download Free EBooks and Whitepapers

Download Jenkins from http://jenkins-ci.org/

Download Link is – http://mirrors.jenkins-ci.org/war/latest/jenkins.war

Install Java

Set JAVA_HOME in Environment Variable

Execute java –jar Jenkins.war

C:>java -jar jenkins.war
Running from: C:jenkins.war
webroot: $user.home/.jenkins
21 May, 2014 12:55:22 AM winstone.Logger logInternal
INFO: Beginning extraction from war file
21 May, 2014 12:55:27 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: jetty-8.y.z-SNAPSHOT
21 May, 2014 12:55:39 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: NO JSP Support for , did not find org.apache.jasper.servlet.JspServlet
Jenkins home directory: C:Usersmitesh.jenkins found at: $user.home/.jenkins
21 May, 2014 12:55:41 AM org.eclipse.jetty.util.log.JavaUtilLog info
INFO: Started SelectChannelConnector@0.0.0.0:8080
21 May, 2014 12:55:41 AM winstone.Logger logInternal
INFO: Winstone Servlet Engine v2.0 running: controlPort=disabled
21 May, 2014 12:55:41 AM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
21 May, 2014 12:56:13 AM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
21 May, 2014 12:56:13 AM jenkins.InitReactorRunner$1 onAttained
INFO: Prepared all plugins
21 May, 2014 12:56:13 AM jenkins.InitReactorRunner$1 onAttained
INFO: Started all plugins
21 May, 2014 12:56:13 AM jenkins.InitReactorRunner$1 onAttained
INFO: Augmented all extensions
21 May, 2014 12:56:13 AM jenkins.InitReactorRunner$1 onAttained
INFO: Loaded all jobs
21 May, 2014 12:56:19 AM org.jenkinsci.main.modules.sshd.SSHD start
INFO: Started SSHD at port 53167
21 May, 2014 12:56:19 AM jenkins.InitReactorRunner$1 onAttained
INFO: Completed initialization
21 May, 2014 12:56:19 AM hudson.TcpSlaveAgentListener <init>
INFO: JNLP slave agent listener started on TCP port 53168
21 May, 2014 12:56:19 AM hudson.WebAppMain$3 run
INFO: Jenkins is fully up and running
Effective SlaveRestarter on master: null

Visit http://localhost:8080/manage

jenkins Dashboard

Done!

Advertisements
Posted in Application Server, Java, JEE, JEE / J2EE / JSP / Servlets, Maven, Web Server

Install Maven on Windows 8


Maven on Windows 8

Download Apache Maven from http://maven.apache.org/download.cgi. Different versions are available so user can select the version as per need.

Extract the files from the compressed file of apache-maven-3.2.1-bin.zip

Add Two Environment Variables, M2 and M2_HOME

Cloud Computing – Download Free EBooks and Whitepapers
Java – Download Free EBooks and Whitepapers
Windows – Download Free EBooks and Whitepapers

Right Click on My Computer and select Properties

My Computer Properties

Click on Advance System Settings

Advance System Settings

It will open System Properties Dialogue box; click on Environment Variables

System Properties

Click on New and set M2_HOME

M2_HOME

Set M2

M2

M2 and M2_HOME

Edit PATH by appending C:apache-maven-3.2.1bin

Path Variable

Open the Command Prompt again and execute mvn –version command

mvn version command

Done!

 

Posted in How To..., Java, Linux, Open Source, Tomcat

How to Install Java in CentOS 6.3


Install Java in CentOS

Create a Local Repository for CentOS by using existing packages on Distribution Media or make sure that Internet is accessible from the virtual machine

Cloud Computing – Download Free EBooks and Whitepapers
Java – Download Free EBooks and Whitepapers
Windows – Download Free EBooks and Whitepapers

List of all available JDK on the system

[root@localhost ~]# yum search java | grep -i –color JDK
ldapjdk-javadoc.x86_64 : Javadoc for ldapjdk
icedtea-web.x86_64 : Additional Java components for OpenJDK – Java browser
java-1.6.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.6.0-openjdk-demo.x86_64 : OpenJDK Demos
java-1.6.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.6.0-openjdk-javadoc.x86_64 : OpenJDK API Documentation
java-1.6.0-openjdk-src.x86_64 : OpenJDK Source Bundle
java-1.7.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.7.0-openjdk-demo.x86_64 : OpenJDK Demos
java-1.7.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.7.0-openjdk-javadoc.noarch : OpenJDK API Documentation
java-1.7.0-openjdk-src.x86_64 : OpenJDK Source Bundle
ldapjdk.x86_64 : The Mozilla LDAP Java SDK

[root@localhost ~]# yum install java-1.7.0-openjdk java-1.7.0-openjdk-devel
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centosmirror.go4hosting.in
* extras: centosmirror.go4hosting.in
* updates: centosmirror.go4hosting.in
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package java-1.7.0-openjdk.x86_64 1:1.7.0.55-2.4.7.1.el6_5 will be installe                                                                                        d
–> Processing Dependency: jpackage-utils >= 1.7.3-1jpp.2 for package: 1:java-1.                                                                                        7.0-openjdk-1.7.0.55-2.4.7.1.el6_5.x86_64
–> Processing Dependency: xorg-x11-fonts-Type1 for package: 1:java-1.7.0-openjd                                                                                        k-1.7.0.55-2.4.7.1.el6_5.x86_64
–> Processing Dependency: tzdata-java for package: 1:java-1.7.0-openjdk-1.7.0.5                                                                                        5-2.4.7.1.el6_5.x86_64
–> Processing Dependency: libjpeg.so.62(LIBJPEG_6.2)(64bit) for package: 1:java                                                                                        -1.7.0-openjdk-1.7.0.55-2.4.7.1.el6_5.x86_64
–> Processing Dependency: libgif.so.4()(64bit) for package: 1:java-1.7.0-openjd                                                                                        k-1.7.0.55-2.4.7.1.el6_5.x86_64
—> Package java-1.7.0-openjdk-devel.x86_64 1:1.7.0.55-2.4.7.1.el6_5 will be in                                                                                        stalled
–> Running transaction check
—> Package giflib.x86_64 0:4.1.6-3.1.el6 will be installed
—> Package jpackage-utils.noarch 0:1.7.5-3.12.el6 will be installed
—> Package libjpeg.x86_64 0:6b-46.el6 will be obsoleted
—> Package libjpeg-turbo.x86_64 0:1.2.1-3.el6_5 will be obsoleting
—> Package tzdata-java.noarch 0:2014b-1.el6 will be installed
—> Package xorg-x11-fonts-Type1.noarch 0:7.2-9.1.el6 will be installed
–> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.2-9.1.el                                                                                        6.noarch
–> Processing Dependency: ttmkfdir for package: xorg-x11-fonts-Type1-7.2-9.1.el                                                                                        6.noarch
–> Running transaction check
—> Package ttmkfdir.x86_64 0:3.0.9-32.1.el6 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

================================================================================
Package                    Arch     Version                    Repository
Size
================================================================================
Installing:
java-1.7.0-openjdk         x86_64   1:1.7.0.55-2.4.7.1.el6_5   updates    26 M
java-1.7.0-openjdk-devel   x86_64   1:1.7.0.55-2.4.7.1.el6_5   updates   9.4 M
libjpeg-turbo              x86_64   1.2.1-3.el6_5              updates   174 k
replacing  libjpeg.x86_64 6b-46.el6
Installing for dependencies:
giflib                     x86_64   4.1.6-3.1.el6              base       37 k
jpackage-utils             noarch   1.7.5-3.12.el6             base       59 k
ttmkfdir                   x86_64   3.0.9-32.1.el6             base       43 k
tzdata-java                noarch   2014b-1.el6                updates   147 k
xorg-x11-fonts-Type1       noarch   7.2-9.1.el6                base      520 k

Transaction Summary
================================================================================
Install       8 Package(s)

Total download size: 36 M
Is this ok [y/N]: y
Downloading Packages:
(1/8): giflib-4.1.6-3.1.el6.x86_64.rpm                   |  37 kB     00:01
(2/8): java-1.7.0-openjdk-1.7.0.55-2.4.7.1.el6_5.x86_64. |  26 MB     18:30
(3/8): java-1.7.0-openjdk-devel-1.7.0.55-2.4.7.1.el6_5.x86_64.rpm                                                                                | 9.4 MB     07:02
(4/8): jpackage-utils-1.7.5-3.12.el6.noarch.rpm                                                                                                  |  59 kB     00:00
(5/8): libjpeg-turbo-1.2.1-3.el6_5.x86_64.rpm                                                                                                    | 174 kB     00:09
(6/8): ttmkfdir-3.0.9-32.1.el6.x86_64.rpm                                                                                                        |  43 kB     00:01
(7/8): tzdata-java-2014b-1.el6.noarch.rpm                                                                                                        | 147 kB     00:05
(8/8): xorg-x11-fonts-Type1-7.2-9.1.el6.noarch.rpm                                                                                               | 520 kB     00:16
————————————————————————————————————————————————————————
Total                                                                                                                                    23 kB/s |  36 MB     26:19
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : jpackage-utils-1.7.5-3.12.el6.noarch                                                                                                                 1/9
Installing : giflib-4.1.6-3.1.el6.x86_64                                                                                                                          2/9
Installing : libjpeg-turbo-1.2.1-3.el6_5.x86_64                                                                                                                   3/9
Installing : tzdata-java-2014b-1.el6.noarch                                                                                                                       4/9
Installing : ttmkfdir-3.0.9-32.1.el6.x86_64                                                                                                                       5/9
Installing : xorg-x11-fonts-Type1-7.2-9.1.el6.noarch                                                                                                              6/9
Installing : 1:java-1.7.0-openjdk-devel-1.7.0.55-2.4.7.1.el6_5.x86_64                                                                                             7/9
Installing : 1:java-1.7.0-openjdk-1.7.0.55-2.4.7.1.el6_5.x86_64                                                                                                   8/9
Erasing    : libjpeg-6b-46.el6.x86_64                                                                                                                             9/9
Verifying  : ttmkfdir-3.0.9-32.1.el6.x86_64                                                                                                                       1/9
Verifying  : xorg-x11-fonts-Type1-7.2-9.1.el6.noarch                                                                                                              2/9
Verifying  : 1:java-1.7.0-openjdk-devel-1.7.0.55-2.4.7.1.el6_5.x86_64                                                                                             3/9
Verifying  : tzdata-java-2014b-1.el6.noarch                                                                                                                       4/9
Verifying  : libjpeg-turbo-1.2.1-3.el6_5.x86_64                                                                                                                   5/9
Verifying  : giflib-4.1.6-3.1.el6.x86_64                                                                                                                          6/9
Verifying  : 1:java-1.7.0-openjdk-1.7.0.55-2.4.7.1.el6_5.x86_64                                                                                                   7/9
Verifying  : jpackage-utils-1.7.5-3.12.el6.noarch                                                                                                                 8/9
Verifying  : libjpeg-6b-46.el6.x86_64                                                                                                                             9/9

Installed:
java-1.7.0-openjdk.x86_64 1:1.7.0.55-2.4.7.1.el6_5        java-1.7.0-openjdk-devel.x86_64 1:1.7.0.55-2.4.7.1.el6_5        libjpeg-turbo.x86_64 0:1.2.1-3.el6_5

Dependency Installed:
giflib.x86_64 0:4.1.6-3.1.el6                  jpackage-utils.noarch 0:1.7.5-3.12.el6      ttmkfdir.x86_64 0:3.0.9-32.1.el6      tzdata-java.noarch 0:2014b-1.el6
xorg-x11-fonts-Type1.noarch 0:7.2-9.1.el6

Replaced:
libjpeg.x86_64 0:6b-46.el6

Complete!
You have mail in /var/spool/mail/root
[root@localhost ~]#

RHEL and CentOS Linux install OpenJDK into /usr/lib/jvm/ directory

Set the JAVA_HOME class path variable

export JAVA_HOME="/usr/lib/jvm/jre-1.7.0-openjdk.x86_64

 

Posted in Java, PaaS

CloudBees Java PaaS Definition


CloudBees Definition

CloudBees supports Java SE and Java EE. It also includes Tomcat, MySQL, Commercial relational databases, BIG data – MongoDB and CouchDB in its stack. It brings quite a few unique features into the Java PaaS landscape, especially continuous integration – an entire development / testing / deployment management in the cloud. Application deployment requires no special framework and it is easy to migrate in or out application to or from CloudBees. Developers can use Jenkins service to have CloudBees automatically and continuously build, test, check in, and check out code in the repository. CloudBees supports Command Line Tools, IDE tools such as eclipse, Web-based Console, Web access to logs, Third party developer / testing services and API access. New Relic monitoring is a part of the CloudBees Ecosystem; user can turn monitoring on for any of the applications with a few clicks. In CloudBees, the New Relic monitoring agent is automatically deployed into your application at the time of deployment. CloudBees also supports sending mail from applications with the SendGrid Service for RUN@cloud.

Cloud Computing – Download Free EBooks and Whitepapers
Java – Download Free EBooks and Whitepapers
Windows – Download Free EBooks and Whitepapers

Java – Download Free EBooks and Whitepapers

Posted in Application Server, Java, JBoss, JEE, Web Server

What is Liferay


Define: Liferay

Liferay Portal is an open source enterprise portal for building websites and web applications written in Java and distributed under the GNU Lesser General Public License and commercial license. It is a web platform with features commonly required for the development of websites and portals by assembling portlets or gadgets onto a portal page.  It has a capability to make things easier in development of websites that display diverse data depending on different roles such as admin and normal user. E.g. In college portal, admin, students, teachers etc. have different pages or sections available to interact.

Cloud Computing – Download Free EBooks and Whitepapers
Java – Download Free EBooks and Whitepapers
Windows – Download Free EBooks and Whitepapers

Java – Download Free EBooks and Whitepapers

Figure 1 - Liferay Portal

Figure 1 – Liferay Portal

Liferay Portal is an enterprise web platform provides Self-Service Portals, Dynamic Web 2.0 Websites, Content & Document Management with Microsoft Office integration, Enterprise Collaboration, Identity and Access Management, Social Networking, Application Integration, unified document repository, Asset Publisher to display any data contained within the portal, to create workspaces for customer websites, intranets, collaboration platforms, and group websites. It also provides Text Editors with spell check and text styling capabilities, reusable templates for web pages and page sections, capabilities to add comments and notes into templates, User-Driven Workflow & Approval, Live Page Editing and Scheduling, Staging and Easy Website Planning, Document Conversion and Multi-File Uploads, Faceted and multi-tier Search, Multi language support, Dynamic Tagging, and SEO.

Liferay Portal is Java based and capable of running the JRE and an application server bundled with a servlet container such as Apache Tomcat 7.0.42 as of now.

Website: http://www.liferay.com/

Posted in Java, Tomcat

Create a keystore in Java


How to Create a keystore in Java to store private key and self-signed certificate

Java – Download Free EBooks and Whitepapers

C:Usersadmin>“C:Program FilesJavajdk1.8.0″binkeytool -genkey -alias tomca
t -keyalg RSA

 

Cloud Computing – Download Free EBooks and Whitepapers
Java – Download Free EBooks and Whitepapers
Windows – Download Free EBooks and Whitepapers

Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]:  Mitesh Soni
What is the name of your organizational unit?
[Unknown]:  iGATE
What is the name of your organization?
[Unknown]:  iGATE
What is the name of your City or Locality?
[Unknown]:  Gnagar
What is the name of your State or Province?
[Unknown]:  Gu
What is the two-letter country code for this unit?
[Unknown]:  IN
Is CN=Mitesh Soni, OU=iGATE, O=iGATE, L=Gnagar, ST=Gu, C=IN correct?
[no]:
What is your first and last name?
[Mitesh Soni]:
What is the name of your organizational unit?
[iGATE]:
What is the name of your organization?
[iGATE]:
What is the name of your City or Locality?
[Gnagar]:
What is the name of your State or Province?
[Gu]:
What is the two-letter country code for this unit?
[IN]:
Is CN=Mitesh Soni, OU=iGATE, O=iGATE, L=Gnagar, ST=Gu, C=IN correct?
[no]:  yes

Enter key password for <tomcat>
(RETURN if same as keystore password):

This information will be displayed to users who attempt to access a secure page in your application, so make sure that the information provided here matches what they will expect.

The keytool prompt will tell you that pressing the ENTER key automatically uses the same password for the key as the keystore. If you select a different password to the keystore password, you will also need to specify the custom password in the server.xml configuration file.

 

This command will create a new file, in the home directory of the user under which you run it, named “.keystore“.

 

Posted in Java, Tomcat, Windows

Deploy Web Application in Tomcat 8


Deploy Web Application in Tomcat 8 on Windows 8 with Java 8

Now Download sample application from: http://tomcat.apache.org/tomcat-8.0-doc/appdev/sample/

Copy that WAR file into the webapps folder of Tomcat Installation directory

Java – Download Free EBooks and Whitepapers

Verify Console after 1-2 minutes and you will find Message such as:

18-Nov-2013 23:50:18.380 INFO [localhost-startStop-2] org.apache.catalina.startu
p.HostConfig.deployWAR Deploying web application archive C:F Drive-IMPSetupAp
ache Tomcatapache-tomcat-8.0.0-RC5-windows-x64apache-tomcat-8.0.0-RC5webapps
sample.war

Cloud Computing – Download Free EBooks and Whitepapers
Java – Download Free EBooks and Whitepapers
Windows – Download Free EBooks and Whitepapers

Let’s visit that sample application

Web application Deployment in Tomcat 8
Web application Deployment in Tomcat 8

Done