Environment
System Version: cenos 6.2 32bit
JDK: jdk-6u45-linux-i586.bin
JBoss: jboss-4.2.2.GA.zip
VMWare Version: VMWare 7.1.5
1. Install JDK
See the JDK installation documentation.
Ii. Install JBoss
1. Create an installation folder and create/usr/Java with the following command:Mkdir/usr/JavaUpload the jboss-4.2.2.ga.zip file to this folder.
2. Run the extract command to decompress the package:Unzip jboss-4.2.2.GA.zip
After decompression, find the jboss-4.2.2 folder under the Java directory
3. Configure JBoss Environment Variables
VI/etc/profile
Press a to edit and enter
Export jboss_home =/usr/Java/jboss-4.2.2.GA
ESC,: WQ, exit and save
To make the configuration file take effect, enter the following command:Source/etc/profile
OK. Run the following command to test whether the configuration is successful:Echo $ jboss_home
The path is printed successfully, and the environment variable is configured successfully.
4. Run JBoss
/Usr/Java/jboss-4.2.2.GA/bin/run. Sh
Open your browser and enter http: // 127.0.0.1: 8080.
3. Related settings
Currently, only the local machine can be accessed. To allow access from all IP addresses in the LAN, you need to make the following settings to modify the configuration file.
1.VI/usr/Java/jboss-4.2.2.GA/Server/default/deploy/jboss-web.deployer/server. xml
Change $ {JBoss. Bind. Address}0.0.0.0
2.Configure Firewall, HTTP ports allowed (8080)
A. First view the firewall rules
/Etc/init. d/iptables status
B. Edit the Firewall
VI/etc/sysconfig/iptables
Note that you must add the following statement before the last sentence:
-A input-M state -- state new-m tcp-p tcp -- dport 80-J accept
-A input-M state -- state new-m tcp-p tcp -- dport 8009-J accept
C. Restart the Firewall
/Etc/init. d/iptables restart
D. Check the firewall again.
/Etc/init. d/iptables status
Ports 80 and 8009 have been added.
3. Run
/Usr/Java/jboss-4.2.2.GA/bin/run. Sh-B 0.0.0.0
4. Listening
Netstat-antlp | grep 80
Enter http: // 192.168.204.128/in the browser/ Webpage access is successful