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

影视网站源码下载做网站哪个语言好

影视网站源码下载,做网站哪个语言好,网页设计实训总结报告大全,中国各大网站排名文章目录 前言一、问题记录二、解决过程1.修改DNS无效2.指定镜像源 总结 前言 今天有一个项目现场要在一个远程centos服务器上部署产品服务,发现能ping通百度,但是无法yum install 安装基础软件包,开始以为DNS服务器的问题,结果配…

文章目录

  • 前言
  • 一、问题记录
  • 二、解决过程
    • 1.修改DNS无效
    • 2.指定镜像源
  • 总结


前言

今天有一个项目现场要在一个远程centos服务器上部署产品服务,发现能ping通百度,但是无法yum install 安装基础软件包,开始以为DNS服务器的问题,结果配置了也不行,最后通过指定镜像源的方式解决,解决过程记录下,方便后面遇到相同的问题快速解决。


一、问题记录

问题如下,能ping通百度,但是无法yum install :

[root@localhost ~]# ping www.baidu.com
PING www.a.shifen.com (223.109.82.16) 56(84) bytes of data.
64 bytes from 223.109.82.16 (223.109.82.16): icmp_seq=1 ttl=52 time=13.6 ms
64 bytes from 223.109.82.16 (223.109.82.16): icmp_seq=2 ttl=52 time=13.6 ms
64 bytes from 223.109.82.16 (223.109.82.16): icmp_seq=3 ttl=52 time=13.0 ms
64 bytes from 223.109.82.16 (223.109.82.16): icmp_seq=4 ttl=52 time=15.5 ms
^C
--- www.a.shifen.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3002ms
rtt min/avg/max/mdev = 13.046/13.991/15.574/0.956 ms
[root@localhost ~]# yum install net-tools -y
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"One of the configured repositories failed (未知),and yum doesn't have enough cached data to continue. At this point the onlysafe thing yum can do is fail. There are a few ways to work "fix" this:1. Contact the upstream for the repository and get them to fix the problem.2. Reconfigure the baseurl/etc. for the repository, to point to a workingupstream. This is most often useful if you are using a newerdistribution release than is supported by the repository (and thepackages for the previous distribution release still work).3. Run the command with the repository temporarily disabledyum --disablerepo=<repoid> ...4. Disable the repository permanently, so yum won't use it by default. Yumwill then just ignore the repository until you permanently enable itagain or use --enablerepo for temporary usage:yum-config-manager --disable <repoid>orsubscription-manager repos --disable=<repoid>5. Configure the failing repository to be skipped, if it is unavailable.Note that yum will try to contact the repo. when it runs most commands,so will have to try and fail each time (and thus. yum will be be muchslower). If it is a very temporary problem though, this is often a nicecompromise:yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=trueCannot find a valid baseurl for repo: base/7/x86_64

二、解决过程

1.修改DNS无效

vi /etc/resolv.conf:
添加公共 DNS 服务器地址:
nameserver 8.8.8.8

[root@localhost ~]# vi /etc/resolv.conf 
[root@localhost ~]# ping mirrorlist.centos.org
ping: mirrorlist.centos.org: 未知的名称或服务
[root@localhost ~]# cat /etc/resolv.conf 
# Generated by NetworkManager
#nameserver 192.168.1.1
nameserver 8.8.8.8
[root@localhost ~]# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=53 time=46.0 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=53 time=46.2 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=53 time=45.9 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=53 time=46.1 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=53 time=48.9 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=53 time=46.1 ms
^C
--- 8.8.8.8 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5005ms
rtt min/avg/max/mdev = 45.925/46.569/48.998/1.125 ms
[root@localhost ~]# nslookup mirrorlist.centos.org 8.8.8.8
-bash: nslookup: 未找到命令
[root@localhost ~]# yum install bind-utils
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock error was
14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误"

可以看到在该环境下添加公共 DNS 服务器地址,虽然能ping通8.8.8.8,但是仍然解决不了在线yum install 安装工具的问题。

2.指定镜像源

由于无法解析 mirrorlist.centos.org,可以直接指定一个可用的镜像源。先备份原来的 CentOS-Base.repo 文件:

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

接着从阿里云下载新的 CentOS-Base.repo 文件:

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

此处如果简单的用wget 命令也会无法执行:

[root@localhost yum.repos.d]# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
-bash: wget: 未找到命令
[root@localhost yum.repos.d]# yum install wget
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
There are no enabled repos.Run "yum repolist all" to see the repos you have.To enable Red Hat Subscription Management repositories:subscription-manager repos --enable <repo>To enable custom repositories:yum-config-manager --enable <repo>
[root@localhost yum.repos.d]# ls

