Take the NTP and DNS servers running SUSE as an example.
sudo su -
vim /etc/ntp.conf
server Domain name or IP address of the NTP server
Example:
If the IP address of the NTP server is 192.168.56.1, add the following statement:
server 192.168.56.1
If you want to disable NTP, perform the following steps:
sudo su -
vi /etc/resolv.conf
nameserver = IP addresses of the DNS servers
Example:
If the IP addresses of the DNS servers are 8.8.8.8 and 4.4.4.4, add the following statements:
nameserver = 8.8.8.8
nameserver = 4.4.4.4
The IP addresses of the DNS servers must be the same as those in the VPC subnet. Otherwise, the DNS modification cannot persistently take effect.
service network restart
/etc/init.d/network restart
Take an ECS running Windows Server 2012 as an example.
net stop w32time
net start w32time