软件准备
FileZilla
https://www.filezilla.cn/download/client
Xshell
https://www.netsarang.com/zh/xshell-download/
填写邮箱下载链接会发送到你的邮箱
JDK1.8系统和软件位数要对应
https://www.oracle.com/java/technologies/javase-jdk8-downloads.html
Tomcat8
https://tomcat.apache.org/download-80.cgi
jdk
jdk上传opt目录下进行解压执行tar -zxvf (jdk名称)
解压后进入JDK目录输入pwd复制一下路径
复制后在根目录进入etc目录
输入vi profile编辑profile
进入后按i进入编辑模式光标移动到最后输入
JAVA_HOME=(刚才复制的JDK地址)
CLASSPATH=.:
J
A
V
A
H
O
M
E
/
l
i
b
P
A
T
H
=
JAVA_HOME/lib PATH=
JAVAHOME/libPATH=PATH:$JAVA_HOME/bin
export JAVA_HOME CLASSPATH PATH
按Esc后输入:wq!退出
输入source profile更新环境变量
jdk环境到这里配置完成了
mysql
使用yum安装最好换一下yum源不然会很慢下载
https://www.jianshu.com/p/b7cd2f9fb8b7
下载源安装包
wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
安装源
yum -y install mysql57-community-release-el7-10.noarch.rpm
安装MySQL服务
yum -y install mysql-community-server
启动MySQL
systemctl start mysqld
查看MySQL状态
systemctl status mysqld
设置开机启动
systemctl enable mysqld
systemctl daemon-reload
查看默认密码
grep ‘temporary password’ /var/log/mysqld.log
登录MySQL
mysql -uroot -p刚才查看的密码
set password for root@localhost = password(‘想要修改的密码’);
添加远程登录用户
create user ‘用户名’@’%’ identified by ‘密码’;
给与权限
GRANT ALL ON . TO ‘用户名’@’%’
最后让修改生成
FLUSH PRIVILEGES;;
设置默认utf8编码
exit退出
cd /etc
vi my.cnf进入输入i在[mysqld]后加入
character_set_server=utf8
init_connect=‘SET NAMES utf8’
esc键输入:wq退出
systemctl restart mysqld重启一下mysql服务
进入MySQL检查一下设置后的编码
show variables like ‘%character%’;
tomcat
解压Tomcat
进入Tomcat目录下bin输入./startup.sh启动,
ps -ef|grep tomcat查看Tomcat进程,在浏览器输入ip:8080
./shutdown.sh关闭