Wildfly 19下部署安装Drools工作台(Business Central Wrokbench)

Wildfly19部署安装

1、下载wildfly 19

下载地址

2、安装

  • 复制到指定目录:/data/

  • 解压

    unzip wildfly-preview-19.0.0.Final.zip
    

3、配置环境变量

1、打开文件

vi /etc/profile

2、添加如下内容:

JBOSS_HOME=/data/wildfly-preview-19.0.0.Final
PATH=$PATH:$JBOSS_HOME/bin
export JBOSS_HOME PATH

3、保存退出;

4.使配置生效

source /etc/profile

4、添加用户

输入命令:

./add-user.sh

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-rfWIgFjw-1612664764232)(C:\Users\Administrator\AppData\Roaming\Typora\typora-user-images\image-20210201154454437.png)]

一路yes就可以,但是要输入你的用户名和密码创建管理员账号;

5、修改配置文件

为了能让外部访问到,需要修改配置文件;

/data/wildfly-preview-19.0.0.Final/standalone/configuration/standalone.xml

将2个127.0.0.1修改为本机IP或者为0.0.0.0 这样其他电脑就可以访问到了。

修改后如图所示:

 <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>
</interfaces>

6、启动

启动脚本位于根目录/bin目录中。Windows为standalone.bat,Linux为standalone.sh

./standalone.sh

因为配置过环境变量,因此可以在任何目录执行这个命令。

在这里插入图片描述

Wildfly还可以启动一个管理后台来对服务进行管理;

启动脚本位于根目录/bin目录中。Windows为domain.bat,Linux为domain.sh

./domain.sh

说明:配置运行内存

为避免部署项目体积较大而报错–java.lang.OutOfMemoryError内存错误。请提前修改内存配置

在wildfly\bin下standalone.conf(windows平台请修改standalone.conf.bat)文件中修改对应部分如下内容

   JAVA_OPTS="-Xms256m -Xmx2048m -XX:MetaspaceSize=256M -XX:MaxMetaspaceSize=512m -Djava.net.preferIPv4Stack=true"
   JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"

资源充分的情况下推荐设置-Xmx为4096m -XX:MaxMetaspaceSize=1024m

7、外部访问

访问服务器的url为:127.0.0.1:8080,访问管理后台的url为:http://127.0.0.1:9990/

默认端口为8080,在浏览器中输入:

http://192.168.1.102:8080

效果如下:

在这里插入图片描述

wildfly19下部署drools工作台

1、下载资源

  • 下载Business Central Workbench地址:https://download.jboss.org/drools/release/7.48.0.Final/business-central-7.48.0.Final-wildfly19.war

  • 下载KIE Execution Server地址:https://download.jboss.org/drools/release/7.48.0.Final/kie-server-distribution-7.48.0.Final.zip

注意:Business Central Workbench和KIE Execution Server的版本要匹配。

  • 将kie-server-distribution-7.48.0.Final.zip中的kie-server-7.48.0.Final-ee7.war取出然后改名为kie-server.war

  • 将business-central-7.48.0.Final-wildfly19.war改名为kie-wb.war

  • 然后将kie-server.war、kie-wb.war复制到wildfly的standalone/deployments目录下

2、添加用户

1、首先更新admin账户信息

add-user.sh
[root@fuzhou-kieworkbench deployments]# add-user.sh 
WARNING: The JBOSS_HOME (/data/wildfly-19.0.0.Final) that this script uses points to a different installation than the one that this script resides in (/data/wildfly-22.0.0.Final). Unpredictable results may occur.
What type of user do you wish to add? 
 a) Management User (mgmt-users.properties) 
 b) Application User (application-users.properties)
(a): a

Enter the details of the new user to add.
Using realm 'ManagementRealm' as discovered from the existing property files.
Username : admin
User 'admin' already exists and is disabled, would you like to... 
 a) Update the existing user password and roles 
 b) Enable the existing user 
 c) Type a new username
(a): a
Password recommendations are listed below. To modify these restrictions edit the add-user.properties configuration file.
 - The password should be different from the username
 - The password should not be one of the following restricted values {root, admin, administrator}
 - The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)
Password : 
WFLYDM0098: The password should be different from the username
Are you sure you want to use the password entered yes/no? yes
Re-enter Password : 
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[  ]: 
Updated user 'admin' to file '/data/wildfly-19.0.0.Final/standalone/configuration/mgmt-users.properties'
Updated user 'admin' to file '/data/wildfly-19.0.0.Final/domain/configuration/mgmt-users.properties'
Updated user 'admin' with groups  to file '/data/wildfly-19.0.0.Final/standalone/configuration/mgmt-groups.properties'
Updated user 'admin' with groups  to file '/data/wildfly-19.0.0.Final/domain/configuration/mgmt-groups.properties'
Is this new user going to be used for one AS process to connect to another AS process? 
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? yes
To represent the user add the following to the server-identities definition <secret value="YWRtaW4=" />

如下图所示:
在这里插入图片描述
在这里插入图片描述

2、Kie-Server添加用户

  • 为Kie-Server添加一个具有“kie-server”角色的用户,
  • 为Business Central添加一个具有“admin”和“kie-server”角色的用户:
add-user.sh -a -u kieserver -p kieserver1! -g kie-server
add-user.sh -a -u workbench -p workbench! -g admin,kie-server

3、 启动服务

启动WildFly并传递以下参数,这些参数指定Kie Server使用范围和所选的ID

 standalone.sh --server-config=standalone-full.xml -Dorg.kie.server.id=wildfly-kieserver -Dorg.kie.server.location=http://localhost:8080/kie-server/services/rest/server -Dorg.kie.server.controller=http://localhost:8080/kie-wb/rest/controller

值得注意的是:在Wildfly下部署Drools工作台,必须使用完整版的配置启动,否则启动报错或者运行报错。这个在启动命令中可以看得出来,必须使用standalone-full.xml。

4、查看服务

最后检查WildFly是否成功启动,并访问Business Central的主页:http://localhost:8080/kie-wb 。

使用账户/密码:workbench/workbench! 登录。

5、配置访问端口(可选)

现在启动项目,使用默认的端口,但此时如果想修改默认的8080端,可在wildfly根目录下依次查找<JBOSS_HOME>/standalone/configuration/standalone-full.xml。在该文件的最下面有这样一段配置代码。

 <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

 <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>

 <socket-binding name="http" port="${jboss.http.port:8080}"/>

 <socket-binding name="https" port="${jboss.https.port:8443}"/>

 <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="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"/>

 </outbound-socket-binding>

</socket-binding-group>

修改对应的端口即可。比如要修改http请求的端口,那修改${jboss.http.port:8080}中的端口即可。

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

h_and_g

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值