To use the /usr/local/cpanel/bin/set_hostname utility, run the following command as the root user:
Code:
/usr/local/cpanel/bin/set_hostname newhostname
When you run this command, the set_hostname utility performs the following actions:
- It updates the hostname in the /etc/sysconfig/network file, and in the kernel.
- It updates the server's Apache configuration.
- It updates the cPanel license.
- It updates cPHulk.
- It restarts MySQL®.
- It rebuilds cPanel & WHM's global cache.
- It updates the FTP, Exim, Dovecot, and cPanel SSL certificates.