36.6 WildFly 应用服务器
最后更新于
# pkg install wildfly# cd /usr/ports/java/wildfly/
# make install clean# pkg info -D wildfly/
├── usr
│ └── local
│ └── wildfly
│ ├── bin
│ │ └── add-user.sh # WildFly 用户添加脚本
│ ├── standalone
│ │ └── configuration
│ │ ├── mgmt-users.properties # 独立模式管理用户配置
│ │ └── mgmt-groups.properties # 独立模式管理组配置
│ └── domain
│ └── configuration
│ ├── mgmt-users.properties # 域模式管理用户配置
│ └── mgmt-groups.properties # 域模式管理组配置
└── var
└── log
└── wildfly
├── error # WildFly 错误日志
└── log # WildFly 普通日志# service wildfly enable # 设置 WildFly 服务在系统启动时自动启动
# sysrc wildfly_args="-Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0" # 配置 WildFly 绑定到所有网络接口# service wildfly start# /usr/local/wildfly/bin/add-user.sh
What type of user do you wish to add?
a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)
(a): # 按回车键选择默认选项
# 选项 a 为管理员账户,选项 b 为应用用户
Enter the details of the new user to add.
Using realm 'ManagementRealm' as discovered from the existing property files.
Username : test # 输入要创建的用户名
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}
# 密码不能是 root、admin 或 administrator
- The password should contain at least 8 characters, 1 alphabetic character(s), 1 digit(s), 1 non-alphanumeric symbol(s)
# 密码应至少包含 8 个字符,并至少包含 1 个字母、1 个数字及 1 个非字母数字字符
Password : # 输入为新用户 test 设置的密码,要求见上文
Re-enter Password : # 重复输入密码
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[ ]: # 按回车键留空不加入任何用户组
# 你希望该用户属于哪些用户组?(请输入以逗号分隔的列表,或留空表示不加入任何用户组)[ ]:
About to add user 'test' for realm 'ManagementRealm'
# 即将为域 'ManagementRealm' 添加用户 'test'。
Is this correct yes/no? yes # 确认创建
Added user 'test' to file '/usr/local/wildfly/standalone/configuration/mgmt-users.properties'
Added user 'test' to file '/usr/local/wildfly/domain/configuration/mgmt-users.properties'
Added user 'test' with groups to file '/usr/local/wildfly/standalone/configuration/mgmt-groups.properties'
Added user 'test' with groups to file '/usr/local/wildfly/domain/configuration/mgmt-groups.properties'