yum install -y httpd
You have enabled checking of packages via GPG keys. This is a good thing
However, you do not have any GPG public keys installed. You need to download
the keys for packages you wish to install and install them.
You can do that by running the command:
rpm --import public.gpg.key
For more information contact your distribution or package provider.
解決方法 導入 gpg.key
用 rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY 導入 一般情況下
GPG KEY,一般系統都會有的,在你的linux安裝光盤目錄下,或者在/etc/pki/rpm-gpg/目錄下有一個RPM-GPG-KEY-redhat-release
如果導入失敗 那么 可已將GPG.KEY路徑直接加入到你編輯的/etc/yum.repos.d/下的rhel7.repo 保存退出
然后 yum clean all
yum list 就ok了
再次試一下安裝 yum install -y httpd
啟動服務systemctl start httpd
查看服務是否開啟 systemctl status httpd
runing'....