Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to install zimbra on a linux server. I downloaded the Ubuntu 12.04 LTS version of zimbra, unpacked and tried to run install.sh. But after I have approved the license I get this problem.

ERROR: Installation can not proceeed. Please fix your /etc/hosts file to contain:

127.0.0.1 localhost.localdomain localhost

Zimbra install grants mysql permissions only to localhost and
localhost.localdomain users. But Fedora/RH installs leave lines such as these in /etc/hosts:

127.0.0.1 myhost.mydomain.com myhost localhost.localdomain localhost

This causes MySQL to reject users coming from 127.0.0.1 as users from myhost.mydomain.com. You can read more details at:

http://bugs.mysql.com/bug.php?id=11822

The hosts file now looks like this.

127.0.1.1   localhost.localdomain   localhost
127.0.1.1   linux-server-test   localhost
127.0.1.1   mail.mydomain.com   mail

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

I Change it to this

127.0.0.1   localhost.localdomain   localhost
127.0.0.1   linux-server-test   localhost
127.0.0.1   mail.mydomain.com   mail

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

I then run the script again and this time i get this problem.

ERROR: Installation can not proceeed. Please fix your /etc/hosts file to contain:

ip FQHN HN

Where is the ip address of the host, is the FULLY QUALIFIED host name, and is the (optional) hostname-only portion

I try a last time and remove the lines about localhost and linux-server-test yet the same result. I have config the dns to be able to handle email so that should not be a problem.

dig mydomain.com mx

; <<>> DiG 9.9.2-P1 <<>> mydomain.com mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15967
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;mydomain.com.      IN  MX

;; ANSWER SECTION:
mydomain.com.   600 IN  MX  30 mail.mydomain.com.

;; Query time: 17 msec
;; SERVER: 127.0.1.1#53(127.0.1.1)
;; WHEN: Mon Aug 12 16:08:17 2013
;; MSG SIZE  rcvd: 66

So what I'm i doing wrong? (I Replaced all the domain entries in this post to mydomain.com instead of my real domain)

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

Use a dedicated line to define your FQDN.

192.168.10.9     mail.mydomain.com mail

Remove it from the 127.0.0.1 line.

share|improve this answer
    
Did you check the host files i posted, used I hade a dedicated line for the domain. –  Frozendragon Aug 12 '13 at 15:00
    
Host files are read top-to-bottom, and I know your mail server's IP address is not 127.0.0.1. Change the 127.0.0.1 on the FQDN line to the server's real IP address. –  ewwhite Aug 12 '13 at 15:04
    
I tried that both the external ip and the ip inside of the local network got the the same error as i posted. (the second) –  Frozendragon Aug 12 '13 at 15:06
1  
No. You didn't :) Sorry. –  GioMac Aug 12 '13 at 16:08
add comment

In all of your examples you are showing an IP of 127.x.x.x. You need to use a real IP. Here's what my hosts file looks like:

[root@zimbra ~]# cat /etc/hosts
1.2.3.4 zimbra.mydomain.com zimbra
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.