1、安装CENTOS7.9
下载CentOS-7-x86_64-DVD-2009.iso镜像文件,用FedoraMediaWriter-win32-latest.exe制作启动U盘,选择basic web server环境。(因为默认的java环境是1.7,需要安装java8,所有只能改称最小化安装,通过rpm -e --nodeps卸载的话会对使许多软件缺少依赖http://www.voidcn.com/article/p-mjnbwvfn-bra.html)
配置网卡参考:
https://www.cnblogs.com/congcongdi/p/10149925.html
安装vim:yum -y install vim*
https://www.cnblogs.com/syncmr/p/10740201.html
1.1 安装java环境
下载oracle官网rpm包https://download.oracle.com/otn/java/jdk/8u281-b09/89d678f2be164786b292527658ca1605/jdk-8u281-linux-x64.rpm
rpm -ivh jdk-8u281-linux-x64.rpm
https://blog.csdn.net/zhengjie19/article/details/49100873
注意补充JRE_HOME
(https://blog.csdn.net/JackNaDa/article/details/102694782)
1.2安装tomcat
下载地址:https://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-9/v9.0.43/bin/apache-tomcat-9.0.43.tar.gz
安装方法还是参考:https://blog.csdn.net/JackNaDa/article/details/102694782
添加开机启动服务
[root@localhost bin]# vim /etc/systemd/system/tomcat.service
给tomcat设置开机自动启动:
[Unit] Description=tomcat-server After=network.target [Service] Type=forking ExecStart=/home/tomcat/apache-tomcat-9.0.43/bin/startup.sh PrivateTmp=true [Install] WantedBy=multi-user.target
systemctl daemon-reload
systemctl start tomcat.service
systemctl enable tomcat.service
安装netstat:yum install net-tools
2、安装Mysql
下载mysql server
https://downloads.mysql.com/archives/community/
wget -c https://cdn.mysql.com/archives/mysql-5.7/mysql-5.7.32-1.el7.x86_64.rpm-bundle.tar
https://www.cnblogs.com/raicho/p/12511998.html
mysql设置root初始密码
use mysql;
update user set authentication_string=password('123456') where user='root';
https://www.jb51.net/article/84146.htm
修改密码:
alter user 'root'@'localhost' identified by 'password';(password是实际的密码,比如123456,但是由于mysql5.7密码策略要求,必须包含大写字母、小写字母,数字和符号)
https://www.cnblogs.com/wtxkui/p/11618505.html
导入sql脚本时遇到的navicat小问题,不选中在每个运行中运行多个查询等选项:
https://zhidao.baidu.com/question/525156367906044565.html
2、安装redis:
下载redis:https://download.redis.io/releases/redis-6.0.10.tar.gz
https://www.cnblogs.com/heqiuyong/p/10463334.html
Centos7升级gcc
https://blog.csdn.net/P_Top/article/details/106143693
3、安装maven:
下载地址:https://mirrors.bfsu.edu.cn/apache/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
安装方法:https://blog.csdn.net/JackNaDa/article/details/102694782
CentOs7安装unzip:yum install -y unzip zip
4.注意:如果无法通过其他终端访问服务器ip:8080,需要设置防火墙开防8080端口:
firewall-cmd --zone=public --add-port=8080/tcp --permanent
firewall-cmd --reload