VMware Images:
|
The Perfect Server - CentOS 6.1 x86_64 With Apache2 [ISPConfig 3] - Page 4
10 Install Courier-IMAP, Courier-Authlib, And MaildropUnfortunately there are no rpm packages for Courier-IMAP, Courier-Authlib, and Maildrop, therefore we have to build them ourselves. First remove Dovecot (CentOS 6.1 comes with Dovecot 2.x; unfortunately, ISPConfig 3 supports Dovecot 1.2.x, but not 2.x): yum remove dovecot dovecot-mysql Then install the prerequisites that we need to build Courier rpm packages: yum install rpm-build gcc mysql-devel openssl-devel cyrus-sasl-devel pkgconfig zlib-devel pcre-devel openldap-devel postgresql-devel expect libtool-ltdl-devel openldap-servers libtool gdbm-devel pam-devel gamin-devel libidn-devel RPM packages should not be built as root; courier-imap will even refuse to compile if it detects that the compilation is run as the root user. Therefore we create a normal user account now (falko in this example) and give him a password: useradd -m -s /bin/bash falko We will need the sudo command later on so that the user falko can compile and install the rpm packages. But first, we must allow falko to run all commands using sudo: Run visudo In the file that opens there's a line root ALL=(ALL) ALL. Add a similar line for falko just below that line:
Now we are ready to build our rpm package. First become the user falko: su falko Next we create our build environment: mkdir $HOME/rpm echo "%_topdir $HOME/rpm" >> $HOME/.rpmmacros Now we create a downloads directory and download the source files from http://www.courier-mta.org/download.php: mkdir $HOME/downloads wget https://sourceforge.net/projects/courier/files/authlib/0.63.0/courier-authlib-0.63.0.tar.bz2/download (Please note that I use Courier-IMAP 4.9.3 here instead of the newer 4.10.0 because 4.10.0 depends on systemctl which exists for Fedora, but not for CentOS.) Now (still in $HOME/downloads) we can build courier-authlib: sudo rpmbuild -ta courier-authlib-0.63.0.tar.bz2 After the build process, the rpm packages can be found in /root/rpmbuild/RPMS/x86_64 (/root/rpmbuild/RPMS/i686 if you are on an i686 system). The command sudo ls -l /root/rpmbuild/RPMS/x86_64 shows you the available rpm packages: [falko@server1 downloads]$ sudo ls -l /root/rpmbuild/RPMS/x86_64 Select the ones you want to install, and install them like this: sudo rpm -ivh /root/rpmbuild/RPMS/x86_64/courier-authlib-0.63.0-1.el6.x86_64.rpm /root/rpmbuild/RPMS/x86_64/courier-authlib-mysql-0.63.0-1.el6.x86_64.rpm /root/rpmbuild/RPMS/x86_64/courier-authlib-devel-0.63.0-1.el6.x86_64.rpm Now we go back to our downloads directory: cd $HOME/downloads Run the following commands to create required directories/change directory permissions (because otherwise the build process for Courier-Imap will fail): sudo mkdir -p /var/cache/ccache/tmp Now run rpmbuild again, this time without sudo, otherwise the compilation will fail because it was run as root: rpmbuild -ta courier-imap-4.9.3.tar.bz2 After the build process, the rpm packages can be found in $HOME/rpm/RPMS/x86_64 ($HOME/rpm/RPMS/i686 if you are on an i686 system): cd $HOME/rpm/RPMS/x86_64 The command ls -l shows you the available rpm packages: [falko@server1 x86_64]$ ls -l You can install courier-imap like this: sudo rpm -ivh courier-imap-4.9.3-1.x86_64.rpm Now we go back to our downloads directory: cd $HOME/downloads and run rpmbuild again, this time to build a maildrop package: sudo rpmbuild -ta maildrop-2.5.5.tar.bz2 After the build process, the rpm packages can be found in /root/rpmbuild/RPMS/x86_64 (/root/rpmbuild/RPMS/i686 if you are on an i686 system). The command sudo ls -l /root/rpmbuild/RPMS/x86_64 shows you the available rpm packages: [falko@server1 downloads]$ sudo ls -l /root/rpmbuild/RPMS/x86_64 You can now install maildrop like this: sudo rpm -ivh /root/rpmbuild/RPMS/x86_64/maildrop-2.5.5-1.x86_64.rpm After you have compiled and installed all needed packages, you can become root again by typing exit Now start Courier-IMAP/-POP3 as follows: /etc/init.d/courier-imap start
11 Install PostfixPostfix can be installed as follows: yum install postfix Then turn off Sendmail and start Postfix and MySQL: chkconfig --levels 235 mysqld on chkconfig --levels 235 sendmail off
12 Install GetmailGetmail can be installed as follows: yum install getmail
13 Set MySQL Passwords And Configure phpMyAdminSet passwords for the MySQL root account: mysql_secure_installation [root@server1 tmp]# mysql_secure_installation Now we configure phpMyAdmin. We change the Apache configuration so that phpMyAdmin allows connections not just from localhost (by commenting out the <Directory "/usr/share/phpmyadmin"> stanza): vi /etc/httpd/conf.d/phpmyadmin.conf
Next we change the authentication in phpMyAdmin from cookie to http: vi /usr/share/phpmyadmin/config.inc.php
Then we create the system startup links for Apache and start it: chkconfig --levels 235 httpd on Now you can direct your browser to http://server1.example.com/phpmyadmin/ or http://192.168.0.100/phpmyadmin/ and log in with the user name root and your new root MySQL password.
|



Recent comments
20 hours 52 min ago
1 day 3 hours ago
1 day 7 hours ago
1 day 9 hours ago
1 day 17 hours ago
2 days 2 hours ago
2 days 3 hours ago
2 days 7 hours ago
2 days 11 hours ago
2 days 12 hours ago