Friday, February 25, 2011

How to Download and install HUDSON on linux?

HUDSON:

Hudson monitors executions of repeated jobs, such as building a software project or jobs run by cron. Among those things, current Hudson focuses on the following two jobs:
  1. Building/testing software projects continuously, just like CruiseControl or DamageControl. In a nutshell, Hudson provides an easy-to-use so-called continuous integration system, making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. The automated, continuous build increases the productivity.
  2. Monitoring executions of externally-run jobs, such as cron jobs and procmail jobs, even those that are run on a remote machine. For example, with cron, all you receive is regular e-mails that capture the output, and it is up to you to look at them diligently and notice when it broke. Hudson keeps those outputs and makes it easy for you to notice when something is wrong.
 Continuous Integration with automated test execution has seen broad adoption in recent years. The ideas behind Continuous Integration have changed how companies look at Build Management, Release Management, Deployment Automation, and Test Orchestration. This section provides a set of best practices for Hudson - A Continuous Integration Solution to provide executives, business managers, software developers and architects a better sense of the development progress and code quality of projects throughout the development lifecycle.


HUDSON Home page:  http://wiki.hudson-ci.org/

 Download HUDSON:


$ ls

-rw-r--r-- 1 root root 27936319 2010-06-01 12:30 hudson-1.340-1.1.noarch.rpm

Install a rpm package: (man rpm)

% rpm –ivh hudson-1.340-1.1.noarch.rpm   (“-I” – install, "-v" – Verbose, "-h" - Print 50 hash marks as the package  archive  is  unpacked.   Use with -v|--verbose for a nicer display)

% rpm –qa    (will list down all the installed rpm packages on a machine.)

% adduser -m -s /bin/bash  Hudson

% startup.sh

+ JAVA=/usr/java
+ /etc/init.d/hudson start
Starting Hudson -bash: /usr/bin/java: No such file or directory
                                                           [FAILED]

Installing Java on linux:


Select the correct operating system compatiable file and download it:

% mkdir /usr/bin/java
% cd /usr/bin/java
% chmod a+x ./jre*
% ./jre*

% rpm –qa | grep jre

jre-1.6.0_24-fcs

% rpm -ql  jre-1.6.0_24-fcs  (Check the package related files using the command)

/usr/java/jre1.6.0_24/*

It means the package is installed at “/usr/java/jre1.6.0_24/”


Firefox or Mozilla

To configure the Java Plugin follow these steps:

1.       Exit Firefox browser if it is already running.
2.       Uninstall any previous installations of Java Plugin.
Only one Java Plugin can be used at a time. When you want to use a different plugin, or version of a plugin, remove the symbolic links to any other versions and create a fresh symbolic link to the new one.
3.       Create a symbolic link to the libnpjp2.so file in the browser plugins directory
·         Go to the plugins sub-directory under the Firefox installation directory
cd <Firefox installation directory>/plugins
·         Create the symbolic link
ln -s <Java installation directory>/lib/i386/libnpjp2.so



Example
·         If Firefox is installed at this directory:
/usr/lib/<Firefox installation directory>
·         And if the Java is installed at this directory:
/usr/java/<Java installation directory>
·         Then type in the terminal window to go to the browser plug-in directory:
/usr/lib/<Firefox installation directory>/plugin
·         Enter the following command to create a symbolic link to the Java Plug-in for the Mozilla browser.
ln -s /usr/java/<Java installation directory>/lib/i386/libnpjp2.so



4.       Start the Firefox browser, or restart it if it is already up. 

In Firefox, type about:plugins in the Location bar to confirm that the Java Plugin is loaded. You can also click the Tools menu to confirm that Java Console is there.



% Cat startup.sh

#!/bin/sh -x

JAVA=/usr/java

/etc/init.d/hudson start


% ln -sf  /usr/java/latest/bin/java /usr/bin/java

./startup.sh
+ JAVA=/usr/java
+ /etc/init.d/hudson start
Starting Hudson                                            [  OK  ]

%  ps -ef | grep Hudson

hudson   15696     1 12 14:20 ?        00:00:06 /usr/bin/java -Dcom.sun.akuma.Daemon=daemonized -Djava.awt.headless=true -DHUDSON_HOME=/var/lib/hudson -jar /usr/lib/hudson/hudson.war --logfile=/var/log/hudson/hudson.log --daemon --httpPort=8080 --debug=5 --handlerCountMax=100 --handlerCountMaxIdle=20




How to view the HUDSON home page:

Open firefox browser and type the following in the address tab: http://localhost:port/


No comments:

Post a Comment