The Perfect Server - CentOS 5.2 [ISPConfig 3] - Page 6

Want to support HowtoForge? Become a subscriber!
 
Submitted by falko (Contact Author) (Forums) on Tue, 2009-03-24 19:39. ::

23 Install SquirrelMail

To install the SquirrelMail webmail client, run...

yum install squirrelmail

... and restart Apache:

/etc/init.d/httpd restart

Then configure SquirrelMail:

/usr/share/squirrelmail/config/conf.pl

We must tell SquirrelMail that we are using Courier-IMAP/-POP3:

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages

D.  Set pre-defined settings for specific IMAP servers

C   Turn color off
S   Save data
Q   Quit

Command >>
 <-- D


SquirrelMail Configuration : Read: config.php
---------------------------------------------------------
While we have been building SquirrelMail, we have discovered some
preferences that work better with some servers that don't work so
well with others.  If you select your IMAP server, this option will
set some pre-defined settings for that server.

Please note that you will still need to go through and make sure
everything is correct.  This does not change everything.  There are
only a few settings that this will change.

Please select your IMAP server:
    bincimap    = Binc IMAP server
    courier     = Courier IMAP server
    cyrus       = Cyrus IMAP server
    dovecot     = Dovecot Secure IMAP server
    exchange    = Microsoft Exchange IMAP server
    hmailserver = hMailServer
    macosx      = Mac OS X Mailserver
    mercury32   = Mercury/32
    uw          = University of Washington's IMAP server

    quit        = Do not change anything
Command >>
 <-- courier


SquirrelMail Configuration : Read: config.php
---------------------------------------------------------
While we have been building SquirrelMail, we have discovered some
preferences that work better with some servers that don't work so
well with others.  If you select your IMAP server, this option will
set some pre-defined settings for that server.

Please note that you will still need to go through and make sure
everything is correct.  This does not change everything.  There are
only a few settings that this will change.

Please select your IMAP server:
    bincimap    = Binc IMAP server
    courier     = Courier IMAP server
    cyrus       = Cyrus IMAP server
    dovecot     = Dovecot Secure IMAP server
    exchange    = Microsoft Exchange IMAP server
    hmailserver = hMailServer
    macosx      = Mac OS X Mailserver
    mercury32   = Mercury/32
    uw          = University of Washington's IMAP server

    quit        = Do not change anything
Command >> courier

              imap_server_type = courier
         default_folder_prefix = INBOX.
                  trash_folder = Trash
                   sent_folder = Sent
                  draft_folder = Drafts
            show_prefix_option = false
          default_sub_of_inbox = false
show_contain_subfolders_option = false
            optional_delimiter = .
                 delete_folder = true

Press any key to continue...
<-- press a key


SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages

D.  Set pre-defined settings for specific IMAP servers

C   Turn color off
S   Save data
Q   Quit

Command >>
 <--S


SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages

D.  Set pre-defined settings for specific IMAP servers

C   Turn color off
S   Save data
Q   Quit

Command >>
 <--Q

One last thing we need to do is modify the file /etc/squirrelmail/config_local.php and comment out the $default_folder_prefix variable - if you don't do this, you will see the following error message in SquirrelMail after you've logged in: Query: CREATE "Sent" Reason Given: Invalid mailbox name.

vi /etc/squirrelmail/config_local.php

<?php
/**
 * Local config overrides.
 *
 * You can override the config.php settings here.
 * Don't do it unless you know what you're doing.
 * Use standard PHP syntax, see config.php for examples.
 *
 * @copyright &copy; 2002-2006 The SquirrelMail Project Team
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
 * @version $Id: config_local.php,v 1.2 2006/07/11 03:33:47 wtogami Exp $
 * @package squirrelmail
 * @subpackage config
 */
//$default_folder_prefix                = '';
?>

Now you can type in http://server1.example.com/webmail or http://192.168.0.100/webmail in your browser to access SquirrelMail.

 

24 Install ISPConfig 3

Uninstall BIND and Dovecot so that the ISPConfig installer configures ISPConfig for MyDNS and Courier:

