Page 1 of 1

guide: installing on CentOS 5

Posted: Sun Dec 02, 2007 4:49 am
by bizna
This is a guide I have on my site: Guide for Installing Scalix on CentOs 5 with Internal DNS. Since these forums were such a good reference, I think it would be only fair to return that favor. Thank you all!

This is a beginners admin guide / manual, but it still assumes that you would know how to work in a GNU/Linux environment. After all, you ARE installing a server on a GNU/Linux machine, aren't you?

Now, to the guide itself. We will be working on a domain called centos5.com for our examples. There is a real domain by this name, and it is not related to this guide.

Important: almost all network changes can be made through the system-config-network-tui or the system-config-network-gui tools.

Network Basic Settings

The first and most important thing that you need to remember, is to change your machine name to the name of domain that you intend to use. This is done by editing the file /etc/sysconfig/network and changing the HOSTNAME value to your own domain name. I.E., instead of localhost.localdomain you should have centos5.com or whatever domain name that you use. There is a world of trouble that awaits those who fail to remember that.

Secondly, add your domain name to the file /etc/hosts right after the loopback device (I.E., after 127.0.0.1). It should look like this:

Code: Select all

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain   localhost
192.168.1.5   centos5.com     centos5


You need to replace the 192.168.1.5 to your own local IP address.

Please, oh pretty please: it is best to change your network settings from DHCP to static IP address. This can be done through the setup command. After you make this change, restart the networking services by typing service network restart.

It is advised that after all these steps, you restart your machine. Although there are other ways to apply these changes, it is best that you restart. Besides, you are probably working on a non-production server, otherwise you wouldn't be reading this guide.

Network DNS Settings

This part is for those who wish to have internal domain and IP referrals inside their machines.

What does it mean? Well, it means that before your server starts looking for an external DNS server, it will look at its internal DNS server, and will resolve to the IP addresses that you supply to it.

Edit the file /etc/resolv.conf and add to it the next 1st line:

Code: Select all

nameserver 192.168.1.5

Edit the file /var/named/chroot/etc/named.conf to make it look this way:

Code: Select all

 zone "centos5.com" {
  type master;
  file "/var/named/centos5.com.zone";
};

Pay a close attention to the location of the centos5.com.zone file. We will not be using this location, but this the correct line to enter in the file. The reason that we will be using a different location, has to do with default chrooting in the CentOS server. If you didn't understand what I just said, it really doesn't matter.

Now you need to create the following file /var/named/chroot/var/named/centos5.com.zone and this will be our zone file.

The contents of the zone file should look something like this (whatever comes after the ; are comments):

Code: Select all

$ORIGIN centos5.com.
$TTL 86400
@     IN     SOA    centos5.com.     administrator.centos5.com. (
                    2001062501 ; serial
                    518400      ; refresh after 6 days
                    3600       ; retry after 1 hour
                    604800     ; expire after 1 week
                    86400 )    ; minimum TTL of 1 day

      IN     NS     centos5.com.

      IN     MX     10     mail.centos5.com. ; this is the line for the mail MX records

             IN     A       192.168.1.5
server1      IN     A       192.168.1.5
server2      IN     A       192.168.1.22

ftp          IN     CNAME   server2 ; this will cause ftp.centos5.com to resolve go to 192.168.1.22
mail         IN     CNAME   server1 ; this will cause mail.centos5.com to resolve to 192.168.1.5
www          IN     CNAME   server1 ; this will cause www.centos5.com to resolve to 192.168.1.5

Network Firewall Settings

There is a very easy-to-use tool that comes with CentOS for configuring the firewall. It has 2 versions: the system-config-securitylevel-tui for the textual CLI environment (CLI = Command Line Interface), and the system-config-securitylevel for the graphical environment. These tools are warmly recommended as configuration tools for iptables, with great ease.

Recommended settings:

Security Level: Enabled

SELinux: Disabled

Inside the Customize option of the CLI, and in the Firewall Options tab in the GUI:

Allow incoming: SSH, WWW (HTTP), Secure WWW (HTTPS), Mail (SMTP)

Other ports: 5900:tcp openmail:tcp imap:tcp

Regarding port 5900: this is the default port for VNC connections. Each VNC server receives its own port, so if you plan on opening a server in :3 you will need to open port 5903:tcp instead.

Scalix Installation and Usage

I can not believe that I'm writing this down: do not use the textual installer. Login to your server using VNC, and install Scalix with the graphic installer. The reason is, that the textual installer, for some reason, creates a postgresql problem installing Scalix. In simpler words: the textual installer will not install.

Download the Scalix Community Edition from this link. You need to enter an Email address, and then you are directed to the download page. If you intend to use Scalix with MS Outlook, then this is also where the Outlook Connector is.

