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

医疗网站做药品是干嘛/seo网站营销推广

医疗网站做药品是干嘛,seo网站营销推广,html5线上运营网站,自己做网站可以挣钱吗文章目录 前言一、问题记录二、解决过程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.whsansanxincailiao.cn/news/30722844.html

相关文章:

  • 网页升级紧急通知合集/网站优化员seo招聘
  • 网站模板与网站开发/石家庄最新消息
  • 广告公司资质/seo优化课程
  • 视频直播nba的网站/网站推广 方法
  • 株洲百度推广/seo顾问服务四川
  • 东莞著名网站建设企业/营销管理培训课程
  • html5 网站框架/病毒式营销
  • 怎么做网站导航条/seo搜索引擎优化入门
  • 推动高质量发展建议/长沙网站seo公司
  • 武汉专业做网站公司/网图搜索识别
  • 大型网站系统与java中间件实践/百度知道提问首页
  • 做网站怎么设置会员/站长工具官网
  • 做租凭网站是经营性吗/销售人员培训课程有哪些
  • wordpress仿站教程/搜索竞价排名
  • 明年做啥网站致富/网络营销优化
  • 大连网站排名公司/贵港seo
  • 公司注册网站多少钱/关键词搜索量全网查询
  • 蚌埠公司做网站/交换友链要注意什么
  • 专业外贸网站建设公司/新闻头条今日要闻国内新闻最新
  • 个人网站建设简历/杭州网络推广网络优化
  • 大丰有没有做网站/路由优化大师
  • 关于加强建设旅游网站 重庆旅游局/宁波seo外包快速推广
  • 有孩子做的网站/站内推广和站外推广的区别
  • b站推广引流最佳方法/收录优美图片
  • 自己创业做网站/焦作整站优化
  • 大兴网站开发网站建设咨询/网络营销心得体会800字
  • 羽毛球赛事积分/网站关键词排名优化价格
  • 廊坊自助建站设计/网络营销实施方案
  • 电子商务网站建设方案书的总结/域名注册新网
  • 河南网站制作价格/枸橼酸西地那非片