yum remove bind dovecot

To install ISPConfig 3 from the latest released version, do this:

cd /tmp
wget http://downloads.sourceforge.net/ispconfig/ISPConfig-3.0.1.tar.gz?use_mirror=
tar xvfz ISPConfig-3.0.1.tar.gz
cd ispconfig3_install/install/

(Replace ISPConfig-3.0.1.tar.gz with the latest version.)

The next step is to run

php -q install.php

This will start the ISPConfig 3 installer:

[root@server1 install]# php -q install.php


--------------------------------------------------------------------------------
 _____ ___________   _____              __ _
|_   _/  ___| ___ \ /  __ \            / _(_)
  | | \ `--.| |_/ / | /  \/ ___  _ __ | |_ _  __ _
  | |  `--. \  __/  | |    / _ \| '_ \|  _| |/ _` |
 _| |_/\__/ / |     | \__/\ (_) | | | | | | | (_| |
 \___/\____/\_|      \____/\___/|_| |_|_| |_|\__, |
                                              __/ |
                                             |___/
--------------------------------------------------------------------------------


>> Initial configuration

Operating System: CentOS 5.2 or compatible

    Following will be a few questions for primary configuration so be careful.
    Default values are in [brackets] and can be accepted with <ENTER>.
    Tap in "quit" (without the quotes) to stop the installer.


Select language (en,de) [en]:

Installation mode (standard,expert) [standard]:
<-- ENTER

Full qualified hostname (FQDN) of the server, eg server1.domain.tld  [server1.example.com]: <-- ENTER

MySQL server hostname [localhost]: <-- ENTER

MySQL root username [root]: <-- ENTER

MySQL root password []: <-- yourrootsqlpassword

MySQL database to create [dbispconfig]: <-- ENTER

MySQL charset [utf8]: <-- ENTER

Generating a 2048 bit RSA private key
................................................+++
.................................................................................+++
writing new private key to 'smtpd.key'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:
<-- ENTER
State or Province Name (full name) [Berkshire]: <-- ENTER
Locality Name (eg, city) [Newbury]: <-- ENTER
Organization Name (eg, company) [My Company Ltd]: <-- ENTER
Organizational Unit Name (eg, section) []: <-- ENTER
Common Name (eg, your name or your server's hostname) []: <-- ENTER
Email Address []: <-- ENTER
Configuring Jailkit
Configuring SASL
Configuring PAM
Configuring Courier
Configuring Spamassassin
Configuring Amavisd
Configuring Getmail
Configuring Pureftpd
Configuring MyDNS
Configuring Apache
Configuring Firewall
Installing ISPConfig
ISPConfig Port [8080]:
<-- ENTER

Configuring DBServer
Installing Crontab
no crontab for root
no crontab for getmail
Restarting services ...
Stopping MySQL:                                            [  OK  ]
Starting MySQL:                                            [  OK  ]
Shutting down postfix:                                     [  OK  ]
Starting postfix:                                          [  OK  ]
Stopping saslauthd:                                        [  OK  ]
Starting saslauthd:                                        [  OK  ]
Shutting down Mail Virus Scanner (amavisd):                [  OK  ]
Starting Mail Virus Scanner (amavisd):                     [  OK  ]
Stopping Clam AntiVirus Daemon:                            [  OK  ]
Starting Clam AntiVirus Daemon:                            [  OK  ]
Stopping Courier authentication services: authdaemond
Starting Courier authentication services: authdaemond
Stopping Courier-IMAP server: imap imap-ssl pop3 pop3-ssl
Starting Courier-IMAP server: imap imap-ssl pop3 pop3-ssl
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
Stopping pure-ftpd:                                        [  OK  ]
Starting pure-ftpd:                                        [  OK  ]
Installation completed.
[root@server1 install]#

The installer automatically configures all underlying services, so no manual configuration is needed.

Afterwards you can access ISPConfig 3 under http://server1.example.com:8080/ or http://192.168.0.100:8080/. Log in with the username admin and the password admin (you should change the default password after your first login):

The system is now ready to be used.

 

24.1 ISPConfig 3 Manual

 

25 Links


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Leo Reice (not registered) on Wed, 2009-08-12 17:43.
Thanks so much for all the work you did on this.  Not only was I able to get a system up, but I also learned a lot.
Submitted by will (not registered) on Tue, 2009-07-21 08:47.

Perfect Installation! Very well done.

Submitted by Peter Sauer (not registered) on Fri, 2009-07-10 06:22.

Congratulation to this HOWTO.

Following changes for Centos 5.3 were done - necessary due ongoing changes in the RPMFORGE REPO
see http://lists.rpmforge.net/pipermail/users/2009-July/002508.html
This problems prevented to perform a yum update - some of these perl libs are necessary for ISP Config 3. This problem seems to be fixed .  But there were also some other dependency resolution problems (yum update) during installation. (eg. lzo-lib). So I changed the priority of the RPMFORGE REPO for my third test installation -  Per aspera ad astra!.
See http://wiki.centos.org/PackageManagement/Yum/Priorities

check_obsoletes=1
[base], [addons], [updates], [extras] ... priority=1
[centosplus],[contrib] ... priority=2
[RPMFORGE] ... priority=3

Due my repo problems I installed all needed programs (yum install...) of this documentation before the configuraion jobs step by step with a accompanying yum update to indentify depency problems.

Section 10 - newer versions available
wget http://prdownloads.sourceforge.net/courier/courier-authlib-0.62.4.tar.bz2
wget http://prdownloads.sourceforge.net/courier/courier-imap-4.5.1.tar.bz2
wget http://prdownloads.sourceforge.net/courier/maildrop-2.2.0.tar.bz2

Section 11 - I added postfix to the global exlude list of yum (yum.conf) to prevent killing this special postfix version by the next yum update!

Section 15 - package perl-DBD-mysql seems obsolet - package with the same name/content was included sooner from a CENTOS repo

Section 16 - to avoid more third party repos I download mod_fcigid and installed this package manually
http://centos.karan.org/el5/extras/testing/i386/RPMS/mod_fcgid-2.2-4.el5.kb.i386.rpm
add suPHP - newer version available
http://www.suphp.org/download/suphp-0.7.1.tar.gz

Section 18 - mydns - I tried also mydns-ng latest version instead of mydns. But mydns-ng dies sometimes - see http://www.howtoforge.de/forum/showthread.php?t=1911&page=4&highlight=mydns-ng. So I used mydns for Centos.

As last step I installed an Open-Exchange - works fine
http://www.open-xchange.com/wiki/index.php?title=Quick_install_guide_for_CentOS5

Submitted by cobro (registered user) on Tue, 2009-06-30 20:43.
this is the by far the best tutorial i have seen before and i did the install and it works like a charm for me so thank you so very much !
Submitted by Marco Cacchiani (not registered) on Sat, 2009-06-27 15:11.

Absolutely perfect Tutorial!

Every step adequately commented, any ambiguity reported, every doubt prevented.

The best tutorial I have stumbled in in (many) years!

Thank you very much.

Marco

Submitted by drokmed (not registered) on Sat, 2009-05-09 23:48.

Excellent!  Thank you for this great howto!

 Just installed on CentOS 5.3, works great!

I did encounter the version glitch at the end, as documented in comment below.  Just edit the lib file and it will work.

Submitted by uncher (registered user) on Mon, 2009-04-27 08:49.

After install IspConfig 3 in file /etc/httpd/conf/sites-available/ispconfig.conf you need
change:

LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig

to:

LogFormat "%v %h %l %u %t \"%r\" %>s %B \"%{Referer}i\" \"%{User-Agent}i\"" combined_ispconfig

Lowercase b to uppercase B. It looks that vlogger does not understand dash - when it's zero it must be zero.

As it is written here already: http://httpd.apache.org/docs/1.3/mod/mod_log_config.html

%B (Bytes sent, excluding HTTP headers),
%b (Bytes sent, in CLF format i.e. a '-' rather than a 0 when no bytes are sent)

 thanks to cvladan for "reading docs with open eyes")))