Extract the files from the scalix-11.2.0-GA-core-rhel5-intel.tgz file, and from the new scalix-11.2.0-GA folder, activate the following command:

Code: Select all

./scalix-installer --override=rhel5

After installing Scalix, go to http://192.168.1.5/sac/ to the administrator console, and setup users and the server.

In http://192.168.1.5/webmail/ you will find the Scalix web interface.

And that's it! You now have an Exchange server, good for 25 Premium users, with a fully functional web access, Calendar sharing, Email and webmail, and all other good stuff.

Enjoy!

Dotan Mazor

Thanks!

Posted: Mon Dec 03, 2007 7:55 pm
by russh
Thanks - just intending to move from SLES to CentOS before the new year - and this is ideal. Great work!

but... why exactly do you want me to name the machine domain.com ?

My current setup runs mail.domain.com without any apparent problems?

anything but tangerines...

Posted: Tue Dec 04, 2007 12:37 am
by bizna
Russh,

You are right. There probably shouldn't be any problem with such a name. The Only problem is, if you leave the name of the machine as localhost.localdomain

It seemed very weird to me, as someone who has been using GNU/Linux for many years now, that CentOS doesn't ask for a machine name during the installation part. So I mentioned the need to change the name, for those who will forget to do so after the installation.

Believe me, I've been there, and you really don't want to forget that. Scalix's installer just goes haywire, without telling you why.

Good luck!
Dotan

Re: anything but tangerines...

Posted: Thu Dec 06, 2007 4:14 am
by melvinong1
bizna wrote:Russh,

You are right. There probably shouldn't be any problem with such a name. The Only problem is, if you leave the name of the machine as localhost.localdomain

It seemed very weird to me, as someone who has been using GNU/Linux for many years now, that CentOS doesn't ask for a machine name during the installation part. So I mentioned the need to change the name, for those who will forget to do so after the installation.

Believe me, I've been there, and you really don't want to forget that. Scalix's installer just goes haywire, without telling you why.

Good luck!
Dotan



How about the mobile access?
how to install mobile access?l

Posted: Thu Dec 06, 2007 4:47 am
by Kris
I can not believe that I'm writing this down: do not use the textual installer. Login to your server using VNC, and install Scalix with the graphic installer. The reason is, that the textual installer, for some reason, creates a postgresql problem installing Scalix. In simpler words: the textual installer will not install.


Oh? :roll: I've done several Scalix installations on CentOS 5, always used the textual installer (I don't want a graphical environment on a server!) and it always worked fine for me.

Posted: Thu Dec 06, 2007 5:35 am
by a.schild
We too did always use the textinstaller.
No problems.

text installer

Posted: Thu Dec 06, 2007 5:44 am
by bizna
It also struck me as a weird thing, but this is the "solution" I have found here on the forums, after not managing to have the installer working.

This is a very odd solution, as one would assume that the GUI installer is just an interface to the textual one. And this is not the case.

So for those who manage to operate the installer in the textual interface: you have my envy. To all the rest: use the GUI installer.

Dotan

Posted: Tue Dec 25, 2007 3:18 am
by nestor
Hello,

Thank you bizna. I got the following error message while startig named with the gui tool of centos. Any hints?


named failed. The error was: named beenden: [FEHLGESCHLAGEN]
named starten:
Fehler in der genannten Konfiguration:
/var/named/miraculix.conglomo.de.zone:2: no current owner name
/var/named/miraculix.conglomo.de.zone:3: no current owner name
/var/named/miraculix.conglomo.de.zone:10: no current owner name
/var/named/miraculix.conglomo.de.zone:12: no current owner name
/var/named/miraculix.conglomo.de.zone:14: no current owner name
/var/named/miraculix.conglomo.de.zone:15: no current owner name
/var/named/miraculix.conglomo.de.zone:17: no current owner name
/var/named/miraculix.conglomo.de.zone:18: no current owner name
/var/named/miraculix.conglomo.de.zone:19: no current owner name
zone miraculix.conglomo.com/IN: loading master file /var/named/miraculix.conglomo.de.zone: no owner
_default/miraculix.conglomo.com/IN: no owner
[FEHLGESCHLAGEN]


My zone file (miraculix.conglomo.de.zone) looks like that:


$ORIGIN miraculix.conglomo.de.
$TTL 86400
@ IN SOA miraculix.conglomo.de. root.miraculix.conglomo.de. (
2001062501 ; serial
518400 ; refresh after 6 days
3600 ; retry after 1 hour
604800 ; expire after 1 week
86400 ) ; minimum TTL of 1 day

IN NS miraculix.conglomo.de.

IN MX 10 mail.miraculix.conglomo.com. ; this is the line for the mail MX records

IN A 192.168.0.200
server1 IN A 192.168.0.200

