1.卸载系统默认安装jdk
# java -version
# rpm -qa|grep openjdk -i
# rpm - e --nodeps 需要删除的软件
2.安装jdk
2.1新建jdk安装目录并解压
# mkdir /usr/java
# cd /usr/
# tar -zxvf jdk-8u191-linux-x64.tar.gz
# mv jdk-8u191/ /usr/java/
2.2配置环境变量
# vim /etc/profile
配置jdk环境变量
export JAVA_HOME=/usr/java/jdk1.8.0_191
export CLASSPATH=.:%JAVA_HOME%/lib/dt.jar:%JAVA_HOME%/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
# source /etc/profile
3.安装tomcat
# tar -zxvf apache-tomcat-9.0.24.tar.gz
# mv apache-tomcat-9.0.24 tomcat-frontend
# mv tomcat-frontend/ /usr/local/
# cd /usr/local/tomcat-frontend/bin
启动tocmcat
# ./start.sh
4.安装MariaDB数据库安装(离线安装)
参考地址:
https://mariadb.com/kb/en/library/mariadb-installation-version-10212-via-rpms-on-centos-7/
https://mirror.mariadb.org/yum/10.4/centos7-amd64/rpms/
4.1 安装mariadb环境需要的依赖
# yum install rsync nmap lsof perl-DBI nc
4.2 安装MariaDB依赖包
# rpm -ivh jemalloc-3.6.0-1.el7.x86_64.rpm
# rpm -ivh jemalloc-devel-3.6.0-1.el7.x86_64.rpm
4.3 查询旧的mariadb并删除
# rpm -qa | grep mariadb-libs
# rmp -ev --nodeps mariadb-libs-5,5,52-1.el7.x86_64
# yum insatll boost-devel.x86_64
# rpm --import http://yum.mariadb.org/RPM-GPG-KEY-MariaDB
4.4 按装libaio
wget http:mirror.centos.org/centos/6/OS/x86_64/Packages/libaio-0.3.107-10.el6.x86_64.rpm
rmp -ivh libaio-0.3.107-10.el6.x86_64.rpm
4.5 安装mariadb自身依赖包
# rpm -ivh MariaDB-common-10.4.8-1.el7.centos.x86_64.rpm MariaDB-compat-10.4.8-1.el7.centos.x86_64.rpm MariaDB-client-10.4.8-1.el7.centos.x86_64.rpm galera-4-26.4.2-1.rhel7.el7.centos.x86_64.rpm MariaDB-server-10.4.8-1.el7.centos.x86_64.rpm
5.Mariadb启动和配置
5.1 启动mariadb数据库
# service mysql start
5.2 配置mariabd数据库
# mysql_seccure_installation
输入当前用户密码,没有则直接按回车
n
y
新的密码:Root.123
y
n
n
y
5.3 root赋予远程链接的权限
mysql -u root -p
grant all privileges on *.* to 'root'@'%' identified by 'Root.123';
flush privileges;
6.SpringBoot多环境部署profile
6.1 application.yml
spring:
profiles:
active: dev
6.2 application-dev.yml