Re: [CentOS] hostname changes
How do I change the hostname? In particular, what is the difference between /etc/hosts and /etc/sysconfig/network files? Where should I make the changes? change /etc/sysconfig/netowrk and make the hostname=server.domain.com change localhostnames add the new hostname to the file change etc/hosts xx.xx.xx.xx server.domain.com server restart the computer. You need to do this. Yes, you need to restart/reboot it. then run these commands. (assumes your hostname is mail.example.com) if any of these do not jibe, more to do until you get it right. shell prompt uname -n mail.example.com shell prompt hostname -s mail shell prompt hostname -d example.com shell prompt hostname -f mail.example.com shell prompt hostname mail.example.com Lastly, you need to redo your certifercates for your computer since they (your openssh and maybe some others) are set up for the previous domain. In actual practice you may seldom see any issues with this, but the error messages will appear for some users trying to access different things Also, if you have stuff like logwatch or other system things going to a local mail make sure spamassassin or procmail rules are updated to deal with the change in localhost.localdomain so they are not junked. Always make sure the normal things you are used to are still happening or being received after you change the hostnamemany things can be affected, slightly or more, when doing it. Nothing usually server breaking. This should do you well ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] hostname changes
Tom Brown schrieb: How do I change the hostname? In particular, what is the difference between /etc/hosts and /etc/sysconfig/network files? Where should I make the changes? /etc/hosts has nothing to do with the hostname this is just a way to resolve a name to an IP where DNS is not available or some other badness is going on Umm, no. There is a wierd dependency between /etc/hosts and the full qualified hostname: You can fill in /etc/sysconfig/network your hostname full qualified but 'hostname -f' still returns without domain. Not before you change your hosts file to: 127.0.0.1 host host.fqdn 'hostname -f' comes back wrong. I'm wondering why e.g. the domain in /etc/resolv.conf is ignored... Rainer ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
[CentOS] hostname changes
Howdy, How do I change the hostname? In particular, what is the difference between /etc/hosts and /etc/sysconfig/network files? Where should I make the changes? Thanks, CS. ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] hostname changes
On Mon, Jun 15, 2009 at 7:51 PM, Carlos Santananeu...@gmail.com wrote: Howdy, How do I change the hostname? In particular, what is the difference between /etc/hosts and /etc/sysconfig/network files? Where should I make the changes? Thanks, CS. ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos You should change it in both places, and then run /etc/init.d/network restart to make it effective. /etc/hosts basically tells your own machine on which IP a certain domain resolves to. It's a scaled down DNS server, and normally only used if you only need to maintain a few hosts on a network. /etc/sysconfig/network tells your machine what it's actual hostname is. -- Kind Regards Rudi Ahlers CEO, SoftDux Hosting Web: http://www.SoftDux.com Office: 087 805 9573 Cell: 082 554 7532 ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] hostname changes
All right.. So the /etc/sysconfig/network is the right place for changing hostname. The change in /etc/hosts is to map new hostname with IP address. Thanks, CS. On Mon, Jun 15, 2009 at 12:57 PM, Rudi Ahlers rudiahl...@gmail.com wrote: On Mon, Jun 15, 2009 at 7:51 PM, Carlos Santananeu...@gmail.com wrote: Howdy, How do I change the hostname? In particular, what is the difference between /etc/hosts and /etc/sysconfig/network files? Where should I make the changes? Thanks, CS. ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos You should change it in both places, and then run /etc/init.d/network restart to make it effective. /etc/hosts basically tells your own machine on which IP a certain domain resolves to. It's a scaled down DNS server, and normally only used if you only need to maintain a few hosts on a network. /etc/sysconfig/network tells your machine what it's actual hostname is. -- Kind Regards Rudi Ahlers CEO, SoftDux Hosting Web: http://www.SoftDux.com Office: 087 805 9573 Cell: 082 554 7532 ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] hostname changes
How do I change the hostname? In particular, what is the difference between /etc/hosts and /etc/sysconfig/network files? Where should I make the changes? /etc/hosts has nothing to do with the hostname this is just a way to resolve a name to an IP where DNS is not available or some other badness is going on hostname is set in /etc/sysconfig/network but if you want to change it on the fly you can also echo it into /proc/sys/kernel/hostname ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos