赞
踩
基于PKI密钥认证在CentOS7.9搭建OpenVPN(一)_yjun89的博客-CSDN博客
我们这里基于密码认证使用pam认证,需要使用到MySQL,下面下来安装MySQL。
1、安装MySQL:
1.1、安装MySQL的源:
[root@localhost ~]# rpm -Uvh https://repo.mysql.com/mysql57-community-release-el7.rpm Retrieving https://repo.mysql.com/mysql57-community-release-el7.rpm warning: /var/tmp/rpm-tmp.mQKDO8: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY Preparing... ################################# [100%] Updating / installing... 1:mysql57-community-release-el7-11 ################################# [100%] [root@localhost ~]# |
1.2、删除mariadb:
[root@localhost ~]# rpm -e --nodeps `rpm -qa| grep mariadb` |
1.3、安装MySQL 7:
[root@worker02 yum.repos.d]# yum install mysql-community-server mysql-community-devel -y |
报错提示: The GPG keys listed for the "MySQL 5.7 Community Server" repository are already installed but they are not correct for this package. Check that the correct key URLs are configured for this repository. 解决方法: rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 或者安装的时候不校验数字签名: yum -y install mysql-server --nogpgcheck--nogpgcheck |
1.4、启动MySQL,并找出默认密码:
[root@slb1 openvpn-2.5.7]# systemctl start mysqld [root@slb1 openvpn-2.5.7]# grep 'pass' /var/log/mysqld.log 2022-10-31T22:53:22.400570Z 1 [Note] A temporary password is generated for root@localhost: 3rhhd?WE9&uv [root@slb1 openvpn-2.5.7]# |
1.5、连接进入MySQL,修改密码:
[root@slb1 openvpn-2.5.7]# mysql -uroot -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.7.40 Copyright (c) 2000, 2022, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' t |
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。