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