Changing Domain Name Servers (DNS) and Host Names on an SL1 Appliance

Download this manual as a PDF file

This section describes how to change domain name servers (DNS) and hostnames on an SL1 appliance.

Use the following menu options to navigate the SL1 user interface:

  • To view a pop-out list of menu options, click the menu icon ().
  • To view a page containing all of the menu options, click the Advanced menu icon ().

Changing Name Servers on an SL1 Appliance

SL1 appliances include a local Domain Name Server (DNS) cache to improve performance. You can use the /etc/dnsmasq-resolv.conf file to change the DNS server information.

You do not need to edit the /etc/resolv.conf file, which should have a single entry of nameserver 127.0.0.1.

If you are running SL1 on a cloud-based service like AWS or Azure, the following change procedures do not apply. The DNS settings are provided automatically by DHCP, and configuration changes must be made in the DHCP provider’s settings.

To update the name servers on an SL1 appliance:

  1. Edit the /etc/dnsmasq-resolv.conf file by entering the following command:

    sudo vi /etc/dnsmasq-resolv.conf

  2. Change the nameserver entry in the file to the IP address of the new DNS or add new DNS entries to the file.

  3. Save and quit to commit the changes. This change immediately causes the OS to use the new DNS, with no reboot or service restarts required. If you have multiple nameservers listed in the file, the system will try each entry in the list until it gets a response or runs out of nameservers.

Changing Hostnames on an SL1 Appliance

To change hostnames on an SL1 appliance:

  1. Either go to the console of the SL1 appliance or use SSH to access the server.

  2. Set the hostname by running the following command:

    sudo hostnamectl set-hostname <host.example.com>

  3. Verify that the hostname was set:

    hostnamectl 
    
     hostnamectl
       Static hostname: host.example.com
             Icon name: computer-vm
               Chassis: vm
            Machine ID: 59013338cba643ec8ed2ec9883dfddf4
               Boot ID: dde124fbc75c484ea7d71443277af659
        Virtualization: vmware
      Operating System: Oracle Linux Server 7.9
           CPE OS Name: cpe:/o:oracle:linux:7:9:server
                Kernel: Linux 3.10.0-1160.36.2.el7.x86_64
          Architecture: x86-64

    The em7 service will notice this change and update the Appliances page (System > Settings > Appliances) in a few minutes.

  4. Edit the /etc/hosts file to replace the old hostname with the new one:

    sudo vi /etc/hosts

  5. Restart the mysql service to update the database @@hostname, which is how the command-line Message of the Day (MOTB) pulls the active Database Server:

    sudo systemctl restart mysql

  6. You can also restart the task manager service to get the changes picked up more quickly:

    sudo systemctl restart em7.service