服務器配置:
原因
阿里雲安裝的CentOS 7.3的curl和libcurl的源不是最新的,會導致安全漏洞出現
方法
首先還是要在實例列表遠程連接打開終端。
1、更新ca-bundle
1、備份:
cp /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.crt.bak
2、更新並替換
curl http://curl.haxx.se/ca/cacert.pem -o /etc/pki/tls/certs/ca-bundle.crt
2、添加repo源
1、打開vim創建一個新文件
vim /etc/yum.repos.d/city-fan-for-curl.repo
2、向其中添加內容
[CityFanforCurl]
name=City Fan Repo
baseurl=http://www.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/
enabled=0
gpgcheck=0
然後按ECS鍵退出vim的編輯模式後,按
:wq
保存並退出
3、更新curl
yum update curl --enablerepo=CityFanforCurl -y
完成後可以退出並重新檢查是否還有弱點警報了
代碼完全複製一位老哥的:[向着高亮的地方前行
](https://blog.csdn.net/y532798113/article/details/82804249)