The/etc/resolv. conf file of RedHat5.5 is rewritten.

Source: Internet
Author: User

In the RedHat5.5 system of the company, after the/etc/resolv. conf file is configured, the network service is restarted and the file content is rewritten. After reading the official Red Hat documents, the following solutions are provided. Https://access.redhat.com/site/solutions/61921

The main cause of the problem is that the networkmanager service is enabled, and I personally think this service takes over the original network settings.

The solution is to configure the networkmanager configuration file.

1. Create a script. Vim/etc/NetworkManager/dispatcher. d/15-resolv

Content:

# Vim/etc/NetworkManager/dispatcher. d/15-resolv

#! /Bin/bash

#

# Description: script to override default resolv. conf file

# With customized file.

Cp-f/etc/resolv. conf. custom/etc/resolv. conf

2. Set File Permissions

# Chmod u + x/etc/NetworkManager/dispatcher. d/15-resolv

3. Create a file vi/etc/resolv. conf. custom

Nameserver xx. xx

Options single-request-reopen

4. Restart the service

Service NetworkManager 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.