# *******************安装基础*******************
# rpm -ivh jdk-8u202-linux-x64.rpm
# rpm -ivh tools/net-tools-*.rpm
# rpm -ivh ntp/*.rpm
# ntpdate ntp1.aliyun.com
# hwclock -w
# rpm -ivh perl/perl-*.rpm
# rpm -ivh telnet-0.17-66.el7.x86_64.rpm
# ***************安装Redis********************
gcc -v
yum install -y gcc
rpm -ivh redis-7.0.3-1.el7.remi.x86_64.rpm
# 修改配置文件
vi /etc/redis.conf
daemonize yes
requirepass rds123456
# 重启redis
systemctl restart redis
# 设置开机自启
systemctl enable redis
# ********************安装mysql********************
# 坚检查是否有mysql
rpm -qa|grep mysql
rpm -e --nodeps mariadb-libs
cd mysql-8.0.29/
rpm -ivh mysql-community-common-8.0.29-1.el7.x86_64.rpm
rpm -ivh mysql-community-libs-8.0.29-1.el7.x86_64.rpm --force --nodeps
rpm -ivh mysql-community-client-8.0.29-1.el7.x86_64.rpm --force --nodeps
rpm -ivh mysql-community-server-8.0.29-1.el7.x86_64.rpm --force --nodeps
chown -R mysql:mysql /var/lib/mysql/
# 设置启动
systemctl start mysqld
# 设置开机自启
systemctl enable mysqld
cat /var/log/mysqld.log | grep password
# 记录 A temporary password is generated for root@localhost: **********
# 设置密码
alter user 'root'@'localhost' identified by 'bamBo0@Passw0rd';
CREATE DATABASE pkidb DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
# 外部访问设置
use mysql;
update user set host='%' where user ='root';
flush privileges;
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%'WITH GRANT OPTION;
# 开放端口
firewall-cmd --permanent --add-port=3306/tcp
firewall-cmd --reload
# *********************安装Nginx************************
rpm -ivh nginx-1.20.0-1.el7.ngx.x86_64.rpm
# 查看启动状态
systemctl status nginx
# 开启nginx
systemctl start nginx
# 开机自启
systemctl enable nginx