当前位置: 首页 > news >正文

加强镇政府网站建设的通知营销型网站建设公司

加强镇政府网站建设的通知,营销型网站建设公司,ppt制作软件免费模板,阳泉疫情最新通报今天情况文章目录 配置 yum 源配置网络 yum 源备份下载阿里 centos-base.repo 到 /etc/yum.repos.d/安装 EPEL 源测试安装 配置 yum 源 # 检查是否安装了 yum rpm -qa|grep yum# 查看本地已安装的所有软件包 yum list installed# 查看软件包安装位置 # 查看某个东西的软件包 rpm -qa|g…

文章目录

    • 配置 yum 源
    • 配置网络 yum 源
      • 备份
      • 下载阿里 centos-base.repo 到 /etc/yum.repos.d/
      • 安装 EPEL 源
      • 测试安装

配置 yum 源

# 检查是否安装了 yum
rpm -qa|grep yum# 查看本地已安装的所有软件包
yum list installed# 查看软件包安装位置
# 查看某个东西的软件包
rpm -qa|grep xxx
# 将出现:
ntpdate-4.2.6p5-29.el7.centos.2.x86_64
# 查看路径
rpm -ql ntpdate-4.2.6p5-29.el7.centos.2.x86_64
# 将出现:
/etc/ntp
/etc/ntp/keys
/etc/ntp/step-tickers
/etc/sysconfig/ntpdate
/usr/lib/systemd/system/ntpdate.service
/usr/libexec/ntpdate-wrapper
/usr/sbin/ntpdate
/usr/share/doc/ntpdate-4.2.6p5
/usr/share/doc/ntpdate-4.2.6p5/COPYRIGHT
/usr/share/man/man8/ntpdate.8.gz

配置网络 yum 源

备份

# 切换路径并查看目录下文件
cd /etc/yum.repos.d
ll
# 应该出现
总用量 40
-rw-r--r--. 1 root root 1664 1023 2020 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 1023 2020 CentOS-CR.repo
-rw-r--r--. 1 root root  649 1023 2020 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root  314 1023 2020 CentOS-fasttrack.repo
-rw-r--r--. 1 root root  630 1023 2020 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 1023 2020 CentOS-Sources.repo
-rw-r--r--. 1 root root 8515 1023 2020 CentOS-Vault.repo
-rw-r--r--. 1 root root  616 1023 2020 CentOS-x86_64-kernel.repo# 将所有文件备份到新建文件夹 repo_back 下
# 创建文件夹
mkdir repo_back
# 将所有 .repo 和 .repo.bak 文件移动到 repo_back 下
mv *.repo repo_back/
mv *.repo.bak repo_back/
ll

下载阿里 centos-base.repo 到 /etc/yum.repos.d/

# 下载文件(最后的数字是版本号)
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7
# 或者(recommand)
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repoll
# 应该出现
总用量 4
-rw-r--r--. 1 root root 2523 117 11:25 CentOS-Base.repo
drwxr-xr-x. 2 root root  220 117 11:21 repo_back# 清理缓存
yum clean all
# 应该出现
已加载插件:fastestmirror
正在清理软件源: base extras updates
Cleaning up list of fastest mirrors# 生成新的缓存
yum makecache
# 应该出现
已加载插件:fastestmirror
Determining fastest mirrors* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.comhttp://mirrors.aliyuncs.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#7 - "Failed connect to mirrors.aliyuncs.com:80; 拒绝连接"
正在尝试其它镜像。
http://mirrors.cloud.aliyuncs.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: mirrors.cloud.aliyuncs.com; 未知的错误"
正在尝试其它镜像。
base                                                                          | 3.6 kB  00:00:00     
extras                                                                        | 2.9 kB  00:00:00     
updates                                                                       | 2.9 kB  00:00:00     
(1/10): base/7/x86_64/group_gz                                                | 153 kB  00:00:00     
(2/10): base/7/x86_64/primary_db                                              | 6.1 MB  00:00:08     
(3/10): extras/7/x86_64/filelists_db                                          | 303 kB  00:00:03     
(4/10): extras/7/x86_64/primary_db                                            | 250 kB  00:00:03     
(5/10): extras/7/x86_64/other_db                                              | 150 kB  00:00:00     
(6/10): base/7/x86_64/other_db                                                | 2.6 MB  00:00:07     
(7/10): base/7/x86_64/filelists_db                                            | 7.2 MB  00:00:17     
(8/10): updates/7/x86_64/filelists_ 58% [===============           ] 1.2 MB/s |  32 MB  00:00:18 ETA 
(8/10): updates/7/x86_64/filelists_db                                         |  13 MB  00:00:23     
(9/10): updates/7/x86_64/other_db                                             | 1.4 MB  00:00:02     
(10/10): updates/7/x86_64/primary_db                                          |  24 MB  00:00:33     
元数据缓存已建立

