I want to change the hostname e.g. from server1.mydomain.com to server.xyz.com, what would be the best to way to do that without affecting my ISPConfig. Thanks
Change the hostname in /etc/hosts, /etc/hostname, /etc/mailname and postfix main.cf file. Then restart the server.
[root@server1 libs]# cat /etc/hosts 127.0.0.1 localhost.localdomain localhost.localdomain localhost4 localhost4.localdomain4 localhost 10.5.1.61 server1 server1.cdsjordan.com ::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 localhost [root@server1 libs]# cat /etc/hostname cat: /etc/hostname: No such file or directory [root@server1 libs]# cd /etc/ [root@server1 etc]# ls hos* host.conf hosts hosts.allow hosts.deny [root@server1 etc]# cat /etc/mailname cat: /etc/mailname: No such file or directory [root@server1 etc]#
If you use opensuse or centos, then you will have to use the network configuration utilitys of the linux distribution to change the hostname.