标签:java load centos6 oracle tar alt 分享 图片 centos6.5
一、安装前准备安装Tomcat需要提供JDK支持
下载JDK安装包
#wget https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jdk-8u191-linux-x64.rpm?AuthParam=1543443708_da2f2c188434950c40633b9ddee08967
安装JDK
# rpm -ivh jdk-8u191-linux-x64.rpm
设置环境变量
# vim /etc/profile
文档最后添加如下内容:
export JAVA_HOME=/usr/java/jdk1.8.0_191-amd64
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$PATH
检查JDK是否安装成功
# java -version
如果看到JVM版本及相关信息,即安装成功!
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
下载安装包
# wget http://mirrors.hust.edu.cn/apache/tomcat/tomcat-7/v7.0.92/bin/apache-tomcat-7.0.92.tar.gz
解压安装包
# tar -xzf apache-tomcat-7.0.92.tar.gz
移动解压包至文件目录
# mv apache-tomcat-7.0.92 /usr/local/
更改文件名称
# cd /usr/local
# mv apache-tomcat-7.0.92/ apache-tomcat/
修改启动文件catalina.sh
# cd apache-tomcat/bin
# vim catalina.sh
添加以下内容:
CATALINA_HOME=/usr/local/apache-tomcat/
# chmod +x catalina.sh
启动测试Tomcat
# ./catalina.sh start
http://localhost:8080,测试成功。
登录管理界面
添加用户
# vim /usr/local/apache-tomcat/conf/tomcat-users.xml
-->后添加如下内容:
-->
<role rolename="manager-gui"/>
<role rolename="admin-gui"/>
<user username="admin" password="redhat" roles="manager-gui"/>
登录测试
# /usr/local/apache-tomcat/bin/catalina.sh stop
# /usr/local/apache-tomcat/bin/catalina.sh start
http://localhost:8080
标签:java load centos6 oracle tar alt 分享 图片 centos6.5
原文地址:http://blog.51cto.com/13689359/2323487