1. Download jboss7
Http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.tar.gz
Decompress the package in the current path after the download is complete.
Tar-zxvf jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.tar.gz
2. Add an administrator user (used to enter the webpage version management interface)
Move the current folder to/usr/local
Music jboss-as-7.1.1.Final/usr/local/JBoss
Execute add administrator user
/Usr/local/JBoss/bin/add-user.sh
Follow the prompts and enter:
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: Set the user name
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'
3. Modify Environment Variables
Edit Environment variable configuration file
VI/etc/profile
Add JBoss path
Jboss_home =/usr/local/JBoss
Save and exit
Press ESC and enter: Q!
4. Modify the standalone. xml file
Edit the standalone. xml file
VI/JBoss/standalone/configuration/standalone. xml
Replace 10.10.92.235 with the local IP Address
<Interfaces>
<Interface name = "management">
<INet-address value = "$ {JBoss. Bind. Address. Management: 10.10.92.235}"/>
</Interface>
<Interface name = "public">
<INet-address value = "$ {JBoss. Bind. Address: 10.10.92.235}"/>
</Interface>
<Interface name = "unsecure">
<INet-address value = "$ {JBoss. Bind. Address. unsecure: 10.10.92.235}"/>
</Interface>
<Interface name = "IPv4">
<Any-ipv4-address/>
</Interface>
</Interfaces>
Save and exit
Press ESC and enter: Q!
5. Start JBoss
There are two ways to start JBoss:
(1)/usr/local/JBoss/bin/standalone. Sh
(2) nohup/usr/local/JBoss/bin/standalone. Sh
(1) If the current window is closed, the JBoss service is also closed.
(2) If the current window is closed, the JBoss service runs in the background.
After JBoss is started, access http: // 10.10.92.235: 9990/
The Administrator page appears, indicating that the startup is successful. (The IP address is the IP address configured in the standalone. xml configuration file)
6. Import the war package (JBoss supports hot deployment)
Put the war package
/Usr/local/JBoss/standalone/deployments folder
Take Sh. War and VCA. War as an example:
After the deployment is successful, there will be two more files in the current folder:
Sh. War. deployed
VCA. War. deployed
The two war packages are successfully deployed.
If the deployment fails:
Sh. War. Failed
VCA. War. Failed
In this case, delete Sh. War. Failed, VCA. War. Failed, restart JBoss, and redeploy JBoss.
7. view log files
Tail-200f/usr/local/JBoss/standalone/log/server. Log
8. Disable JBoss
First, view the details of the JBoss process.
PS aux | grep JBoss
Disable related processes
Kill-9 process no.