Steps To Install Jboss Server
Please follow below mentioned steps to install jboss server(JBOSS 4.3 EAP) in Linux environments.
Steps to install jboss server:
##############################################################
Assumptions:
Everything is done as root user
default folder for installation is taken /opt/
Before installing you are giving appropriate execute rights to each file.
chmod 0755 <filename>
Admin Server port number=8080
hostName= eetu32p1.mydomain.com
JBoss Admin Server Username: admin PassWord: jbossadm
Note: The username and password are default provided by Jboss.
Pre-requisites:
RHEL 5.1 64bit : Red Hat Enterprise Linux Server release 5.1 (Tikanga)
Java 1.5_15 64bit or above.
Installation and configuration of java:
###############################
1.Download and install jdk-1_5_0_15-linux-amd64.bin
2.Create a folder /opt/java and copy the unpacked jdk1.5.0_15 folder from /usr/java to /opt/java/ location.
Note: Do not move the jdk folder, only copy the jdk folder. Use cp -rf <from_location> <new_location>
3.Set the JAVA_HOME and classpath
vi /etc/bashrc
Add the below line to the end pf the file.
JAVA_HOME=/opt/java/jdk1.5.0_15; export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH; export PATH CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/jre/lib/rt.jar; export CLASSPATH
4.Open a new shell and type
java -version you should see below details: java version "1.5.0_15" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_15-b04) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_15-b04, mixed mode)
5. This finishes installation and configuration of java.
JBoss Server installation steps:
##################################
1.Create a folder jboss-eap-4.3 at /opt/ and Download the jboss-eap-4.3.tar.gz file from RHEL site to /opt/jboss-eap-4.3
wget Download_Url can be used to download directly to current folder.
Note: This software may not be original(default configurations) one.This software is provided by Jboss.org.
2.untar it using: tar -xzvf jboss.eap.4.3.tar.gz
3. cd to /opt/jboss-eap-4.3/jboss-as/server/jboss2/conf and configure the jboss-service.xml
4.cd to /opt/jboss-eap-4.3/jboss-as/bin and start the server with option and command:
./run.sh -c default/all/minimal -b 0.0.0.0 -u username -p password &
4.Server should start with out any erors on console.Use below url to access Admin Server:
http://<HostName>:8080/
5.Stop the server by issueing below command If server starts with out any exceptions or errors
./shutdown.sh -s `hostname`:1099 -u username -p password &
JBoss Server Configuration steps:
####################################
1.Navigate to /opt/jboss-eap-4.3/jboss-as/bin and open the run.sh file with any text editor like vi.
2.serach for “JBOSSCONF” and just below to that add the JAVA options like given options below.
JAVA_OPTS="-Dcom.sun.xml.namespace.QName.useCompatibleSerialVersionUID=1.0 -Dorg.omg.CORBA.ORBSingletonClass=com.sun.corba.se.internal.corba.ORBSingleton -Dorg.omg.CORBA.ORBClass=com.sun.corba.se.internal.Interceptors.PIORB"
Note: All options are given in a single line.
3. cd to /opt/jboss-eap-4.3/jboss-as/server/jboss2/deploy folder.
4. Copy the application war file to the current folder.
Jboss Admin Server Password changing step:
#############################################
vi /opt/jboss-eap-4.3/jboss-as/server/jboss2/conf/props/jmx-console-users.properties
change default admin=jbossadm to your required <username>=<password> and save it.
Restart the Admin Server to activate changes.
Apache installation
#############################
1.cd to /opt/ make a folder named Apache2.2.9
2. Download apache2.2.9 to /opt/ from Apache website.
Or It can be also downloaded from Apache’s Site.
http://archive.apache.org/dist/httpd/httpd-2.2.9.tar.gz. Below command can be used.
wget http://archive.apache.org/dist/httpd/httpd-2.2.9.tar.gz
3. untar and unzip the httpd-2.2.9.tar.gz file using below command:
tar -xvzf httpd-2.2.9.tar.gz
4.Untar should create a folder named httpd-2.2.9 cd to httpd-2.2.9 folder and run the below commands to compile and make installation.
./configure --prefix=/opt/Apache2.2.9
Once you see configuration success. execute below command.
$ make
Wait for the make command to finish.Once finished execute below command.
$ make install
Wait till the installation completes.
Once installation completed cd to /opt/Apache2.2.9/bin folder and run ./apachectl start
If it starts successfully then installation is complete.
Note: Older Versions 2.0.48,2.0.50,2.0.52,e.t.c does not compile on RHEL 5.1 64x machine, in a straight forward way (a work around way exist, which is not recomended).
Apache Configuration:
#################################
1.Download mod_jk-1.2.26-httpd-2.2.6.so file /opt/Apache2.2.9/modules folder.
Or It can be also downloaded from Apache’s site http://apache.forall.pl/tomcat/tomcat-connectors/jk/binaries/linux/jk-1.2.26/x86_64/mod_jk-1.2.26-httpd-2.2.6.so
2.Rename mod_jk-1.2.26-httpd-2.2.6.so to mod_jk.so
mv mod_jk-1.2.26-httpd-2.2.6.so mod_jk.so
3.cd to /opt/Apache2.2.9/conf/ folder and open the httpd.conf file and add the following details.
i. Search for “Listen” and check its listening on 80 port or not.
ii.just below to it in the LoadModule section add the below given line
Include conf/mod-jk.conf
iii.Search for DocumentRoot and change the default value in document root to your application document root location.
Example:
DocumentRoot “/opt/MYAPP/Html”
iv.Add the below alias to httpd.conf file if you want to set alias
Example:
Alias /my_image/ "/opt/MYAPP/images/" <Directory "/opt/MYAPP/images"> Options Indexes MultiViews Order allow,deny Allow from all </Directory>
v. Create a file named mod-jk.conf with below details.
# Load mod_jk module # Specify the filename of the mod_jk lib LoadModule jk_module modules/mod_jk.so # Where to find workers.properties JkWorkersFile conf/workers.properties # Where to put jk logs JkLogFile logs/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel info # Select the log format JkLogStampFormat "[%a %b %d %H:%M:%S %Y]" # JkOptions indicates to send SSK KEY SIZE # Notes: # 1) Changed from +ForwardURICompat. # 2) For mod_rewrite compatibility, use +ForwardURIProxy (default since 1.2.24) # See http://tomcat.apache.org/security-jk.html JkOptions +ForwardKeySize +ForwardURICompatUnparsed -ForwardDirectories # JkRequestLogFormat JkRequestLogFormat "%w %V %T" # Mount your applications #JkMount /__application__/* loadbalancer JkMount /MYAPP/* loadbalancer # You can use external file for mount points. # It will be checked for updates each 60 seconds. # The format of the file is: /url=worker # /examples/*=loadbalancer #JkMountFile conf/uriworkermap.properties # Add shared memory. # This directive is present with 1.2.10 and # later versions of mod_jk, and is needed for # for load balancing to work properly # Note: Replaced JkShmFile logs/jk.shm due to SELinux issues. Refer to # https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=225452 JkShmFile run/jk.shm # Add jkstatus for managing runtime data <Location /jkstatus> JkMount status Order deny,allow Deny from all Allow from 127.0.0.1 </Location>
vi.Create another file named workers.properties with below deatils.
# Define list of workers that will be used # for mapping requests # The configuration directives are valid # for the mod_jk version 1.2.18 and later # worker.list=loadbalancer,status # Define Node1 # modify the host as your host IP or DNS name. worker.node1.port=8080 worker.node1.host=eetu32p1.mydomain.com worker.node1.type=ajp13 worker.node1.lbfactor=1 # worker.node1.connection_pool_size=10 (1) # Define Node2 # modify the host as your host IP or DNS name. #worker.node2.port=8009 #worker.node2.host= node2.mydomain.com #worker.node2.type=ajp13 #worker.node2.lbfactor=1 # worker.node1.connection_pool_size=10 (1) # Load-balancing behaviour #worker.loadbalancer.type=lb #worker.loadbalancer.balance_workers=node1,node2 # Status worker for managing load balancer worker.status.type=status
vii. cd to /opt/Apache2.2.9/bin and check the syntax by using below command
./apachectl -t
If it show syntax OK
restart the server using ./apachectl restart
viii. If Apache restarts successfully then apache installation is successful.
check apache status by http://<hostname>/
this should give you your applications index/home page.
this finishes Apache installation and configuration for JBoss.
Sarting and stopping Jboss Appserver:
############################################
cd to /opt/jboss-eap-4.3/jboss-as/bin and issue below commands to start and stop server.
To start: ./run.sh -c jboss2 -b 0.0.0.0 -u admin -p jbossadm & To stop: ./shutdown.sh -s `hostname`:1099 -u admin -p jbossadm & To check: ps -eaf | grep -i java | grep -v grep
Note: Sometimes it wont stop after issueing the stop command .there you can kill the process to stop it completely <kill -9 pid>
In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.