The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Help! Hostname problem!

Discussion in 'General Discussion' started by cooldude7273, Jan 30, 2005.

  1. cooldude7273

    cooldude7273 Well-Known Member

    Joined:
    Jan 11, 2004
    Messages:
    363
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Roswell, GA
    WHM is telling me that! I am trying to change it, but it won't let me, it just keeps saying that!

    Help! :confused:
     
  2. DigitalN

    DigitalN Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    420
    Likes Received:
    1
    Trophy Points:
    18
    Hello,

    what does

    # hostname

    show?

    If you want to make sure the hostname is set correctly, these are the commands and files you need

    # hostname your.host.com

    Then edit the following , to make sure they are correct.

    /etc/sysconfig/network

    /etc/hosts

    /etc/resolv.conf

    /var/named/your.dns.zone.com.db (add A record for host)

    /usr/local/apache/conf/httpd.conf

    Restart services such as mail and apache if you change the hostname.
     
  3. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Actually, if that is properly quoted, it looks like you have a space at the end of your hostname.
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    DigitalN,

    Would you normally recommend a reboot as well? I usually tend to simply because you are changing the network characteristics of the server. Or, at leaset a restart if /etc/init.d/network?
     
  5. DigitalN

    DigitalN Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    420
    Likes Received:
    1
    Trophy Points:
    18
    Chirpy,
    I usually wouldn't do a reboot - I find that restarting all of the services, such as /etc/init.d/exim restart && /etc/init.d/network restart && /etc/init.d/ipaliases restart && /etc/init.d/named restart && /etc/init.d/httpd graceful and logging out is enough. It won't hurt though to reboot, personal prefs. I value my uptime too much :)
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Thanks for that. I never normally recommend reboots - only for kernels and hostname changes - and I've always been wary about recommending people to restart network from within an SSH session, though I've done it enough times myself.
     
  7. cooldude7273

    cooldude7273 Well-Known Member

    Joined:
    Jan 11, 2004
    Messages:
    363
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Roswell, GA
    I don't really know how to do any of that. Sorry :confused:
     
  8. cooldude7273

    cooldude7273 Well-Known Member

    Joined:
    Jan 11, 2004
    Messages:
    363
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Roswell, GA
    It is, but it just gives me the error message when I go to change it! :confused:
     
  9. BenThomas

    BenThomas Well-Known Member

    Joined:
    Feb 12, 2004
    Messages:
    598
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Houston, Texas USA
    cPanel Access Level:
    Root Administrator
  10. cooldude7273

    cooldude7273 Well-Known Member

    Joined:
    Jan 11, 2004
    Messages:
    363
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Roswell, GA
    Done!

    I really need a quick fix, all my mail is bouncing back because of invalid hostnames and synatx errors!
     
  11. dezignguy

    dezignguy Well-Known Member

    Joined:
    Sep 26, 2004
    Messages:
    534
    Likes Received:
    0
    Trophy Points:
    16
    Just FYI: Paying a competent server admin to help you with things you can't deal with can help ensure that you get things working much faster...

    but if you don't know how to edit simple text files, or use cli/ssh, you really shouldn't be the sole admin of a server.
     
Loading...

Share This Page