hostname

Discussion in 'Installation/Configuration' started by madunix, Sep 22, 2011.

  1. madunix

    madunix New Member

    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
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Change the hostname in /etc/hosts, /etc/hostname, /etc/mailname and postfix main.cf file. Then restart the server.
     
  3. madunix

    madunix New Member

    [[email protected] 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
    [[email protected] libs]# cat /etc/hostname
    cat: /etc/hostname: No such file or directory
    [[email protected] libs]# cd /etc/
    [[email protected] etc]# ls hos*
    host.conf hosts hosts.allow hosts.deny
    [[email protected] etc]# cat /etc/mailname
    cat: /etc/mailname: No such file or directory
    [[email protected] etc]#
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    If you use opensuse or centos, then you will have to use the network configuration utilitys of the linux distribution to change the hostname.
     

Share This Page