(本文前提:已经安装Linux系统)
一. 安装配置JDK8
安装步骤:
- mkdir /opt/jdk,新建目录
- 通过xftp6,将jdk8压缩包,上传到/opt/jdk目录下
- cd /opt/jdk
- 解压 tar -zxvf jdk-8uxxx.tar.gz
- mkdir /usr/local/java,新建jdk安装目录
- mv /opt/jdk/jdk1.8xxx /usr/local/java,移动jdk8文件夹
- vim /etc/profile,配置环境变量,在文件内容最后输入步骤8和9两句
- export JAVA_HOME=/usr/local/java/jdk1.8xxx
- export PATH= $ JAVA_HOME/bin:$ PATH
- source /etc/profile, 让新的配置文件生效
- 最后javac -version、java -verison测试一下安装结果
二. 安装配置tomcat8
安装步骤:
- mkdir /opt/tomcat,新建目录
- 通过xftp6,将tomcat8压缩包,上传到/opt/tomcat目录下
- cd /opt/tomcat
- 解压 tar -zxvf apache-tomcat-8.5.71.tar.gz
- mkdir /usr/local/tomcat,新建tomcat安装目录
- mv /opt/tomcat/apache-tomcat-8.5.71 /usr/local/tomcat,移动apache-tomcat-8.5.71文件夹
- vim /etc/profile,配置环境变量,增加步骤8、9两句
- export CATALINA_HOME=/usr/local/tomcat/apache-tomcat-8.5.71
- export PATH= J A V A H O M E / b i n : JAVA_HOME/bin: JAVAHOME/bin:PATH:$CATALINA_HOME/bin
- source /etc/profile, 让新的配置文件生效
- 进入目录/usr/local/tomcat/apache-tomcat-8.5.71/bin,用命令startup.sh,启动tomcat
- 输入ip:8080,测试结果
三. 安装配置idea2020
安装步骤:
- mkdir /opt/idea,新建目录
- 通过xftp6,将idea2020压缩包,上传到/opt/idea目录下
- cd /opt/idea
- 解压 tar -zxvf ideaIU-2020.2.3.tar.gz
- mkdir /usr/local/idea,新建idea安装目录
- mv /opt/idea/idea-IU-202.7660.26 /usr/local/idea,移动idea-IU-202.7660.26文件夹
- 进入到目录/usr/local/idea/idea-IU-202.7660.26/bin,然后执行./idea.sh,启动idea
- 写个程序测试一下结果
四. 安装配置mysql5.7
安装步骤:
- mkdir /opt/mysql5.7,新建目录
- 通过xftp6,将mysql5.7压缩包,上传到/opt/mysql5.7目录下
- cd /opt/mysql5.7
- 解压 tar -xvf mysql-5.7.35-1.el7.x86_64.rpm-bundle.tar
- 使用指令rpm -qa | grep mari,查询是否自带有mariadb数据库安装包,有则卸载
- 卸载mariadb,执行指令rpm -e --nodeps mariadb-libs
- mkdir /usr/local/mysql,新建mysql安装目录
- mv /opt/mysql5.7 /usr/local/mysql,移动mysql5.7文件夹
- 进入目录/usr/local/mysql/mysql5.7/
- 依次执行下面的几条安装指令:
rpm -ivh mysql-community-common-5.7.35-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-5.7.35-1.el7.x86_64.rpm
rpm -ivh mysql-community-client-5.7.35-1.el7.x86_64.rpm
rpm -ivh mysql-community-server-5.7.35-1.el7.x86_64.rpm - 执行systemctl start mysqld.service,启动mysql
- 设置mysql的root用户密码,先用指令grep “password” /var/log/mysqld.log查看当前密码
- 执行mysql -u root -p,用上一个密码登入
- 设置新的密码,执行命令set password for ‘root’@‘localhost’=password(‘个人指定密码’);
- 执行flush privileges;,使新密码生效