标签:version 服务器 profile source 压缩包
配置 Java JDK( 假设压缩包目录为/root/java/ )
1. 解压并安装 Java JDK 1.8.0_45 tar -zxvf jdk-8u40-linux-x64.tar.gz
2. 设置环境变量,将以下片段添加到 /etc/profile 文件末尾
3. 执行 source /etc/profile
4. 测试 java -version 输出:JAVA_HOME=/root/java/jdk1.8.0_40
CLASSPATH=.:$JAVA_HOME/lib.tools.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed
mode)
配置Wildfly服务器
1. 下载并解压压缩包 tar -zxvf wildfly-8.2.0.Final.tar.gz
2. cd wildfly-8.2.0.Final/wildfly-8.2.0.Final/bin
3. ./add-user.sh 使用默认选项创建 root 用户,密码:123456
4. ./standalone.sh 启动服务器
5. 在新的终端进入 wildfly-8.2.0.Final/wildfly-
8.2.0.Final/bin , ./jboss-cli.sh 、 connect 进入控制台
[disconnected /] connect
[standalone@localhost:9990 /]
Wildfly启动停止脚本
#!/bin/bash
# chkconfig: - 30 21
# description: http service.
# Source Function Library
. /etc/init.d/functions
prog="wildfly"
start() {
echo -n $"Starting $prog: "
cd /usr/local/wildfly-8.2.0/bin
./standalone.sh -c standalone-full.xml&
}
stop() {
echo -n $"Stopping $prog: "
cd /usr/local/wildfly-8.2.0/bin
./jboss-cli.sh --connect --command=:shutdown
}
restart(){
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
RETVAL=1
Esac
启动后如图所示代表成功了
标签:version 服务器 profile source 压缩包
原文地址:http://881955.blog.51cto.com/871955/1658517