Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-18-2005, 01:28 PM
|
#1
|
Member
Registered: Feb 2004
Location: USA
Distribution: Arch
Posts: 30
Rep:
|
changing localhost.localdomain results in error
I am using FC3.
I have one computer running FC3 with static IP and I changed the host.domain to webserver.xcubed
its /etc/hosts file looks like:
127.0.0.1 localhost.localdomain localhost
192.168.1.11 webserver.xcubed webserver
that computer runs fine, it is a samba and webserver and i have no problems with it.
my second FC3 computer i tried setting to server.xcubed, but evertime i change the hostname, ive tried changing it through the GUI, through /etc/HOSTNAME (but i dont know if thats even used in FC3), and through /etc/sysconfig/network and everytime i change it i can no longer run anything, like the terminal wont start, cant get to any websites, i end up booting to RL3 and changing /etc/hosts back to
127.0.0.1 localhost.localdomain localhost
just to get the computer to work right again.
ive made the changes to look like:
127.0.0.1 localhost.localdomain localhost
192.168.1.10 server.xcubed server
which is just like the one on the first computer. except i have the problem with the computer not responding. im using static IP on this computer also. i want to use this computer as a SAMBA server, and i actually am able to, but when i view it from windows it is called localhost (which is why im trying to change that in the first place)
Ive read most of the threads that have anything to do with hostnames, and all ive gotten from them is how to change the hostname, which ive tried, but without success.
heres another bit of info that might help. if i have the terminal running when when i change the hostname.domainname i get an error when i try to do anything from the terminal, like open emacs. here is the error:
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
emacs: Cannot connect to X server :0.0.
Check the DISPLAY environment variable or use `-d'.
Also use the `xhost' program to verify that it is set to permit
connections from your machine.
any help is much appreciated!
thanks
Last edited by DeltaXFX; 06-18-2005 at 08:17 PM.
|
|
|
06-18-2005, 02:28 PM
|
#2
|
Member
Registered: Aug 2003
Location: UK
Distribution: Redhat 9 FC 3 SUSE 9.2 SUSE 9.3 Gentoo 2005.0 Debian Sid
Posts: 657
Rep:
|
DeltaXFX
Quote:
just to get the computer to work right again.
ive made the changes to look like:
127.0.0.1 localhost.localdomain localhost
192.168.1.10 server.xcubed webserver
|
Is this a typo, should'nt it read
127.0.0.1 localhost.localdomain localhost
192.168.1.10 server.xcubed server
Where "xcubed" is your domain name and "server" is your machine name
Also you need to add "server" to /etc/sysconfig/network
HOSTNAME=server
This is from my Redhat 9 days so may be way off mark
Pete
|
|
|
06-18-2005, 02:29 PM
|
#3
|
Senior Member
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188
Rep:
|
set your hostname (/etc/sysconfig/network):
$ cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=host.domain.com
GATEWAY=xx.xx.xx.xx
and set your /etc/hosts like this:
$ cat /etc/hosts
127.0.0.1 host.domain.com host localhost.localdomain localhost
and reboot.
i hope it will help.
good luck
|
|
|
06-18-2005, 08:17 PM
|
#4
|
Member
Registered: Feb 2004
Location: USA
Distribution: Arch
Posts: 30
Original Poster
Rep:
|
maxut-
that was it! thanks so much.
any idea though why it works ok on the first computer with /etc/hosts as:
127.0.0.1 localhost.localdomain localhost
192.168.1.11 webserver.xcubed webserver
and
$ cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=webserver.xcubed
(there is no gateway listed on mine)
but its working now so thats no big deal
|
|
|
06-20-2005, 08:09 AM
|
#5
|
Senior Member
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188
Rep:
|
if u use X, your hostname must be resolved to an ip. and that ip must be assinged to your computer. so 127.0.0.1 is the best option, because loopback is always same. X and other some of network services connect to your computer solving the hostname. also make sure firewall rules don't block network traffic on loopback. it may cause like this troubles too.
as"Pete M" said, u must not do typo mistake
good luck.
|
|
|
All times are GMT -5. The time now is 09:22 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|