[Java platform architecture-1.2] Steps for configuring jboss6.x on centos 5.x

Source: Internet
Author: User
1. How to remotely connect to centos and upload and download files

Use xbroswer in xmanager

First, create a new folder javaplatserver under xshell under xbroswer and create an xshell session.

 

OK. Double-click the newly created xshell session to remotely connect to centos. The following describes how to operate centos.

2. Check the Java environment of centos

Enter Java-version to view the Java version.

Server version for 1.6.0, in line with our needs, do not do JDK configuration, if you use 1.7, then uninstall, then install, the specific method please refer to the http://www.haogongju.net/art/675472

3. Start to install jboss6.x

First, create an installation folder.

Statement mkdir server.

Slave.

Run the decompression command, decompress the zip package: unzip jboss-as-......zip, about 1 minute or so, the file is more.

After decompression, you will find the jboss-6.1.0.Final folder under the Server Directory, succeeded.

4. Configure JBoss Environment Variables

Input VI/etc/profile

Press a to edit and enter

Export jboss_home =/usr/local/your
Export Path = $ path: $ jboss_home/bin

ESC, Shift + Z, exit and save.

Run the following command to make the configuration file take effect:Source/etc/profile

OK. Check whether the configuration is successful.

The path is printed successfully. environment variables are configured successfully!

5. Run our JBoss

You only need to enter the bin directory of JBoss and execute run. Sh. It takes about 40 s

Unfortunately, centos uses the command method and can be tested without a browser. By default, JBoss only listens to localhost, so it cannot be tested.

Of course, you can useRun. Sh-C default-B 0.0.0.0 command to specify the address to be listened to, also can achieve remote LAN Access

6. "modify" Our JBoss-Port

After all, the server changes the default port 8080 to port 80.

Enter the following command:VI $ jboss_home/Server/default/CONF/bindingservice. Beans/META-INF/bindings-jboss-beans.xml

Edit the file and find

<Bean>

<Property name = "servicename"> JBoss. Web: service = webserver </property>

<Property name = "bindingname"> httpconnector </property>

<Property name = "Port"> 8080 </property>Change to the port you want

<Property name = "Description"> JBoss web HTTP connector socket; also drives the values for the HTTPS and AJPSockets </property>

</Bean>

To change AJP, You need:

<Bean>

<Property name = "servicename"> JBoss. Web: service = webserver </property>

<Property name = "bindingname"> ajpconnector </property>

<Property name = "Port"> 8009 </property>Change to the port you want

<Property name = "Description"> JBoss web AJP Connector socket </property>

</Bean>

OK. After changing the port, we save the file. Run run. Sh again

As you can see, it has changed from 8080 to port 80.

7. "modify" Our JBoss-listener IP address (all IP addresses in the LAN can be accessed)

Jboss-6.1.0.Final \ Server \ Default \ deploy \ jbossweb. Sar \ Server. xml needs to be edited

Run VI $ jboss_home \ Server \ Default \ deploy \ jbossweb. Sar \ Server. xml

Find:

Change the original address to 0.0.0.0.

OK, all done!

Run the Command run. Sh again. The startup is successful,

Hey, you will find that you still cannot access it. You can enter http: // ip/on other computers, but cannot open it ??? Potholes.

A small step is required to configure the centos firewall.

8. Configure the JBoss firewall to allow HTTP ports (8080)

First, check our firewall rules.

There is indeed no port 80, so it is no wonder you cannot access it.

Edit Firewall

Join

Before the last sentence.

Release save and restart Firewall Configuration:

Check the iptable again.

Ports 80 and 8009 have been added.

9. Taste the joy of victory

Enter the address in the browser and open it successfully:

710782046, jackchain

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.