RHEL6.5 install OpenJDK1.7.0 + JBoss7.1.1 + Maven3.0.4

Source: Internet
Author: User
Tags stop script
Directory 1. Install openJDK1.7.0.11.1 and run the installation command... 11.2 confirm that Java is successfully installed... 22. Install JBoss7.1.1.22.1 and jboss7.1 download... 22.2 Add a user... 22.3 set boot startup... 52.4 grant the execution permission... 72.5 access... 83. Install maven3.0.4.83.1. Install and download the apache-maven-3.0.4-bin.

Directory
 
1. Install openjdk1.7.0.1
1.1 run the installation command... 1
1.2 check that Java is successfully installed... 2
2. Install JBoss7.1.1. 2
2.1 Download jboss7.1... 2
2.2 Add a user... 2
2.3 set boot startup... 5
2.4 grant the execution permission... 7
2.5 access... 8
3. Install maven3.0.4. 8
3.1、install and download apache-maven-3.0.4-bin.tar.gz. 8
3.2 decompress the package to the target directory... 8
3.3 set environment variables... 8
3.4. Check whether the test is successful... 8
3.5 modify the default home page... 9
 
1. Install openJDK1.7.0
 
1.1 run the installation command
 
Yum install java-1.7.0-openjdk-devel
 
After analyzing the dependency package, yum requires you to confirm the installation. Enter y and press enter to confirm the installation.
 
1.2 check that Java is successfully installed
 
Java-version
 
You can see that the console prints the java version.
 
2. Install JBoss7.1.1
 
2.1 Download jboss7.1
 
Http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.tar.gz
 
Tar-zxvf jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.tar.gz
 
2.2 Add a user
 
# Mv/root/jboss-as-7.1.1.Final/usr/local/jboss
 
# Cd/usr/local/jboss/
 
#/Usr/local/jboss/bin/add-user.sh
 
What type of user do you wish to add?
 
A) Management User (mgmt-users.properties)
B) Application User (application-users.properties)
(A):
 
Enter the details of the new user to add.
Realm (ManagementRealm): (Press ENTER)
Username: adminjboss
Password: at least six passwords
Re-enter Password:
About to add user 'adminjbos' for realm' managementrealm'
Is this correct yes/no? Yes
Added user 'adminjson' to file'/usr/local/jboss/standalone/configuration/mgmt-users.properties'
Added user 'adminjbos' to file'/usr/local/jboss/domain/configuration/mgmt-users.properties'
 
Modify 127.0.0.1 in the jboss/standalone/configuration/standalone. xml file to 0.0.0.0, which can be accessed by other machines.
The path to the startup configuration file is:
 
/Usr/share/jboss-as-7.1.1.Final/standalone/configuration/standalone. xml
 
Find the interfaces definition, and change the default values of jboss. bind. address and jboss. bind. address. management to 0.0.0.0.
 
 
 

 

 

 

 

 

 

 

 

 

 

 
Before Modification
 

 

 

 

 

 

 

 

 

 

 

 
After modification
 
To modify the port bound to Jboss HTTP, you can modify the socket-binding line. For example, change the port to 80:
 

 
Note: To bind port <1024, you need the root permission to start Jboss.
 
[Root @ mysqlnode2 bin] #/usr/local/jboss/bin/standalone. sh-Djboss. bind. address = 0.0.0.0-Djboss. bind. address. management = 0.0.0.0 &
 
 
 
2.3 set startup
 
# Cd/etc/init. d
 
Vi jboss. The script content is as follows:

#! /Bin/sh
# Chkconfig: 345 99 10
# Description: JBoss auto start-stop script.
# Source function library.
./Etc/rc. d/init. d/functions
# Get config.
./Etc/sysconfig/network
# Check that networking is up.
["$ {NETWORKING}" = "no"] & exit 0
### Change the startup path to your start script ###
Startup = '/usr/local/jboss/bin/standalone. sh>/dev/null 2>/dev/null &'
Shutdown = 'killall Java'
Start (){
Echo-n $ "Starting JBoss service :"
$ Startup
RETVAL =$?
Echo
}
Stop (){
Action $ "Stopping JBoss service:" $ shutdown
RETVAL =$?
Echo
}
Restart (){
Stop
Sleep 10
Start
}
# See how we were called.
Case "$1" in
Start)
Start
;;
Stop)
Stop
;;
Restart)
Restart
;;
*)
Echo $ "Usage: $0 {start | stop | restart }"
Exit 1
Esac

Maven details: Click here
Maven: Click here

Related reading:

Maven 3.1.0 release, http://www.linuxidc.com/Linux/2013-07/87403.htm of Project Build tools

Install Maven http://www.linuxidc.com/Linux/2013-05/84489.htm in Linux

Maven3.0 configuration and simple use http://www.linuxidc.com/Linux/2013-04/82939.htm

Build sun-jdk and Maven2 http://www.linuxidc.com/Linux/2012-12/76531.htm in Ubuntu

Maven getting started http://www.linuxidc.com/Linux/2012-11/74354.htm

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.