一.wildfly在linux下的安装
1.下载地址
官网下载地址:https://www.wildfly.org/downloads/
2.目录介绍
下载好后我们解压出来看一下目录结构:
*appclient 里面是一些默认的配置、服务器日志配置等
*bin 里面就是一些可执行的脚本文件,有添加用户的、启动的脚本等
*docs 就是服务器的基础文件
*domain 服务器的启动方式有两种,一种是standalone,另一种就是domain的分布式启动,里面放了domain启动的相关配置
*standalone 是wildflu的另一种启动方式,放了standalone启动的相关配置
*wwlcome-content 这里面是wildfly启动之后一些默认的显示页面的文件
*jboss-moudls.jar 这个包是在wildfly启动的时候加载相关的moudle的jar包
二.wildfly在linux下的启动与关闭
1.wildfly在linux下的启动
进入到wildfly的解压目录下:
cd /usr/local/wildfly-9.0.2.Final
使用root用户执行
./standalone.sh&
其中,& 是必须的。
不然会导致在客户端的csh画面启动wildfly之后,关闭了csh画面或者crtl+c之后,
wildfly服务也随之停止了。
2.wildfly在linux下的关闭
cd /usr/local/wildfly-9.0.2.Final
使用root用户执行
./jboss-cli.sh --controller=127.0.0.1:9990 --connect --command=:shutdown
127.0.0.1修改为运行wildfly的地址
三.wildfly的war的部署
将test.war包上传到wildfly-9.0.2.Final/standalone/deployments中
重启wildfly
访问localhost:8080/test
其中test为war名称
四.wildfly管理后台用户添加
进入目录 wildfly-9.0.2.Final/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
Enter the details of the new user to add.
Using realm 'ManagementRealm' as discovered from the existing property files.
Username : credo
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? y
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 'credo' for realm 'ManagementRealm'
Is this correct yes/no? y
Added user 'credo' to file 'D:\software\wildfly-10.1.0.Final-rePack_v3.1\wildfly-10.1.0.Final-rePack_v3.1\wildfly-10.1.0.Final\standalone\configuration\mgmt-users.properties'
Added user 'credo' to file 'D:\software\wildfly-10.1.0.Final-rePack_v3.1\wildfly-10.1.0.Final-rePack_v3.1\wildfly-10.1.0.Final\domain\configuration\mgmt-users.properties'
Added user 'credo' with groups to file 'D:\software\wildfly-10.1.0.Final-rePack_v3.1\wildfly-10.1.0.Final-rePack_v3.1\wildfly-10.1.0.Final\standalone\configuration\mgmt-groups.properties'
Added user 'credo' with groups to file 'D:\software\wildfly-10.1.0.Final-rePack_v3.1\wildfly-10.1.0.Final-rePack_v3.1\wildfly-10.1.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? y
To represent the user add the following to the server-identities definition <secret value="Y3JlZG8=" />
请按任意键继续. . .
进入到浏览器localhost:9990回车,输入账后密码就可以进入后台