Submitted by dorulk (not registered) on Mon, 2009-04-20 03:54.
Thanks for this tutorial, work fine with centOS 5.3.
Submitted by Sanjay K (not registered) on Mon, 2009-04-13 22:05.

 Works Great with CentOS 5.3 as well.

This tutorial is fantastic! Thanks.

I did not realise that I was updated to 5.3. I worked through the tutorial and it worked like a charm up until the last step while installing ISPConfig3. Where it complained:

>> Initial configuration  

PHP Notice:  Undefined variable: distver in /tmp/ispconfig3_install/install/lib/install.lib.php on line 135
PHP Notice:  Undefined variable: distid in /tmp/ispconfig3_install/install/lib/install.lib.php on line 135
PHP Notice:  Undefined variable: distbaseid in /tmp/ispconfig3_install/install/lib/install.lib.php on line 135
Linux Distribution or Version not recognized.

I checked my version in /etc/redhat-release and realised it was 5.3 so came back to 

/tmp/ispconfig3_install/install/lib and edited the file install.lib.php and made one change to line 122 (changed 5.2 to 5.3) :

               if(stristr($content,'CentOS release 5.3 (Final)')) {
 And it worked without any problems. I guess this has been registered with ISPConfig as a bug and would be fixed in due course of time but in the meanwhile if anyone gets stuck in a similar position, this is the quick solution.

Thanks once again for a great tutorial.

Sanjay

Submitted by Leo Reice (not registered) on Wed, 2009-08-12 16:48.
Thanks for this update...made your change and then was able to install...one small hitch in this excellent tutorial
Submitted by Omar (not registered) on Thu, 2009-04-09 16:46.

Hi, thanks for this, perfect one, Juste in the install process of ISPConfig if you have downloaded the latest version of centos dvd will be unable to install ISPconfig you got : PHP Notice: Undefined variable: distver in /tmp/ispconfig3_install/install/lib/install.lib.php on line 135 PHP Notice: Undefined variable: distid in /tmp/ispconfig3_install/install/lib/install.lib.php on line 135 PHP Notice: Undefined variable: distbaseid in /tmp/ispconfig3_install/install/lib/install.lib.php on line 135 Linux Distribution of Version not recognized. until you edit :/tmp/ispconfig3_install/install/lib/install.lib.php replacing this : if(stristr($content,'CentOS release 5.2 (Final)')) { $distname = 'CentOS'; $distver = '5.2'; $distid = 'centos52'; $distbaseid = 'fedora'; swriteln("Operating System: CentOS 5.2 or compatible\n"); } by this : if(stristr($content,'CentOS release 5.3 (Final)')) { $distname = 'CentOS'; $distver = '5.3'; $distid = 'centos52'; $distbaseid = 'fedora'; swriteln("Operating System: CentOS 5.3 or compatible\n"); } bye.

Submitted by leonidas (not registered) on Mon, 2009-04-13 01:57.

edit /tmp/ispconfig3_install/install/lib/install.lib.php, and change:

 

if(stristr($content,'CentOS release 5.2 (Final)')) {
$distname = 'CentOS';
$distver = '5.2';
$distid = 'centos52';
$distbaseid = 'fedora';
swriteln("Operating System: CentOS 5.2 or compatible\n");

 to

if(stristr($content,'CentOS release 5.3 (Final)')) {
$distname = 'CentOS';
$distver = '5.3';
$distid = 'centos52';
$distbaseid = 'fedora';
swriteln("Operating System: CentOS 5.3 or compatible\n");

 

after that, everything works fine.

Submitted by Anonymous (not registered) on Tue, 2009-04-28 17:08.
gracias.... excelente tutorial, funciona perfecto
Submitted by Ricardo Vergara (not registered) on Mon, 2009-07-06 19:45.
Excelente, guia, funcionando Ok, solo retoque con los comentarios finales. Gracias.