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 ...
随机推荐
- “耐撕”团队 2016.03.31 站立会议
1. 时间: 19:30--19:50 共计20分钟. 2. 成员: Z 郑蕊 * 组长 (博客:http://www.cnblogs.com/zhengrui0452/), P 濮成林(博客:ht ...
- web项目中的监听器,过滤器以及自定义servlet的执行顺序
可以看到web容器一启动就会实例化监听器的contextInitialized(ServletContextEvent event)方法,然后是过滤器的init()方法,最后在用户访问web应用的 时 ...
- python爬虫之redis环境简单部署
Redis 简介 Redis 是完全开源免费的,遵守BSD协议,是一个高性能的key-value数据库. Redis 与其他 key - value 缓存产品有以下三个特点: Redis支持数据的持久 ...
- qtp 自动化测试桌面程序-点滴1(录制设置、共用文件)
1 automation-record and run settings--设置录制程序 2 将function/repository 放于单独于test的文件夹中-方便多个test使用同一个仓库.函 ...
- 实体类注解错误:Could not determine type for: java.util.List
今天配置实体类注解时,出现以下错误: Caused by: org.hibernate.MappingException: Could not determine type for: java.uti ...
- Jsoup的使用
http://caidongrong.blog.163.com/blog/static/21424025220139292525874/
- Codevs1541[USACO]围墙涂色
离散加差分有点涨姿势啊 对我这种菜鸡而言还是第一次看到啊qwq 题面 大意 :n次,每次覆盖一个区间,求覆盖过m次的节点个数 sol:大概是差分的思想加上离散,就可以解决普通差分无法解决的问题了,比如 ...
- redis知识汇总
redis是一个内存数据库,使用key-value形式在内存中管理数据. 一.redis使用场景 1.热数据存储.对于需要频繁读写的数据,可以放到redis中,不用频繁的请求数据库.再设置策略持久化到 ...
- 自定义django-admin命令
我们可以通过manage.py编写和注册自定义的命令. 自定义的管理命令对于独立脚本非常有用,特别是那些使用Linux的crontab服务,或者Windows的调度任务执行的脚本.比如,你有个需求,需 ...
- BZOJ4321queue2——DP/递推
题目描述 n 个沙茶,被编号 1~n.排完队之后,每个沙茶希望,自己的相邻的两 人只要无一个人的编号和自己的编号相差为 1(+1 或-1)就行: 现在想知道,存在多少方案满足沙茶们如此不苛刻的条件. ...