学习制作自动化脚本

在制作自动化脚本时,避免不了基础环境的差异。为了减少出错的概率,应该需要更换软件源,保证环境的一致,保证安装的正确进行。

删除原来的软件源,用我提供的

rm -f /etc/yum.repos.d/*
\cp -f ./yum.repos.d/centos-163.repo /etc/yum.repos.d/

但在 yum install mysql-server 时,出错

GPG key retrieval failed: [Errno 14] curl#37 - “Couldn’t open file /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql”


```bash
/etc/pki/rpm-gpg
-rw-r--r--. 1 root root  1690 Nov 23  2018 RPM-GPG-KEY-CentOS-7
-rw-r--r--. 1 root root  1004 Nov 23  2018 RPM-GPG-KEY-CentOS-Debug-7
-rw-r--r--. 1 root root  1690 Nov 23  2018 RPM-GPG-KEY-CentOS-Testing-7
-rw-r--r--. 1 root root  1662 Oct  2  2017 RPM-GPG-KEY-EPEL-7
-rw-r--r--. 1 root root  1662 Jun 20  2014 RPM-GPG-KEY-EPEL-7.1
-rw-r--r--. 1 root root  1370 Jun 19  2015 RPM-GPG-KEY-FREESWIT

少了这个,RPM-GPG-KEY-mysql

你可能感兴趣的:(freeswitch)