当前位置:   article > 正文

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

opvn

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

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

配置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

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/运维做开发/article/detail/943437
推荐阅读
相关标签
  

闽ICP备14008679号