How to Install GlassFish on CentOS RedHat Fedora

How to Install GlassFish ESB on CentOS / Red Hat / Fedora

I did my installation on a CentOS 5.4 and I confirm all works, just follow

Download JDK 6u12
# cd /usr
# wget

Download GlassFish 2.1
# wget

Check current Java Version
# java -version
java version “1.6.0″
OpenJDK Runtime Environment (build 1.6.0-b09)
OpenJDK Server VM (build 1.6.0-b09, mixed mode)
# chmod +x /usr/jdk*
# ./usr/jdk-6u12-linux-i586.bin
Accept License, and enter

Adjust path
#vim /etc/profile

You may need to logout and login then:
# java -version
java version “1.6.0_12″
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) Server VM (build 11.2-b01, mixed mode)

Create user
# adduser esb
# passwd esb
# mkdir /usr/local/GlassFishESBv21
# mkdir /home/esb
# chown esb:root -R /usr/local/GlassFishESBv21
# mv /usr/ /home/esb
# chown esb:root -R /home/esb/GlassFishESBv21
# chmod 755 -R /home/esb/GlassFishESBv21

Add it to sudoers just for now
# vim /etc/sudoers



Login into the Gnome interface localy (via VNC wont work)
with the esb user execute from /home/esb
# sudo bash

On the install GUI
Set NetBeans IDE to:
Set Install GlassFish to:

Now lets configure the service to autostart
# cd /etc/rc.d/init.d
# vim glassfish

#Script to start/stop/restart GlassFish
# chkconfig: 35 20 80
# description: GlassFish ESB 2.1 Daemon
case “$1″ in
${GFPATH}/asadmin start-database
${GFPATH}/asadmin start-domain domain1
${GFPATH}/asadmin stop-database
${GFPATH}/asadmin stop-domain domain1
${GFPATH}/asadmin stop-domain domain1
${GFPATH}/asadmin start-domain domain1
echo $”Usage: $0 {start|stop|restart}”
exit 1

# chkconfig –add glassfish
# chkconfig –level 35 glassfish on
# service glassfish start

Once the service start it Should Display:

Starting database in the background.
Log redirected to /usr/local/GlassFishESBv21/glassfish/databases/derby.log.
Command start-database executed successfully.
Starting Domain domain1, please wait.
Default Log location is /usr/local/GlassFishESBv21/glassfish/domains/domain1/logs/server.log.
Redirecting output to /usr/local/GlassFishESBv21/glassfish/domains/domain1/logs/server.log
Domain domain1 is ready to receive client requests. Additional services are being started in background.
Domain [domain1] is running [Sun GlassFish Enterprise Server v2.1 (9.1.1) (build b60e-fcs)] with its configuration and logs at: [/usr/local/GlassFishESBv21/glassfish/domains].
Admin Console is available at [http://localhost:4848].
Use the same port [4848] for “asadmin” commands.
User web applications are available at these URLs:
[http://localhost:8080 https://localhost:8181 ].
Following web-contexts are available:
[/web1 /__wstx-services ].
Standard JMX Clients (like JConsole) can connect to JMXServiceURL:
[service:jmx:rmi:///jndi/rmi://SERVERESB:8686/jmxrmi] for domain management purposes.
Domain listens on at least following ports for connections:
[8080 8181 4848 3100 3820 3920 8686 ].
Domain does not support application server clusters and otherstandalone instances.

To login via web go to


Remeber to open firewall for ports required
Check with ps if service is running
Reference to official documentation at:

How to install CVS/CVSNT server on RHEL /CentOS

First you’ll have to check /etc/services for the definitions of the CVS used TCP ports :

grep -i cvs /etc/services
cvspserver 2401/tcp # CVS client/server operations
cvspserver 2401/udp # CVS client/server operations

Then you’ll have to install either CVS package either CVSNT package :
yum install cvs
rpm -ivh cvsnt-

Now, set up users that will access the CVS server :
vim /etc/passwd
vim /etc/shadow

Then, setup a folder for the CVS data. I usually put this on an NFS share which is on a filer so that data is backuped and you have snapshots of it :
mkdir /home/cvsrepo
cvs -d /home/cvsrepo init
chgrp GID /home/cvsrepo (according to what you did in the /etc/passwd)
chmod g+w /home/cvsrepo

Now add the CVSROOT environement variable to all the users needed :

echo "export CVSROOT=/home/cvsrepo" >> /root/.bashrc
echo "export CVSROOT=/home/cvsrepo" >> /home/userXXX/.bashrc

Now time for setup the CVS server. It will be launched by Xinetd, so check you have it running on your system. It is running default on CentOS5, RHEL5, Suse, …
/etc/init.d/xinetd status
It’s Xinetd who will launch CVS each time a client is asking. This is configured in the /etc/xinetd.d folder; you’ll have to add a file like this one :
cat /etc/xinetd.d/cvspserver
service cvspserver
disable = no
socket_type = stream
wait = no
user = root
group = systeme
log_type = FILE /var/log/cvspserver
protocol = tcp
env = '$HOME=/usr/local/cvspserver'
log_on_failure += USERID
port = 2401
server = /usr/bin/cvs
server_args = -f --allow-root=/home/cvsrepo pserver

Now restart you xinetd, and check you /var/log/messages that your new rule cvspserver has been loaded :
/etc/init.d/xinetd restart
cat /var/log/messages

Everything is now ok, your CVS server is up. Supposing you created a user named ‘user1’ on the cvs server named ‘cvsserver’ here is the CVSROOT you’ll have to use either on UNIX systems, either on Windows with TortoiseCVS or another CVs client :
For security reasons, it’s possible to create CVS ONLY users. For that, go to the CVS folder and CVSROOT then. At this place there is a “CVS local passwd” alose named passwd. To add users able only to access the CVS and no the entire system, use htpasswd command or perl scripts :
htpasswd passwd user3

Have fun !

Install Sguil on Fedora RHEL CentOS using NSMnow

I’ve written about NSMnow a few times before and I’m a big fan. They already had at least partial support for Fedora and I suggested to the developers some changes that would allow them to also support RHEL/CentOS. The SecurixLive team has done an amazing job with NSMnow (and Barnyard2) and things just keep getting better!

You can read more at the SecurixLive site:
Install Sguil on Fedora/RHEL/CentOS using NSMnow