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.
<Interfaces>
<Interface name = "management">
<Inet-address value = "$ {jboss. bind. address. management: 127.0.0.1}"/>
</Interface>
<Interface name = "public">
<Inet-address value = "$ {jboss. bind. address: 127.0.0.1}"/>
</Interface>
<Interface name = "unsecure">
<Inet-address value = "$ {jboss. bind. address. unsecure: 127.0.0.1}"/>
</Interface>
</Interfaces>
Before Modification
<Interfaces>
<Interface name = "management">
<Inet-address value = "$ {jboss. bind. address. management: 0.0.0.0}"/>
</Interface>
<Interface name = "public">
<Inet-address value = "$ {jboss. bind. address: 0.0.0.0}"/>
</Interface>
<Interface name = "unsecure">
<Inet-address value = "$ {jboss. bind. address. unsecure: 127.0.0.1}"/>
</Interface>
</Interfaces>
After modification
To modify the port bound to Jboss HTTP, you can modify the socket-binding line. For example, change the port to 80:
<Socket-binding name = "http" port = "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
Maven 3.1.0 release, Project Build Tool
Install Maven in Linux
Maven3.0 configuration and simple use
Set up sun-jdk and Maven2 in Ubuntu
Get started with Maven