CentOS 安装WildFly 10

本文详细介绍Wildfly应用服务器的安装步骤,包括从官方网站下载、解压安装包、配置网络参数到启动服务的过程。此外,还介绍了如何将Wildfly加入系统启动项,实现开机自动启动。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

**

一、安装 Wildfly

**
1 .WildFly的前身是Jboss, 首先去官网下载WildFly,地址:http://wildfly.org/downloads/ ,我这里选择10.1.0.Final版,TAR.GZ 文件,用SFTP拷贝到Centos服务器中

2 .解压压缩包

tar xf wildfly-10.1.0.Final.tar.gz

3 .进入到WildFly启动目录

cd wildfly-10.1.0.Final/bin

4 .进入配置文件,并编辑standalone.xml,将interfaces下inet-address ip地址改成当前地址,socket-binding下http端口改成自己需要的,也可以用启动命令时指定IP

cd /usr/local/wildfly-10.1.0.Final/standalone/configuration
vi standalone.xml

5.启动WildFly -b绑定IP -c指定配置文件

cd /usr/local/wildfly-10.1.0.Final/bin
./standalone.sh -c standalone-full.xml -b 0.0.0.0 &

6.停止 wildFly

./jboss-cli.sh --connect --command=:shutdown

二、加入系统启动

1、复制并修改配置文件

cp ./wildfly/docs/contrib/scripts/init.d/wildfly.conf /ect/default
cp ./wildfly/docs/contrib/scripts/init.d/ /ect/init.d/wildfly-init-redhat.sh /ect/init.d/wildfly

2、修改wildfly配置文件,配置jdk及wildfly路径及其它设置

# General configuration for the init.d scripts,
# not necessarily for JBoss AS itself.
# default location: /etc/default/wildfly

## Location of JDK      
JAVA_HOME="/usr/local/jdk1.8.0_151"

## Location of WildFly
JBOSS_HOME="/usr/local/wildfly"

## The username who should own the process.
JBOSS_USER=root

## The mode WildFly should start, standalone or domain
JBOSS_MODE=standalone

## Configuration for standalone mode
JBOSS_CONFIG=standalone-full.xml

## Configuration for domain mode
# JBOSS_DOMAIN_CONFIG=domain.xml
# JBOSS_HOST_CONFIG=host-master.xml

## The amount of time to wait for startup
# STARTUP_WAIT=60

## The amount of time to wait for shutdown
# SHUTDOWN_WAIT=60

## Location to keep the console log
JBOSS_CONSOLE_LOG="/var/log/wildfly/console.log"

## Additionals args to include in startup
JBOSS_OPTS="-b 0.0.0.0"

3、添加服务,启动服务,查看服务

chkconfig --add wildfly
chkconfig --level 2345 wildfly on
chkconfig --list

4、启动服务

service wildfly start

5、停止服务

service wildfly stop

6、删除服务

chkconfig --del wildfly
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值