安装 EPEL 源

yum list | grep epel-release
# 应该出现
epel-release.noarch                         7-11                       extras   yum install -y epel-release
# 应该出现
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 epel-release.noarch.0.7-11 将被 安装
--> 解决依赖关系完成依赖关系解决===================================================================================================== Package                     架构                  版本                  源                     大小
=====================================================================================================正在安装:epel-release                noarch                7-11                  extras                 15 k事务概要
=====================================================================================================安装  1 软件包总下载量:15 k
安装大小:24 k
Downloading packages:
epel-release-7-11.noarch.rpm                                                  |  15 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction正在安装    : epel-release-7-11.noarch                                                         1/1 验证中      : epel-release-7-11.noarch                                                         1/1 已安装:epel-release.noarch 0:7-11                                                                         完毕!# 检查是否生成 epel.repo 和 epel-testing.repo!
ll# 清理缓存
yum clean all
# 应该出现
已加载插件:fastestmirror
正在清理软件源: base epel extras updates
Cleaning up list of fastest mirrors# 生成新的缓存
yum makecache
# 应该出现
已加载插件:fastestmirror
Determining fastest mirrors
epel/x86_64/metalink                                                          | 7.6 kB  00:00:00     * base: mirrors.aliyun.com* epel: mirrors.bfsu.edu.cn* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
base                                                                          | 3.6 kB  00:00:00     
https://mirror.01link.hk/epel/7/x86_64/repodata/repomd.xml: [Errno 14] curl#60 - "Peer's Certificate has expired."
正在尝试其它镜像。
It was impossible to connect to the CentOS servers.
This could mean a connectivity issue in your environment, such as the requirement to configure a proxy,
or a transparent proxy that tampers with TLS security, or an incorrect system clock.
You can try to solve this issue by using the instructions on https://wiki.centos.org/yum-errors
If above article doesn't help to resolve this issue please use https://bugs.centos.org/.epel                                                                          | 4.7 kB  00:00:00     
extras                                                                        | 2.9 kB  00:00:00     
updates                                                                       | 2.9 kB  00:00:00     
(1/16): base/7/x86_64/group_gz                                                | 153 kB  00:00:00     
(2/16): base/7/x86_64/primary_db                                              | 6.1 MB  00:00:05     
(3/16): epel/x86_64/group_gz                                                  |  99 kB  00:00:00     
(4/16): epel/x86_64/prestodelta                                               | 2.9 kB  00:00:00     
(5/16): epel/x86_64/primary_db                                                | 7.0 MB  00:00:09     
(6/16): base/7/x86_64/other_db                                                | 2.6 MB  00:00:09     
(7/16): extras/7/x86_64/filelists_db                                          | 303 kB  00:00:00     
(8/16): extras/7/x86_64/primary_db                                            | 250 kB  00:00:00     
(9/16): extras/7/x86_64/other_db                                              | 150 kB  00:00:00     
(10/16): epel/x86_64/updateinfo                                               | 1.0 MB  00:00:17     
(11/16): updates/7/x86_64/filelists_db                                        |  13 MB  00:00:18     
(12/16): updates/7/x86_64/other_db                                            | 1.4 MB  00:00:03     
(13/16): base/7/x86_64/filelists_db 68% [=================-        ] 1.2 MB/s |  53 MB  00:00:19 ETA 
(13/16): epel/x86_64/other_db                                                 | 3.4 MB  00:00:36     
(14/16): updates/7/x86_64/primary_db                                          |  24 MB  00:00:36     
(15/16): epel/x86_64/filelists_db                                             |  12 MB  00:01:00     
(16/16): base/7/x86_64/filelists_db                                           | 7.2 MB  00:02:02     元数据缓存已建立# 检查仓库是否启用!
yum repolist enabled
# 应该出现
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* epel: mirrors.bfsu.edu.cn* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
源标识                          源名称                                                         状态
base/7/x86_64                   CentOS-7 - Base - mirrors.aliyun.com                           10,072epel/x86_64                     Extra Packages for Enterprise Linux 7 - x86_64                 13,791extras/7/x86_64                 CentOS-7 - Extras - mirrors.aliyun.com                            518updates/7/x86_64                CentOS-7 - Updates - mirrors.aliyun.com                         5,367repolist: 29,748# 查看所有仓库!
yum repolist all
# 应该出现
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* epel: mirrors.bfsu.edu.cn* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
源标识                        源名称                                                     状态
base/7/x86_64                 CentOS-7 - Base - mirrors.aliyun.com                       启用: 10,072centosplus/7/x86_64           CentOS-7 - Plus - mirrors.aliyun.com                       禁用
contrib/7/x86_64              CentOS-7 - Contrib - mirrors.aliyun.com                    禁用
epel/x86_64                   Extra Packages for Enterprise Linux 7 - x86_64             启用: 13,791epel-debuginfo/x86_64         Extra Packages for Enterprise Linux 7 - x86_64 - Debug     禁用
epel-source/x86_64            Extra Packages for Enterprise Linux 7 - x86_64 - Source    禁用
epel-testing/x86_64           Extra Packages for Enterprise Linux 7 - Testing - x86_64   禁用
epel-testing-debuginfo/x86_64 Extra Packages for Enterprise Linux 7 - Testing - x86_64 - 禁用
epel-testing-source/x86_64    Extra Packages for Enterprise Linux 7 - Testing - x86_64 - 禁用
extras/7/x86_64               CentOS-7 - Extras - mirrors.aliyun.com                     启用:    518updates/7/x86_64              CentOS-7 - Updates - mirrors.aliyun.com                    启用:  5,367repolist: 29,748

