Server Administration & Management

How to add nameservers from shell

Most of the time on cPanel dedicated server we add nameservers from WHM but some time we are not able to access WHM. In that case we can add nameservers from shell by using root login details.

Login in to server as root user and run following commands.

# /scripts/adddns –domain ns1.your_domain.com –ip=X.X.X.X

# /scripts/adddns –domain ns2.your_domain.com –ip=X.X.X.X

You can use your domain name instead of your_domain.com in above command with the respective ips which you want to use for your nameservers.

# /etc/init.d/named restart


December 14, 2011 Posted by | DNS | , | Leave a comment