码迷,mamicode.com
首页 > 系统相关 > 详细

Linux服务安装-手动安装二进制JDK和tomcat服务

时间:2020-05-26 20:21:14      阅读:92      评论:0      收藏:0      [点我收藏+]

标签:rac   repos   pat   cer   group   默认   tar   xxx   otn   

操作系统Centos7

1、备份和修改基础仓库到163
yum install wget -y && cd /etc/yum.repos.d/ && mv CentOS-Base.repo CentOS-Base.repo.back
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo

2、安装epel仓库和修改epel仓库地址到阿里云
yum install epel-release vim -y
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo

3、安装开发环境
yum group list
yum group install Development Tools -y

4、下载jdk二进制软件包,提供网址:因为oracle的jdk下载比较有一点反人类,wget不太好下载,提供网址
https://www.oracle.com/java/technologies/
下载jdk8,是不可能的,需要登录谁
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn/java/jdk/8u251-b08/3d5a2bb8f8d4428bbe94aed7ec7ae784/jdk-8u251-linux-x64.tar.gz
下载jdk14,这是OK的
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/14.0.1+7/664493ef4a6946b186ff29eb326336a2/jdk-14.0.1_linux-x64_bin.tar.gz

5、下载tomcat二进制软件包
wget -O /usr/local/src/apache-tomcat-9.0.35.tar.gz wget https://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz

6、解压和配置jdk
tar zxf /usr/local/src/jdk-11.0.7_linux-x64_bin.tar.gz -C /usr/local/
ln -s /usr/local/jdk-11.0.7 /usr/local/jdk
echo ‘export JAVA_HOME=/usr/local/jdk‘ >> /etc/profile
echo ‘export CLASSPATH=${JAVA_HOME}/lib‘ >> /etc/profile
echo ‘export PATH=${PATH}:$JAVA_HOME/bin‘ >> /etc/profile
source /etc/profile

7、解压和配置tomcat
tar zxf /usr/local/src/apache-tomcat-9.0.35.tar.gz -C /usr/local/
ln -s /usr/local/apache-tomcat-9.0.35/ /usr/local/tomcat

8、测试jdk
java --version
9、测试tomcat
/usr/local/tomcat/bin/catalina.sh start
10、访问tomcat,默认端口8080,可修改
http://xxx.xxx.xxx.xxx:8080

Linux服务安装-手动安装二进制JDK和tomcat服务

标签:rac   repos   pat   cer   group   默认   tar   xxx   otn   

原文地址:https://blog.51cto.com/iuiely/2498609

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!