直接从windows机器上下载了一个Centos-7.repo,然后放到/etc/yum.repos.d/目录下
在这里插入图片描述

[root@localhost yum.repos.d]# ls -l
总用量 36
-rw-r--r--. 1 root root 2523 414 16:28 Centos-7.repo
-rw-r--r--. 1 root root 1664 1123 2018 CentOS-Base.repo.backup
-rw-r--r--. 1 root root 1309 1123 2018 CentOS-CR.repo
-rw-r--r--. 1 root root  649 1123 2018 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root  314 1123 2018 CentOS-fasttrack.repo
-rw-r--r--. 1 root root  630 1123 2018 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 1123 2018 CentOS-Sources.repo
-rw-r--r--. 1 root root 5701 1123 2018 CentOS-Vault.repo

更新缓存:

yum clean all
yum makecache

再次尝试安装:

[root@localhost yum.repos.d]# yum install net-tools -y
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 net-tools.x86_64.0.2.0-0.25.20131004git.el7 将被 安装
--> 解决依赖关系完成依赖关系解决==============================================================================================================================================================================================================================================================================Package                                                         架构                                                         版本                                                                           源                                                          大小
==============================================================================================================================================================================================================================================================================
正在安装:net-tools                                                       x86_64                                                       2.0-0.25.20131004git.el7                                                       base                                                       306 k事务概要
==============================================================================================================================================================================================================================================================================
安装  1 软件包总下载量:306 k
安装大小:917 k
Downloading packages:
警告:/var/cache/yum/x86_64/7/base/packages/net-tools-2.0-0.25.20131004git.el7.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY                                                                                               ]  0.0 B/s |    0 B  --:--:-- ETA 
net-tools-2.0-0.25.20131004git.el7.x86_64.rpm 的公钥尚未安装
net-tools-2.0-0.25.20131004git.el7.x86_64.rpm                                                                                                                                                                                                          | 306 kB  00:00:00     
从 http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7 检索密钥
导入 GPG key 0xF4A80EB5:用户ID     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"指纹       : 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5来自       : http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction正在安装    : net-tools-2.0-0.25.20131004git.el7.x86_64                                                                                                                                                                                                                 1/1 验证中      : net-tools-2.0-0.25.20131004git.el7.x86_64                                                                                                                                                                                                                 1/1 已安装:net-tools.x86_64 0:2.0-0.25.20131004git.el7                                                                                                                                                                                                                                 完毕!

问题解决!


总结

这就是今天的一次问题解决,虽然是小问题,但是每次记录下,供下次出现问题时参考,能省不少时间,以前解决过很多的问题,当时觉得很清楚,觉得没什么好记录的,但时间长了又忘了,所以不管问题大小,及时总结记录是一个很好的习惯,集少成多。

http://www.dtcms.com/wzjs/800353.html

相关文章:

  • 房子装修设计app肇庆seo外包服务
  • 乌云网是个什么网站淘宝店铺装修免费模板
  • 全球购物网站大全wordpress 关键词过滤
  • 十大网站黄页的免费wordpress 收款
  • 青岛谁家做网站网站建设公司广告词
  • 如何在自己电脑上建网站wordpress注册代码
  • 万网买的网站备案吗活动策划书模板
  • 焦作企业网站建设网站做管制户外刀具
  • html网页制作软件有哪些优化网站内容
  • 开发wap网站 转响应式网站开发方案
  • 河间网站网站建设如何选择家居网站建设
  • 网站免费主机百度一下官方下载安装
  • 网站开发后端论文哪个网站适合 做红本抵押
  • 企业网站设计建设wordpress woz 下载
  • net域名做网站怎么样在线设计logo软件
  • 初中上哪个网站找题做中国最新消息新冠疫苗最新消息
  • 互联网基础知识入门吕梁seo排名
  • 一流导航设计网站百度网站怎么做视频播放器
  • 爱站长尾词wordpress page内容
  • 西安网站开发公司哪家好云端互联网站建设
  • 移动网站建设电子拜年贺卡在线制作网站
  • 徐州网站建设要多少钱网站开发前端如何开发
  • 优秀网站菜单网站开发实训心得800字
  • 团购网站开发语言湛江网站定制
  • 怎么新增网站推广怎样进行公司网站建设
  • 网站制作设计专业公司网站的ico怎么做
  • 安徽网站建设认准-晨飞网络怎么找到采购联系方式
  • 中文搜索引擎网站3天引流800个人技巧
  • 徐州建站程序wordpress调用多个标签
  • 网站优化排名哪家好山东省双体系建设网站