测试安装

# 下载
yum install -y httpd
# 卸载
yum erase httpd -y
http://www.hkea.cn/news/956949/

相关文章:

  • 河北省香河县建设局网站中国互联网协会
  • 北京丰台区网站建设游戏推广赚佣金的平台
  • 网站没排名怎么办搜索引擎广告优化
  • wordpress内容主题模板网络网站推广选择乐云seo
  • 电子元器件商城网站建设百度开户怎么开
  • 企业网站开发基本流程百度博客收录提交入口
  • 甘特图模板关于网站建设微信营销模式
  • 网站建设的swot分析长尾关键词挖掘精灵
  • 发布自己的做家教的网站网店运营推广登录入口
  • b s网站系统如何做性能测试百度推广运营怎么做
  • 洛阳seo外包公司费用seo的中文意思
  • 政府网站建设遵循的原则seo网站内容优化
  • java做网站具体步骤邵阳seo优化
  • 自己做的网站如何放进服务器今天今日头条新闻
  • 男装网站的网站建设背景惠州seo按天计费
  • 如何快速提高网站排名互联网项目推广
  • icp备案网站名称更改成都网站设计
  • 企业网站建设需求分析seo排名资源
  • python基础教程雪峰东莞搜索seo网站关键词优化
  • b2b网站开发供应商小程序开发教程全集免费
  • 用自己的手机做网站外链网站是什么
  • 市场调研公司介绍网站推广优化公司
  • 玉溪人民政府网站建设现状新网站seo
  • 湖南餐饮网站建设2023北京封控了
  • 重庆网站设计人员外贸网站搭建推广
  • 局域网内的网站建设西安网站建设公司排名
  • 普通网站报价多少中南建设集团有限公司
  • 蚌埠做网站哪家好全网营销国际系统
  • 沈阳市网站制作谷歌香港google搜索引擎入口
  • 做美食网站的背景高端网站建设制作