Centos7部署wildfly服务

avatar 2020年5月26日23:02:01 评论 1,287 次浏览

帮朋友一个忙,他接了一个别人的私活,需要部署wildfly服务,这个以前也没看过,所以就想自己看看部署一下,然后告诉他。其实,真对wildfly的部署没有太多东西,就是把软件下载下来然后启动起来就可以了。wildfly依赖的是java,所以我们需要配置java环境,可以参考:https://www.wulaoer.org/?p=487

我的环境已经配置好了java,所以,我直接下载wildfly,然后启动服务。

[root@www.wulaoer.org ~]# java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

下载wildfly服务,并解压

[root@www.wulaoer.org ~]# cd /usr/local/
[root@www.wulaoer.org local]# wget https://download.jboss.org/wildfly/9.0.0.Final/wildfly-9.0.0.Final.tar.gz
[root@www.wulaoer.org local]# tar -zxf wildfly-9.0.0.Final.tar.gz

配置wildfly限制,默认wildfly的配置是127.0.0.1,需要修改成0.0.0.0可以任何客户端都能请求。

[root@www.wulaoer.org ~]# cd /usr/local/wildfly-9.0.0.Final
[root@www.wulaoer.org wildfly-9.0.0.Final]# cd standalone/configuration/
[root@www.wulaoer.org configuration]# vim standalone.xml 
......
    <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>
        <!-- TODO - only show this if the jacorb subsystem is added  -->
        <interface name="unsecure">
......

配置wildfly服务的端口

[root@www.wulaoer.org configuration]# vim standalone.xml 
......
 </interfaces>
    <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
        <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
        <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>
        <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
        <socket-binding name="http" port="${jboss.http.port:8081}"/>  #http请求的端口
        <socket-binding name="https" port="${jboss.https.port:8443}"/> #https请求端口
        <socket-binding name="txn-recovery-environment" port="4712"/>
        <socket-binding name="txn-status-manager" port="4713"/>
        <outbound-socket-binding name="mail-smtp">
            <remote-destination host="localhost" port="25"/>
......

wildfly的项目存储路径可以放在

[root@www.wulaoer.org configuration]# ll /usr/local/wildfly-9.0.0.Final/standalone/deployments/

启动wildfly服务,可以使用下面的命令

[root@www.wulaoer.org configuration]# cd /usr/local/wildfly-9.0.0.Final/bin/
[root@www.wulaoer.org bin]# sh standalone.sh &

下面我请求一下看看,wildfly的默认页面

wildfly服务就搭建好了,后期还有其它的知识点在另作处理。

avatar

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: