Go Back   Singapore Web Hosting Talk > LEARNING CENTER > Networking

Networking Networking-related subjects in managing dedicated servers.

Reply
 
Thread Tools
Old 16-10-2003, 09:55   #1
choon
SGWHT Senior Member
 
Join Date: 01-07-2002
Location: Singapore
Posts: 488
choon has a spectacular aura aboutchoon has a spectacular aura about
HOW TO: Change your hostname

Hi everyone,

This is the way I change my Red Hat Linux servers hostname.

As always, I am not responsible for any damages caused. Use this little guide at your own risk!!!

Step 1: Gain root access via SSH to your server.

Step 2: Change the variable of HOSTNAME in the file /etc/sysconfig/network using one of your editor program of your choice such as vi or pico. I will use newname.example.com as an example.
Code:
NETWORKING=yes
HOSTNAME=newname.example.com
GATEWAY=*.*.*.*
Do not change the NETWORKING and GATEWAY variables. You just change the HOSTNAME variable to your preferred new hostname.

Step 3: Editing/Adding hostname in file /etc/hosts. The following is an example:
Code:
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain   localhost
XXX.XXX.XXX.XXX   newname.example.com       newname
where XXX.XXX.XXX.XXX is your main server IP address or you use the IP address to register your newname.example.com at your example.com domain registrar.

Step 4: Restarting syslog.
Code:
/etc/init.d/syslog restart
Step 5: Update your MTA if necessary as for me I am using qmail for most of my managed servers, so got to update those files in qmail and restart qmail.

Hope this helps ;)
__________________
Giam Teck Choon
System Administrator
Join my community today at choon.NET Community to share server related tips and tricks!
External/One-Year WHM/cPanel licenses | Linux/FreeBSD Server Management | Xen VPS Solutions (with/without WHM/cPanel or DirectAdmin)

Last edited by choon; 16-10-2003 at 10:03.
choon is offline   Reply With Quote

Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump




All times are GMT +8. The time now is 13:09.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright (C) 2002-2015 Brought to you by Singapore Web Hosting Talk (SGWHT). All Rights Reserved.