下载地址
复制到指定目录:/data/
解压
unzip wildfly-preview-19.0.0.Final.zip
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
输入命令:
./add-user.sh
一路yes就可以,但是要输入你的用户名和密码创建管理员账号;
为了能让外部访问到,需要修改配置文件;
/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>
启动脚本位于根目录/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
访问服务器的url为:127.0.0.1:8080,访问管理后台的url为:http://127.0.0.1:9990/
默认端口为8080,在浏览器中输入:
http://192.168.1.102:8080
效果如下:
下载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目录下
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=" />
add-user.sh -a -u kieserver -p kieserver1! -g kie-server
add-user.sh -a -u workbench -p workbench! -g admin,kie-server
启动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。
最后检查WildFly是否成功启动,并访问Business Central的主页:http://localhost:8080/kie-wb 。
使用账户/密码:workbench/workbench! 登录。
现在启动项目,使用默认的端口,但此时如果想修改默认的8080端,可在wildfly根目录下依次查找
<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}中的端口即可。