ftp IN CNAME server1 ; this will cause ftp.miraculix.conglomo.com to resolve go to 192.168.0.200
mail IN CNAME server1 ; this will cause mail.miraculix.conglomo.com to resolve to 192.168.0.200
www IN CNAME server1 ; this will cause www.miraculix.conglomo.com to resolve to 192.168.0.200


Conent of named conf:

zone "miraculix.conglomo.com" {
type master;
file "/var/named/miraculix.conglomo.de.zone";
};


de or com?

Posted: Wed Dec 26, 2007 1:15 am
by bizna
Nestor,

Perhaps you'll do best, if you have a zone for the DE domain, and a zone for the COM domain...

Try that.

Dotan

Posted: Wed Dec 26, 2007 7:16 am
by nestor
changed all wrong references to.com to .de, but still get this error message:


named failed. The error was: named beenden: [FEHLGESCHLAGEN]
named starten:
Fehler in der genannten Konfiguration:
/var/named/miraculix.conglomo.de.zone:2: no current owner name
/var/named/miraculix.conglomo.de.zone:3: no current owner name
/var/named/miraculix.conglomo.de.zone:10: no current owner name
/var/named/miraculix.conglomo.de.zone:12: no current owner name
/var/named/miraculix.conglomo.de.zone:14: no current owner name
/var/named/miraculix.conglomo.de.zone:15: no current owner name
/var/named/miraculix.conglomo.de.zone:17: no current owner name
/var/named/miraculix.conglomo.de.zone:18: no current owner name
/var/named/miraculix.conglomo.de.zone:19: no current owner name
zone miraculix.conglomo.de/IN: loading master file /var/named/miraculix.conglomo.de.zone: no owner
_default/miraculix.conglomo.de/IN: no owner
[FEHLGESCHLAGEN]


named.conf:

zone "miraculix.conglomo.de" {
type master;
file "/var/named/miraculix.conglomo.de.zone";
};


miraculix.conglomo.de.zone:



$ORIGIN miraculix.conglomo.de.
$TTL 86400
@ IN SOA miraculix.conglomo.de. root.miraculix.conglomo.de. (
2001062501 ; serial
518400 ; refresh after 6 days
3600 ; retry after 1 hour
604800 ; expire after 1 week
86400 ) ; minimum TTL of 1 day

IN NS miraculix.conglomo.de.

IN MX 10 mail.miraculix.conglomo.de. ; this is the line for the mail MX records

IN A 192.168.0.200
server1 IN A 192.168.0.200

ftp IN CNAME server1 ; this will cause ftp.miraculix.conglomo.de to resolve go to 192.168.0.200
mail IN CNAME server1 ; this will cause mail.miraculix.conglomo.de to resolve to 192.168.0.200
www IN CNAME server1 ; this will cause www.miraculix.conglomo.de to resolve to 192.168.0.200

Install always fails

Posted: Mon Dec 31, 2007 4:26 am
by Methos
Hi Guys

I'm unable to get this centos install to work (I've done an install of centos many times but this time it always fails)

2008-01-01 03:30:05,652 INFO Checking if any deprecated packages are installed.
2008-01-01 03:30:06,019 INFO Install end
2008-01-01 03:30:06,227 INFO Mailnode name derived from FQDN: scalix
2008-01-01 03:30:07,817 WARNING configured mail domain could not be determined
2008-01-01 03:30:07,946 INFO dns domain propellxxx.com has a valid MX record so using it as default
2008-01-01 03:30:15,049 INFO Creating Scalix instance...(please wait -- this might take several minutes)
2008-01-01 03:30:15,078 CRITICAL Failed calling command '/opt/scalix/bin/ommakeom -h scalix.propellvaluers.com ' with exit code 126 msg ['sh: which: command not found', 'sh: server/wrappers/pyexec: Permission denied']
2008-01-01 03:30:15,079 CRITICAL Operation failed: config-server function create_scalix_instance failed: Msg: Failed calling command '/opt/scalix/bin/ommakeom -h scalix.propellvaluers.com ' with exit code 126 msg ['sh: which: command no
t found', 'sh: server/wrappers/pyexec: Permission denied']
2008-01-01 03:30:15,079 ERROR Operation failed: Aborting server configuration

Any idea ?
Mike

Posted: Tue Feb 12, 2008 7:36 am
by djtremors

Code: Select all

2008-01-01 03:30:15,078 CRITICAL Failed calling command '/opt/scalix/bin/ommakeom -h scalix.propellvaluers.com ' with exit code 126 msg ['sh: which: command not found', 'sh: server/wrappers/pyexec: Permission denied']


any reason why the 'which' command doesn't work on your server(maybe it's called by scalix user which can't be run but root works?) ? if you have SElinux turned on, turn it off.