How To Install WildFly as a Service on Linux
Installing WildFly as a service on Linux has multiple advantages like automatic start on system boot, convinient management with service command, better security and other.
To install WildFly as a service on CentOS and other RPM-based Linux distributions do steps described below.
This guide is suitable for installing WildFly 8 and 9.
Install Java (requires JDK in order to support JSP)
yum install java-1.8.0-openjdk-devel
Download WildFly and unpack binaries
wget http://download.jboss.org/wildfly/9.0.1.Final/wildfly-9.0.1.Final.zip
unzip wildfly-9.0.1.Final.zip -d /opt/
Create symbolic link in order to simplify WildFly updates in future
ln -s /opt/wildfly-9.0.1.Final /opt/wildfly
Copy and edit init script configuration
cp /opt/wildfly/bin/init.d/wildfly.conf /etc/default/wildfly.conf
Edit variables in /etc/default/wildfly.conf
## Location of JDK
JAVA_HOME="/usr/lib/jvm/java-1.8.0"
## Location of WildFly
JBOSS_HOME="/opt/wildfly"
## The username who should own the process.
JBOSS_USER=wildfly
## The mode WildFly should start, standalone or domain
JBOSS_MODE=standalone
## Configuration for standalone mode
JBOSS_CONFIG=standalone-full-ha.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="--admin-only -b 172.0.0.1"
Copy init script
cp /opt/wildfly/bin/init.d/wildfly-init-redhat.sh /etc/init.d/wildfly
Add WildFly as a service
chkconfig --add wildfly
chkconfig wildfly on
Create directory for logs
mkdir -p /var/log/wildfly
Add user to run WildFly
adduser wildfly
Change the owner of WildFly directories
chown -R wildfly:wildfly /opt/wildfly-9.0.1.Final
chown -R wildfly:wildfly /opt/wildfly
chown -R wildfly:wildfly /var/log/wildfly
Start WildFly
service wildfly start
See also how to install WildFly on Ubuntu.
just to add a bit:
you can create a nologin/ no home user with
# adduser --no-create-home wildfly
# usermod -s /sbin/nologin wildlfy
------------------------------------
http://developer-should-know.com/post/112230363742/how-to-install-wildfly-as-a-service-on-linux
http://blog.csdn.net/yuqiongran/article/details/52524483
How To Install WildFly as a Service on Linux的更多相关文章
- Mysql安装出现=========== install/remove of the Service Denied
在安装mysql过程中遇到一个问题 install/remove of the Service Denied,这个问题说明自己没有安装和删除的权利,原因是自己在运行cmd过程是没有使用管理员身份运行 ...
- Install/Remove of the Service Denied!
在windos 的cmd下安装mysql 在mysql的bin目录下面执行: mysqld --install 报错: 信息如下一: Install/Remove of the Service Den ...
- Mysql安装错误:Install/Remove of the Service Denied!解决办法
Mysql安装错误:Install/Remove of the Service Denied!解决办法 在windos 的cmd下安装mysql 在mysql的bin目录下面执行: mysqld -- ...
- [mysql] Install/Remove of the Service Denied
在windos 的cmd下安装mysql 在mysql的bin目录下面执行: mysqld --install 报错: 信息如下: Install/Remove of the Service Deni ...
- 安装mysql Install/Remove of the Service Denied!错误的解决办法
在window 的cmd下安装mysql 在mysql的bin目录下面执行: mysqld --install 报错: 信息如下: Install/Remove of the Service Deni ...
- MySQL—Install/Remove of the Service Denied
在Windos7下通过命令"mysqld --install"安装MySQL数据库时出现了"Install/Remove of the Service Denied&qu ...
- 安装mysql时出现 mysql Install/Remove of the Service Denied! 错误的解决办法
用cmd在mysql的bin目录下面执行: mysqld --install 命令,出现错误: mysql Install/Remove of the Service Denied! 解决方法:以管理 ...
- 【记录】安装mysql Install/Remove of the Service Denied!错误的解决办法
最近安装 Mysql 5.6版本,在安装的过程中出现Install/Remove of the Service Denied!错误!(本人Win10 系统) 出现此问题是由于当前用户权限不够,需要以管 ...
- How to run OFBiz as a Service on linux
Windows See this specific guide: How to Run OFBiz as Windows Service with Java Service Wrapper Linux ...
随机推荐
- Oracle Flashback 详解
Oracle flashback 是一种方便快捷的数据库恢复技术,它不使用备份文件,通过闪回日志可以使数据库恢复到过去的某个状态,当用户发生逻辑错误时(误删表数据.表.表空间等)需要快速恢复数据库,可 ...
- The New Villa
题目:The New Villa 题目链接:http://poj.org/problem?id=1137 题目大意: 一个人买了一个别墅,里面有很多房间,特别的是这个别墅的房间里灯的开关是乱套的,也就 ...
- MyBatis映射文件5
返回map Map<String,Object> getEmpByResMap(Integer id); <select id="getEmpByResMap&qu ...
- docker 操作镜像的基本操作
以安装mysql为例 1.拉取镜像 docker pull mysql 错误的启动 [root@localhost ~]# docker run --name mysql01 -d mysql 42f ...
- scala mkstring
如果你想要把集合元素转化为字符串,可能还会添加分隔符,前缀,后缀. Solution 使用mkString方法来打印一个集合内容,下面给一个简单的例子: scala> val a = Array ...
- dom 事件主要内容
一 . onclick(单击) 原图 单击btn1 在点击btn2 二 . onfocus 和 onblur onfocus(聚焦, 鼠标点击输入框) onblur(模糊, 鼠标点击输入框外的地方) ...
- 使用电脑adb给Essential Phone刷机 —(官方篇)
用ADB给Essential Phone线刷升级 重要:请确保在刷机前已经解锁,关于解锁教程群里有! 准备 原版boot Twrp boot Magisk卡刷包 到官网下载OTA包 准备好Essent ...
- group by具有去重的功能
group by具有去重的功能
- 简单介绍一下在CentOS上安装Docker。
简单介绍一下在CentOS上安装Docker. 前置条件: 64-bit 系统 kernel 3.10+ 1.检查内核版本,返回的值大于3.10即可. $ uname -r 2.使用 sudo 或 r ...
- 小程序——Tab切换
<view class="body"> <view class="nav bc_white"> <view class=" ...