操作系統(tǒng)Centos7
1贞间、備份和修改基礎(chǔ)倉庫到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](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](http://mirrors.aliyun.com/repo/epel-7.repo)
3整以、安裝開發(fā)環(huán)境
yum group list
yum group install Development Tools -y
4峻仇、下載jdk二進(jìn)制軟件包,提供網(wǎng)址:因?yàn)閛racle的jdk下載比較有一點(diǎn)反人類,wget不太好下載凡蚜,提供網(wǎng)址
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](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](https://download.oracle.com/otn-pub/java/jdk/14.0.1+7/664493ef4a6946b186ff29eb326336a2/jdk-14.0.1_linux-x64_bin.tar.gz)
5谱醇、下載tomcat二進(jìn)制軟件包
wget -O /usr/local/src/apache-tomcat-9.0.35.tar.gz [https://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz](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一喘,默認(rèn)端口8080,可修改
http://xxx.xxx.xxx.xxx:8080