Linux Server JBoss Run environment build steps and boot Autostart script run

Source: Internet
Author: User
Tags jboss

Jboss Operating Environment: linux+jdk+jboss+jsp system

JBoss Software Description: Similar to Tomcat, is a running JSP system environment, his site path is similar to Tomcat, Tomcat storage site files into the WebApps directory, and JBoss stored in the Server/default/deploy directory.

The development environment and test steps are as follows:

Linu operating system: CentOS 64-bit

JBoss Software
Http://sourceforge.net/projects/jboss/files/JBoss/JBoss-4.2.3.GA
Http://sourceforge.net/projects/jboss/files/JBoss/JBoss-4.2.3.GA/jboss-4.2.3.GA.zip/download
Http://sourceforge.net/projects/jboss/files/JBoss/JBoss-4.2.3.GA/jboss-4.2.3.GA-jdk6.zip/download

Software name after download
Jboss-4.2.3.ga.zip
Jboss-4.2.3.ga-jdk6.zip

Unzip the file
Unzip/soft/jboss-4.2.3.ga.zip

Java installation: I have installed the other high version, I will no longer install this JDK6, after the configuration is completed can also run JBoss.


Create a Directory
CD/
mkdir data
CD data

mkdir app
CD app

Unzip/soft/jboss-4.2.3.ga.zip

cd/data/app/

chmod +x/data/app/jboss-4.2.3.ga


Set environment variable Jboss_home

To execute the vim/etc/profile command, add the environment variable code as follows

#jdk Config
Export java_home=/usr/java/jdk1.7.0_67
Export Calsspath= $JAVA _home/lib/*.*

#jboss Config
Export Jboss_home=/data/app/jboss-4.2.3.ga

#path Config
Export path= $PATH: $JAVA _home/bin: $JBOSS _home/bin

Execute instruction source/etc/profile Refresh environment variable

Automatically start JBoss script after power-on


Execute the instruction Vi/etc/rc.d/init.d/jboss generate the script file, the content is as follows

#!/bin/bash

#

#/etc/rc.d/init.d/jboss

# init script for JBoss precesses

#

# Processname:jboss

# Description:jboss is a J2SE server

# chkconfig:2345 86 16

# Description:start up the Jboss servlet engine.

if [-f/etc/init.d/functions]; Then

. /etc/init.d/functions

elif [-f/etc/rc.d/init.d/functions]; Then

. /etc/rc.d/init.d/functions

Else

Echo-e "\a jboss:unable to locate functions lib. Cannot continue. "

Exit-1

Fi

Retval=$?

Jboss_home= "/data/app/jboss-4.2.3.ga" #jboss安装目录

Case "$" in

Start

If [-f $JBOSS _home/bin/run.sh];

Then

echo $ "Starting Jboss"

$JBOSS _home/bin/run.sh

Fi

;;

Stop

If [-f $JBOSS _home/bin/shutdown.sh];

Then

echo $ "Stopping Jboss"

$JBOSS _home/bin/shutdown.sh

Fi

;;

*)

echo $ "Usage: $ {start|stop}"

Exit 1

;;

Esac

Exit $RETVAL


Automatic startup script Authorization

Run the chmod 755/etc/rc.d/init.d/jboss command to make the script file executable

Register JBoss Service

Run the Chkconfig--add/etc/rc.d/init.d/jboss command to add it to the service


Start JBoss

Run the sh/data/app/jboss-4.2.3.ga/bin/run.sh command


Stop JBoss Service: Service JBoss Stop

Start JBoss Service: Service JBoss start

Test validation: Show JBoss Welcome management interface After opening URL http://localhost:8080 in Firefox browser

Linux Server JBoss Run environment build steps and boot Autostart script run

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.