Centos7 builds JDK/Mysql8/redis/Nginx full set of fool instructions

# *******************安装基础*******************
# 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

# ***************Install Redis************************
gcc -v
yum install -y gcc
rpm -ivh redis-7.0.3-1.el7.remi.x86_64.rpm
# Modify configuration file
vi /etc/redis.conf
daemonize yes
requirepass rds123456 systemctl enable redis # Set auto-start at boot systemctl restart redis
# Restart redis


# ********************Install mysql******************** rpm -e --nodeps mariadb-libs rpm -qa|grep mysql
# Check if there is mysql

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/
# Set startup
systemctl start mysqld
# Set up auto-start at boot
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

# Check the startup status
systemctl status nginx
# Start nginx
systemctl start nginx

# Start automatically at boot
systemctl enable nginx

Guess you like

Origin blog.csdn.net/m0_43432638/article/details/126142259