centos7 installation and configuration of Jboss

1. Install JDK
1. Download the JDK
address: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
and upload it to centos7
2. Install and
download the compressed package jdk-8u171 -linux-x64.tar.gz, extract it to the /usr/local/ directory, and rename the directory to jdk1.8
3. Configure environment variables Add the following
to the /etc/profile file:

#设置java环境
JAVA_HOME=/usr/local/jdk1.8/
JRE_HOME=/usr/local/jdk1.8/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOMR/lib
export JAVA_HOME JRE_HOME PATH CLASS_PATH

4. Verify Enter java -version
on the command line, and the following appears:

[root@localhost jdk1.8]# java -version
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
[root@localhost jdk1.8]# 

2. Install Jboss

1. For the download link of each Jboss
version, see the following blog:
https://teddysun.com/260.html
Here, choose to download jboss-eap-6.4.0.zip
and upload it to centos7
2. Install and
unzip jboss-eap-6.4. 0.zip, put it in the directory /usr/local/
3. Configure environment variables Add the following
to the file /etc/profile:

#配置jboss变量
export JBOSS_HOME=/usr/local/jboss-eap-6.4.0/

4. Start the service Before
using jboss, set the permissions of the file first, then enter the bin directory of jboss, run the script ./standalone.sh, and start Jboss in the mode of a single server instance# chmod -R 777 /usr/local/jboss-eap-6.4.0

Running the script ./domain.sh will start JBoss in a mode allowing control and management of multiple instances

5. Verification
(1) When the local verification
starts , if the process is not placed in the background, it will occupy the current shell. It can be verified in another shell. When the command is executed, curl -I 127.0.0.1:8080
it is normal if the following content appears:

[root@localhost ~]# curl -I 127.0.0.1:8080
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Accept-Ranges: bytes
ETag: W/"1496-1427480780000"
Last-Modified: Fri, 27 Mar 2015 18:26:20 GMT
Content-Type: text/html
Content-Length: 1496
Date: Mon, 07 May 2018 11:35:44 GMT

(2), verify on other machines in the LAN
First , configure the firewall and selinux of centos7, or close them.
Then modify the jboss configuration file and vim /usr/local/jboss-eap-6.4.0/standalone/configuration/standalone.xml
find the following,

<interface name="public">

    <inet-address value="${jboss.bind.address:127.0.0.1}"/>

</interface>

Change 127.0.0.1 to the ip address that allows access, or write it as all ip0.0.0.0, save and exit.

The browser page is as follows:
write picture description here

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325774144&siteId=291194637
Recommended