In the following article, we will guide CentOS users in setting up a CentOS 5.7 x86_64 server for ISPConfig 3 installation. Then, we will proceed with installing and configuring ISPConfig 3.
TipsMake.com - In previous articles, we've introduced you to the benefits of the ISPconfig service and how to install ISPconfig 3 on various Ubuntu platforms. Today, we'll help CentOS users set up a CentOS 5.7 x86_64 server for ISPConfig 3 installation. Then, we'll proceed with installing and configuring ISPConfig 3.
1. Requirements
- First, download one of the CentOS versions from here .
- A sufficiently fast internet connection is required for work.
2. Some notes
In the following tutorial, we use the hostname server1.example.com with the IP address 192.168.0.100 and gateway 192.168.0.1 . You need to configure it to suit your needs.
3. Basic system setup
Insert the CentOS 5.7 installation CD or DVD into the system and boot from it. Press [button] at the boot prompt.
Testing the settings would take too much time, so we choose Skip .
The CentOS Welcome screen appears; press Next .
Select your preferred language, then click Next .
Next, choose a keyboard style:
Since we were installing CentOS 5.7 on a brand new system, we selected Yes when asked 'Would you like to initialize this drive, erasing ALL DATA? '
Now, we choose the partition to be used for installing the operating system. For simplicity, we select ' Remove linux partitions on selected drives and create default layout .' This will result in a small /boot partition and a swap partition. However, you are free to partition your hard drive as you wish. Click Next .
Choose Yes when asked ' Are you sure you want to do this? '
Next, we'll set up the network. By default, the network interface is configured with DHCP, but here we're setting up a server, so we'll use a static IP address. Click Edit to make changes.
In the pop-up window that appears, make sure that the "Enable IPv4 support" option is selected, uncheck the " Dynamic IP configuration (DHCP)" and "Enable IPv6 support" options . Enter a static IP address for the network card (here we use 192.168.0.100 for this guide) and a suitable Netmask (for example, 255.255.255.0 ; if you are unsure of this value, see here for instructions).
Set the hostname manually (e.g., server1.example.com ), enter a gateway (e.g., 192.168.0.1 ), and enter addresses for two DNS servers (e.g., 8.8.8.8 and 145.253.2.75 ):
Select your time zone:
Set the root password:
Next, we select the software we want to install. We recommend that you only select the Server option and deselect many other options (including Packages from CentOS Extras ). Then select Customize now and click Next .
In the following selections, we need to identify the groups to install. Check the following items: Editors, Text-based Internet, Development Libraries, Development Tools, DNS Name Server, FTP Server, Mail Server, MySQL Database, Server Configuration Tools, Web Server, Administration Tools, Base, and System Tools ; uncheck all other items. Click Next .
The installer will check the dependencies of the packages selected above:
Then you click Next to begin the installation process:
The hard drive is currently being formatted.
The installation process has begun and will take a few minutes to complete.
Finally, after the process is complete, you can remove the CD or DVD from your computer and press Reboot .
After restarting, you will see a screen like the one below. Select Firewall configuration and press Run Tool :
Because we want to install ISPConfig at the end of this tutorial along with its firewall, we need to disable CentOS's default firewall. Select Disable and click OK . (Of course, you can enable it, but you shouldn't use other firewalls later as they may conflict with CentOS).
SELinux is a security extension for CentOS, but it can be quite troublesome for the system, and we don't need to configure it in this installation. Especially if you want to install ISPConfig, you absolutely must disable SELinux. Select Disable > OK .
Click Exit to close the Setup Agent window .
Restart your system with root privileges for the changes to take effect:
reboot
4. Adjust /etc/hosts
Now let's start editing /etc/hosts as follows:
vi /etc/hosts
# Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost 192.168.0.100 server1.example.com server1 ::1 localhost6.localdomain6 localhost6
5. Configure additional IP addresses
(This section is optional. This guide will show you how to add an IP address to your eth0 network interface if needed. If you are using only one IP address and it works well, you can skip this step.)
Let's assume our network interface is eth0 . Then there's a file /etc/sysconfig/network-scripts/ifcfg-eth0 containing the settings for eth0 . We can use this as an example for the new virtual network interface eth0:0 :
cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0
To use the IP address 192.168.0.101 on the eth0:0 virtual interface, you first need to open the file /etc/sysconfig/network-scripts/ifcfg-eth0:0 and edit it as follows:
en /etc/sysconfig/network-scripts/ifcfg-eth0:0
# Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) DEVICE=eth0:0 BOOTPROTO=static BROADCAST=192.168.0.255 IPADDR=192.168.0.101 NETMASK=255.255.255.0 NETWORK=192.168.0.0 ONBOOT=yes
Then restart your network:
/etc/init.d/network restart
(You can also adjust /etc/hosts after adding a new IP address, although this is not necessary.)
Next, run:
ifconfig
You will see your new IP address in the output:
[root@server1 ~]# ifconfig eth0 Link encap:Ethernet HWaddr 00:0C:29:89:71:35 inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:307 errors:0 dropped:0 overruns:0 frame:0 TX packets:251 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:29217 (28.5 KiB) TX bytes:45961 (44.8 KiB) eth0:0 Link encap:Ethernet HWaddr 00:0C:29:89:71:35 inet addr:192.168.0.101 Bcast:192.168.0.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:8 errors:0 dropped:0 overruns:0 frame:0 TX packets:8 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:560 (560.0 b) TX bytes:560 (560.0 b) [root@server1 ~]#
6. Disable the firewall and SELinux.
(You can skip this step if you have already completed it at the end of section 3 – basic system setup – page 2. Otherwise, you can follow the instructions below.)
Run the command line:
system-config-securitylevel
In the window that appears, select Disable for both Security Level and SELinux to Disabled . Click OK .
Then reboot the system:
reboot
7. Install some necessary software.
First, we import the GPG keys for the software packages:
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY*
Activate the Contrib and CentOS Plus repositories:
en /etc/yum.repos.d/CentOS-Base.repo
Edit the lines as follows:
[base] [.] exclude=postfix [.] [updates] [.] exclude=postfix [.] [centosplus] [.] enabled=1 includepkgs=postfix [.] [contrib] [.] enabled=1 [.]
Update the current packages for the system:
yum update
Install the following necessary software packages:
yum groupinstall 'Development Tools'
yum groupinstall 'Development Libraries'
8. Quota
(If you have selected a different partitioning model, you will need to adjust this setting. Therefore, the quota applies to the partitions you require.)
To set the quota, run the following command:
yum install quota
Edit /etc/fstab and add the line ,usrquota,grpquota to /dev/VolGroup00/LogVol00 :
vi /etc/fstab
/dev/VolGroup00/LogVol00 / ext3 defaults,usrquota,grpquota 1 1 LABEL=/boot /boot ext3 defaults 1 2 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 /dev/VolGroup00/LogVol01 swap swap defaults 0 0
Then run:
touch /aquota.user /aquota.group
chmod 600 /aquota.*
mount -o remount /
quotacheck -avugm
quotaon -avug
9. Install Apache, MySQL, and phpMyAdmin.
First, we need to enable the RPMforge repository on the CentOS system to install packages that are not available in the CentOS 5.7 repository:
wget http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
rpm --import RPM-GPG-KEY.dag.txt
cd /tmp
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
rpm -ivh rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
If the link above is no longer working, you can find another version of rpmforge-release here .
You can now install the necessary packages with a single command:
yum install ntp httpd mysql-server php php-mysql php-mbstring php-mcrypt phpmyadmin
10. Install Dovecot
Dovecot packages are available in the CentOS repository, but they don't support MySQL. Therefore, we need to remove the existing Dovecot packages and install the new ones (from Atrpms ) that support MySQL.
yum remove dovecot
Create a new file /etc/yum.repos.d/atrpms.repo :
en /etc/yum.repos.d/atrpms.repo
and insert the following line into the file:
[atrpms] name=Red Hat Enterprise Linux 5 - $basearch - ATrpms baseurl=http://dl.atrpms.net/el5-$basearch/atrpms/stable failovermethod=priority exclude=dovecot-2* includepkgs=dovecot dovecot-sieve # # requires stable # [atrpms-testing] name=Red Hat Enterprise Linux 5 - $basearch - ATrpms testing baseurl=http://dl.atrpms.net/el5-$basearch/atrpms/testing failovermethod=priority enabled=1 exclude=dovecot-2* includepkgs=dovecot dovecot-sieve # # requires stable and testing # [atrpms-bleeding] name=Red Hat Enterprise Linux 5 - $basearch - ATrpms bleeding baseurl=http://dl.atrpms.net/el5-$basearch/atrpms/bleeding failovermethod=priority enabled=0
Import the important keys tge gpg of atrpm:
wget http://ATrpms.net/RPM-GPG-KEY.atrpms
rpm --import RPM-GPG-KEY.atrpms
Install Dovecot:
yum install dovecot dovecot-sieve
On a 64-bit system, you run the command:
ln -s /usr/lib64/dovecot/ /usr/lib/dovecot
Now let's create the startup link system for Dovecot:
chkconfig --levels 235 dovecot on
/etc/init.d/dovecot start
If you encounter the following error with Dovecot:
Fatal: listen(::, 143) failed: Address already in use
You can fix this by opening the /etc/dovecot.conf file :
vi /etc/dovecot.conf
and add the line listen = * :
[.] #listen = *, [::] listen = * [.]
Then try restarting Dovecot.
/etc/init.d/dovecot start
11. Install Postfix with MySQL Support
The standard Postfix packages from the CentOS repository don't support MySQL, but we'll use CentOS Plus to overcome this issue. First, we need to uninstall Postfix:
yum remove postfix
And reinstall from the CentOS Plus repository:
yum install postfix
Close Sendmail and start Postfix, MySQL:
chkconfig --levels 235 mysqld on
/etc/init.d/mysqld start
chkconfig --levels 235 sendmail off
chkconfig --levels 235 postfix on
/etc/init.d/sendmail stop
/etc/init.d/postfix start
12. Install Getmail
yum install getmail
13. Set up MySQL passwords and configure phpMyAdmin.
We will now set a password for MySQL using the root account:
mysql_secure_installation
[root@server1 tmp]# mysql_secure_installation NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! In order to log into MySQL to secure it, we'll need the current password for the root user. If you've just installed MySQL, and you haven't set the root password yet, the password will be blank, so you should just press enter here. Enter current password for root (enter for none): OK, successfully used password, moving on. Setting the root password ensures that nobody can log into the MySQL root user without the proper authorisation. Set root password? [Y/n]
Next, we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin allows connections not only from localhost, by commenting out the line. :
en /etc/httpd/conf.d/phpmyadmin.conf
# # Web application to manage MySQL # #
# Order Deny,Allow # Deny from all # Allow from 127.0.0.1 # Alias /phpmyadmin /usr/share/phpmyadmin Alias /phpMyAdmin /usr/share/phpmyadmin Alias /mysqladmin /usr/share/phpmyadmin
Change the authentication method in phpMyAdmin from cookie to http :
en /usr/share/phpmyadmin/config.inc.php
[.] /* Authentication type */ $cfg['Servers'][$i]['auth_type'] = 'http'; [.]
Create a startup link for Apache and run it:
chkconfig --levels 235 httpd on
/etc/init.d/httpd start
Now you can launch your browser and enter the address http://server1.example.com/phpmyadmin/ or http://192.168.0.100/phpmyadmin/ , log in with the root account and root password for MySQL.
14. Install Amavisd-new, SpamAssassin, and ClamAV.
You use the following command to install these three services simultaneously:
yum install amavisd-new spamassassin clamav clamd unzip bzip2 unrar perl-DBD-mysql
Open the file /etc/sysconfig/amavisd :
vi /etc/sysconfig/amavisd
And remove the comment character (#) from the line CONFIG_FILE="/etc/amavisd.conf" :
### Uncomment this if you want to use amavis with sendmail milter interface. ### See README.milter for details. # #MILTER_SOCKET="local:/var/amavis/amavis-milter.sock" #MILTER_SOCKET="10024@127.0.0.1" ### These are other defaults. #AMAVIS_ACCOUNT="amavis" CONFIG_FILE="/etc/amavisd.conf" #MILTER_FLAGS=""
Start freshclam, amavisd, and clamd.
sa-update
chkconfig --levels 235 amavisd on
chkconfig --levels 235 clamd on
/usr/bin/freshclam
/etc/init.d/amavisd start
/etc/init.d/clamd start
…and create some necessary folders:
mkdir /var/run/amavisd /var/spool/amavisd /var/spool/amavisd/tmp /var/spool/amavisd/db
chown amavis /var/run/amavisd /var/spool/amavisd /var/spool/amavisd/tmp /var/spool/amavisd/db
ln -s /var/run/clamav/clamd.sock /var/spool/amavisd/clamd.sock
15. Install Apache2 with mod_php, mod_fcgi/PHP5, and suPHP
ISPConfig 3 allows you to use mod_php, mod_fcgi/PHP5, cgi/PHP5, and suPHP on each basic website.
mod_fcgid is not available in the official CentOS repositories, but we can use packages for CentOS 5.x here . Enable this repository with the following command:
cd /etc/yum.repos.d/
wget http://centos.karan.org/kbsingh-CentOS-Extras.repo
Open /etc/yum.repos.d/kbsingh-CentOS-Extras.repo .
en /etc/yum.repos.d/kbsingh-CentOS-Extras.repo
…and set gpgcheck to 0 , enabled to 1 in [kbs-CentOS-Testing]:
[.] # pkgs in the -Testing repo are not gpg signed [kbs-CentOS-Testing] name=CentOS.Karan.Org-EL$releasever - Testing gpgcheck=0 gpgkey=http://centos.karan.org/RPM-GPG-KEY-karan.org.txt enabled=1 baseurl=http://centos.karan.org/el$releasever/extras/testing/$basearch/RPMS/
Then you can install Apache2 with mod_php5, mod_fcgid, and PHP5:
yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-eaccelerator php-mbstring php-mcrypt php-mhash php-mssql php-snmp php-soap php-tidy curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel mod_fcgid php-cli httpd-devel
Next, open /etc/php.ini .
vi /etc/php.ini
…and change the error messages so they don't stay displayed for too long, adding cgi.fix_pathinfo = 1 to the end of the file:
[.] ;error_reporting = E_ALL error_reporting = E_ALL & ~E_NOTICE [.] cgi.fix_pathinfo = 1
Install suPHP:
cd /tmp
wget http://suphp.org/download/suphp-0.7.1.tar.gz
tar xvfz suphp-0.7.1.tar.gz
cd suphp-0.7.1/
./configure --prefix=/usr --sysconfdir=/etc --with-apr=/usr/bin/apr-1-config --with-apxs=/usr/sbin/apxs --with-apache-user=apache --with-setid-mode=owner --with-php=/usr/bin/php-cgi --with-logfile=/var/log/httpd/suphp_log --enable-SUPHP_USE_USERGROUP=yes
make
make install
Add the suPHP module to your Apache configuration:
en /etc/httpd/conf.d/suphp.conf
LoadModule suphp_module modules/mod_suphp.so
Create the file /etc/suphp.conf :
vi /etc/suphp.conf
[global] ;Path to logfile logfile=/var/log/httpd/suphp.log ;Loglevel loglevel=info ;User Apache is running as webserver_user=apache ;Path all scripts have to be in docroot=/ ;Path to chroot() to before executing script ;chroot=/mychroot ; Security options allow_file_group_writeable=true allow_file_others_writeable=false allow_directory_group_writeable=true allow_directory_others_writeable=false ;Check wheter script is within DOCUMENT_ROOT check_vhost_docroot=true ;Send minor error messages to browser errors_to_browser=false ;PATH environment variable env_path=/bin:/usr/bin ;Umask to set, specify in octal notation umask=0077 ; Minimum UID min_uid=100 ; Minimum GID min_gid=100 [handlers] ;Handler for php-scripts x-httpd-suphp="php:/usr/bin/php-cgi" ;Handler for CGI-scripts x-suphp-cgi="execute:!self"
Finally, restart Apache:
/etc/init.d/httpd restart
a. Ruby
Starting with version 3.0.3, ISPConfig 3 is built to support Ruby. Instead of using CGI/FastCGI, ISPConfig relies on mod_ruby, which is available on the Apache server.
With CentOS 5.7, the mod_ruby package is not available. Therefore, we need to compile it:
yum install httpd-devel ruby ruby-devel
Download and install mod_ruby:
cd /tmp
wget http://modruby.net/archive/mod_ruby-1.3.0.tar.gz
tar zxvf mod_ruby-1.3.0.tar.gz
cd mod_ruby-1.3.0/
./configure.rb --with-apr-includes=/usr/include/apr-1
make
make install
Finally, add the mod_ruby modules to the Apache configuration by creating the file /etc/httpd/conf.d/ruby.conf :
en /etc/httpd/conf.d/ruby.conf
LoadModule ruby_module modules/mod_ruby.so
And restart Apache:
/etc/init.d/httpd restart
b. WebDAV
WebDAV is already enabled, but to check this, open the file /etc/httpd/conf/httpd.conf and make sure that the following three modules are running:
vi /etc/httpd/conf/httpd.conf
[.] LoadModule auth_digest_module modules/mod_auth_digest.so [.] LoadModule dav_module modules/mod_dav.so [.] LoadModule dav_fs_module modules/mod_dav_fs.so [.]
If you edit /etc/httpd/conf/httpd.conf, don't forget to restart Apache:
/etc/init.d/httpd restart
16. Install PureFTPd
PureFTPd can be installed using the following command:
yum install pure-ftpd
Create a startup linking system and launch PureFTPd:
chkconfig --levels 235 pure-ftpd on
/etc/init.d/pure-ftpd start
Now we configure PureFTPd to allow both FTP and TLS. By combining TLS encryption, the FTP protocol will become much more secure.
First, we install OpenSSL to serve TLS:
yum install openssl
Open /etc/pure-ftpd/pure-ftpd.conf.
en /etc/pure-ftpd/pure-ftpd.conf
If you want to allow FTP and TLS, just set TLS to 1 :
[.] # This option can accept three values : # 0 : disable SSL/TLS encryption layer (default). #1 : accept both traditional and encrypted sessions. # 2 : refuse connections that don't use SSL/TLS security mechanisms, # including anonymous sessions. # Do _not_ uncomment this blindly. Be sure that : # 1) Your server has been compiled with SSL/TLS support (--with-tls), # 2) A valid certificate is in place, # 3) Only compatible clients will log in. TLS 1 [.]
We will create an SSL certificate in /etc/ssl/private/ . First, we need to create this directory:
mkdir -p /etc/ssl/private/
Then create an SSL certificate in it:
openssl req -x509 -nodes -days 7300 -newkey rsa:2048 -keyout /etc/ssl/private/pure-ftpd.pem -out /etc/ssl/private/pure-ftpd.pem
Fill in the answers as suggested below:
Country Name (2 letter code) [GB]:
State or Province Name (full name) [Berkshire]:
Locality Name (eg, city) [Newbury]:
Organization Name (eg, company) [My Company Ltd]:
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:
Email Address []:
Change permissions for an SSL certificate:
chmod 600 /etc/ssl/private/pure-ftpd.pem
Finally, restart PureFTPd:
/etc/init.d/pure-ftpd restart
So you can connect using your FTP client; however, you should configure your FTP client for TLS.
17. Install a Chrooted DNS Server (BIND9)
First run:
yum install bind-chroot
Next is:
chmod 755 /var/named/
chmod 775 /var/named/chroot/
chmod 775 /var/named/chroot/var/
chmod 775 /var/named/chroot/var/named/
chmod 775 /var/named/chroot/var/run/
chmod 777 /var/named/chroot/var/run/named/
cd /var/named/chroot/var/named/
ln -s ././ chroot
touch /var/named/chroot/var/named/named.local
cp /usr/share/doc/bind-9.3.6/sample/var/named/named.root /var/named/chroot/var/named/named.root
touch /var/named/chroot/etc/named.conf.local
en /var/named/chroot/etc/named.conf
// // named.conf // // Provided by Red Hat bind package to configure the ISC BIND named(8) DNS // server as a caching only nameserver (as a localhost DNS resolver only). // // See /usr/share/doc/bind*/sample/ for example named configuration files. // options { listen-on port 53 { any; }; listen-on-v6 port 53 { any; }; directory "/var/named/chroot/var/named"; dump-file "/var/named/chroot/var/named/data/cache_dump.db"; statistics-file "/var/named/chroot/var/named/data/named_stats.txt"; memstatistics-file "/var/named/chroot/var/named/data/named_mem_stats.txt"; allow-query { any; }; recursion yes; }; logging { channel default_debug { file "data/named.run"; serious dynamic; }; }; zone "." IN { type hint; file "named.root"; }; include "/var/named/chroot/var/named/named.local";
chkconfig --levels 235 named on
/etc/init.d/named start
BIND will run in a jailed chroot at /var/named/chroot/var/named/ . We will use ISPConfig to configure BIND (zones.).
18. Install Vlogger, Webalizer, and AWStats
First, run the following command:
yum install webalizer awstats perl-DateTime-Format-HTTP perl-DateTime-Format-Builder
Then you run the following commands:
cd /tmp
wget http://n0rp.chemlab.org/vlogger/vlogger-1.3.tar.gz
tar xvfz vlogger-1.3.tar.gz
mv vlogger-1.3/vlogger /usr/sbin/
rm -rf vlogger*
19. Install Jailkit
Jailkit is only necessary if you want to Chroot the SSH user; note that Jailkit must be installed before ISPConfig. Absolutely do not do the reverse.
cd /tmp
wget http://olivier.sessink.nl/jailkit/jailkit-2.14.tar.gz
tar xvfz jailkit-2.14.tar.gz
cd jailkit-2.14
./configure
make
make install
cd .
rm -rf jailkit-2.14*
20. Install fail2ban
Similar to the settings for Ubuntu 11.10 servers, this option is not mandatory, but you should enable it because ISPConfig will monitor and display logs:
yum install fail2ban
chkconfig --levels 235 fail2ban on
/etc/init.d/fail2ban start
21. Install rkhunter
rkhunter can be installed using the following command:
yum install rkhunter
22. Install SquirrelMail
To install the SquirrelMail webmail client service, use the following command:
yum install squirrelmail
And restart Apache:
/etc/init.d/httpd restart
Next, configure SquirrelMail:
/usr/share/squirrelmail/config/conf.pl
Notify SquirrelMail about the use of 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 >>
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 doesn't 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 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 doesn't 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 show_contain_subfolders_option = false optional_delimiter = detect delete_folder = false Press any key to continue. 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 off S Save data Q Quit Command >>
Finally, we need to edit the /etc/squirrelmail/config_local.php file and add a comment to the $default_folder_prefix variable; otherwise, you will encounter the error ' Query: CREATE "Sent" Reason Given: Invalid mailbox name ' after logging into SquirrelMail.
en /etc/squirrelmail/config_local.php
Now you can access http://server1.example.com/webmail or http://192.168.0.100/webmail and log in to SquirrelMail.
23. Configure ISPConfig 3
To install ISPConfig 3 from the latest version, use the command;
cd /tmp
wget http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
tar xfz ISPConfig-3-stable.tar.gz
cd ispconfig3_install/install/
Tiếp theo chạy:
php -q install.php
Quá trình cài đặt ISPConfig 3 sẽ được bắt đầu:
[root@server1 install]# php -q install.php
--------------------------------------------------------------------------------
_____ ___________ _____ __ _ ____
|_ _/ ___| ___ / __ / _(_) /__
| | `--.| |_/ / | / / ___ _ __ | |_ _ __ _ _/ /
| | `--. __/ | | / _ | '_ | _| |/ _` | |_ |
_| |_/__/ / | | __/ (_) | | | | | | | (_| | ___
___/____/_| ____/___/|_| |_|_| |_|__, | ____/
__/ |
|___/
--------------------------------------------------------------------------------
>> Initial configuration
Operating System: CentOS 5 or compatible
Following will be a few questions for primary configuration so be careful.
Default values are in [brackets] and can be accepted with .
Tap in "quit" (without the quotes) to stop the installer.
Select language (en,de) [en]:
Installation mode (standard,expert) [standard]:
Full qualified hostname (FQDN) of the server, eg server1.domain.tld [server1.example.com]:
MySQL server hostname [localhost]:
MySQL root username [root]:
MySQL root password []:
MySQL database to create [dbispconfig]:
MySQL charset [utf8]:
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]: State or Province Name (full name) [Berkshire]: Locality Name (eg, city) [Newbury]: Organization Name (eg, company) [My Company Ltd]: Organizational Unit Name (eg, section) []: Common Name (eg, your name or your server's hostname) []: Email Address []: Configuring Jailkit
Configuring Dovecot
Configuring Spamassassin
Configuring Amavisd
Configuring Getmail
Configuring Pureftpd
Configuring BIND
Configuring Apache
Configuring Vlogger
Configuring Apps vhost
Configuring Firewall
Installing ISPConfig
ISPConfig Port [8080]:
Configuring DBServer
Installing ISPConfig 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: [FAILED]
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: Bytecode: Security mode set to "TrustSigned".
[ OK ]
Stopping Dovecot Imap: [ OK ]
If you have trouble with authentication failures,
enable auth_debug setting. See http://wiki.dovecot.org/WhyDoesItNotWork
This message goes away after the first successful login.
Fatal: listen(::, 143) failed: Address already in use
Starting Dovecot Imap: [FAILED]
Stopping httpd: [ OK ]
[Mon Sep 26 13:29:58 2011] [warn] NameVirtualHost *:80 has no VirtualHosts
Starting httpd: [ OK ]
Stopping pure-ftpd: [ OK ]
Starting pure-ftpd: [ OK ]
Installation completed.
[root@server1 install]#
Các dịch vụ được cấu hình tự động nên bạn không cần thiết lập thủ công.
Trường hợp Dovecot gặp lỗi khởi động với thông báo:
Fatal: listen(::, 143) failed: Address already in use
Bạn khắc phục bằng cách mở /etc/dovecot.conf:
vi /etc/dovecot.conf
Và thêm vào dòng listen = *:
[.] #listen = *, [::] listen = * [.]
Sau đó khởi động lại Dovecot:
/etc/init.d/dovecot start
Tiếp theo bạn có thể truy cập vào ISPConfig 3 theo đường dẫn http://server1.example.com:8080/ hoặc http://192.168.0.100:8080/. Đăng nhập với username và password đều là admin (bạn nên thay đổi password mặc định này).
Hệ thống của bạn đã sẵn sàng để sử dụng.
24. Các link tham khảo
- CentOS: http://www.centos.org/
- ISPConfig: http://www.ispconfig.org/