PDA

View Full Version : LAMP Hostname problem


innerspace
25th September 2006, 01:10
First off I'm new to howtoforge and am very impressed with the community!

I used http://www.howtoforge.com/perfect_setup_ubuntu_6.06 to setup a LAMP server on an old Optiplex and was pleased as punch with the instructions.

I'm a n00b when it comes to Linux but the tutorial helped me get my system up and running quickly. Unfortunately, I broke the system shortly thereafter (read *n00b!) and decided to reinstall. I upgraded my system drive to one with greater capacity and proceeded to reinstall the OS.

Everything was going fine until I edited /etc/hosts

hostname returns only my localhost (for example foo)
hostname -f returns as expected localhost.localdomain.org (for example foo.bar.org

my hosts file looks like this:

127.0.0.1 localhost.localdomain localhost
192.168.0.X foo.bar.org foo

::1 ip6-localhost ip6-loopback

etc...etc..

What am I doing wrong?

Thanks in advance for any and all suggestions.

till
25th September 2006, 11:28
What is the problem you encounter with the hostname?

innerspace
25th September 2006, 17:43
As I understand hostname, and as the guide I referenced states, both commands should yield the same result from terminal, ie both hostname and hostname -f should output foo.bar.org.

My output doesn't match (see above).

falko
26th September 2006, 18:21
Everything was going fine until I edited /etc/hosts

hostname returns only my localhost (for example foo)
hostname -f returns as expected localhost.localdomain.org (for example foo.bar.org

That's ok, you can go on with the tutorial. :)

innerspace
26th September 2006, 23:36
Thanks for the replies guys.

well I did go on with the tutorial and after installing mysql I set the root password for MySql ok for localhost but when trying to set the password for foo.bar.org it responds with "can't connect to foo.bar.org:xxxx.

Are these problems related?

falko
27th September 2006, 22:04
Have a look here: http://www.howtoforge.com/forums/showthread.php?t=4150&highlight=mysqladmin+server1.example.com
http://www.howtoforge.com/forums/showthread.php?t=4078&highlight=mysqladmin+server1.example.com