配置openvpn基于证书+密码认证(二)

这里在基于PKI密钥认证在CentOS7.9搭建OpenVPN(一)基础上进行配置

基于PKI密钥认证在CentOS7.9搭建OpenVPN(一)_yjun89的博客-优快云博客

配置openvpn基于证书+密码认证

我们这里基于密码认证使用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

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

yjun89

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值