Workaround for failure after resolv.conf file restart

Source: Internet
Author: User

Problem Description: when I use Yum to install the software, I am prompted to find the domain name, it should be the DNS setting problem, add nameserver 8.8.8.8 this line in/etc/resolv.conf, when using Yum again, the software can be installed normally, but after restarting the server, The resolv.conf file fails and becomes the same.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/6C/5B/wKiom1VHKrrAKh74AAJxarBGBPs052.jpg "title=" QQ picture 20150504161301.png "Width=" "height=" 441 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:600px;height:441px; " alt= "Wkiom1vhkrrakh74aajxarbgbps052.jpg"/>

Workaround: find the network card configuration file, add dns1=8.8.8.8 in the configuration file, restart the network service, you can. I use the redhat6.5 version, using the first network card, network card configuration file path is/etc/sysconfig/network-scripts/ifcfg-eth0, open this file modification can:

Vim/etc/sysconfig/network-scripts/ifcfg-eth0

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6C/57/wKioL1VHLNLgZFmRAAC1ZuHh2R0387.jpg "title=" QQ picture 20150504161405.png "Width=" "height=" 222 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" width:600px;height:222px; " alt= "Wkiol1vhlnlgzfmraac1zuhh2r0387.jpg"/>

Restart after modification

Service Network restart

Summary : In fact, this problem occurs, is because their network configuration is not done, if directly in the network configuration when writing this content, there will be no unresolved problems, and will not be restarted after the failure of the problem, because in the network card configuration file write dns1= 8.8.8.8 such content, resolv.conf This file content will change, as follows:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/6C/57/wKioL1VHLe-AsIn1AACiEYGlpUo583.jpg "title=" QQ picture 20150504162254.png "Width=" "height=" 349 "border=" 0 "hspace=" 0 "vspace=" 0 "style=" WIDTH:600PX;HEIGHT:349PX; " alt= "Wkiol1vhle-asin1aacieyglpuo583.jpg"/>

Workaround for failure after resolv.conf file restart

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.