The Perfect Server - CentOS 4.7 Server - Page 5
10 Postfix With SMTP-AUTH And TLSNow we install Postfix and dovecot (dovecot will be our POP3/IMAP server): yum install cyrus-sasl cyrus-sasl-devel cyrus-sasl-gssapi cyrus-sasl-md5 cyrus-sasl-plain postfix dovecot Next we configure SMTP-AUTH and TLS: postconf -e 'smtpd_sasl_local_domain =' We must edit /usr/lib/sasl2/smtpd.conf so that Postfix allows PLAIN and LOGIN logins. On a 64Bit Centos 4.7 you must edit the file /usr/lib64/sasl2/smtpd.conf instead. It should look like this: vi /usr/lib/sasl2/smtpd.conf
Afterwards we create the certificates for TLS: mkdir /etc/postfix/ssl chmod 600 smtpd.key openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt openssl rsa -in smtpd.key -out smtpd.key.unencrypted mv -f smtpd.key.unencrypted smtpd.key Next we configure Postfix for TLS: postconf -e 'smtpd_tls_auth_only = no' Then we set the hostname in our Postfix installation (make sure you replace server1.example.com with your own hostname): postconf -e 'myhostname = server1.example.com' After these configuration steps you should now have a /etc/postfix/main.cf that looks like this (I have removed all comments from it): cat /etc/postfix/main.cf
By default, CentOS' dovecot daemon provides only IMAP and IMAPs services. Because we also want POP3 and POP3s we must configure dovecot to do so. We edit /etc/dovecot.conf and put the line protocols = imap imaps pop3 pop3s into it: vi /etc/dovecot.conf
Now start Postfix, saslauthd, and dovecot: chkconfig --levels 235 sendmail off To see if SMTP-AUTH and TLS work properly now run the following command: telnet localhost 25 After you have established the connection to your Postfix mail server type ehlo localhost If you see the lines 250-STARTTLS and 250-AUTH LOGIN PLAIN everything is fine. [root@server1 ssl]# telnet localhost 25 Type quit to return to the system's shell.
10.1 Maildirdovecot uses Maildir format (not mbox), so if you install ISPConfig on the server, please make sure you enable Maildir under Management -> Server -> Settings -> Email. ISPConfig will then do the necessary configuration. If you do not want to install ISPConfig, then you must configure Postfix to deliver emails to a user's Maildir: postconf -e 'home_mailbox = Maildir/'
11 Apache2 With PHP, Ruby, PythonNow we install Apache with PHP (this is PHP 4.3.9; CentOS does not provide PHP5 packages): yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel Then edit /etc/httpd/conf/httpd.conf: vi /etc/httpd/conf/httpd.conf and change DirectoryIndex to
Now configure your system to start Apache at boot time: chkconfig --levels 235 httpd on Start Apache: /etc/init.d/httpd start
11.1 Disable PHP Globally(If you do not plan to install ISPConfig on this server, please skip this section!) In ISPConfig you will configure PHP on a per-website basis, i.e. you can specify which website can run PHP scripts and which one cannot. This can only work if PHP is disabled globally because otherwise all websites would be able to run PHP scripts, no matter what you specify in ISPConfig. To disable PHP globally, we edit /etc/httpd/conf.d/php.conf and comment out the AddType line: vi /etc/httpd/conf.d/php.conf
Afterwards we restart Apache: /etc/init.d/httpd restart
11.2 Installing mod_rubyFor CentOS 4.7, there's no mod_ruby package available, so we must compile it ourselves. First we install some prerequisites: yum install httpd-devel ruby ruby-devel Next we download and install mod_ruby as follows: cd /tmp Finally we must add the mod_ruby module to the Apache configuration, so we create the file /etc/httpd/conf.d/ruby.conf... vi /etc/httpd/conf.d/ruby.conf
... and restart Apache: /etc/init.d/httpd restart
11.3 Installing mod_pythonTo install mod_python, we simply run... yum install mod_python ... and restart Apache afterwards: /etc/init.d/httpd restart
|
Join the discussion.
www.seamlessenterprise.com
IP Convergence
Integrate your wireless and wireline networks.
Learn how from the experts at Sprint.
www.seamlessenterprise.com
Wireless & Wireline Integration
Thoughts, strategies and solutions: join the discussion
www.seamlessenterprise.com
Unified Communications 2009
Join the Discussion. Now.
www.seamlessenterprise.com





print: 
Recent comments
4 hours 21 min ago
6 hours 4 min ago
8 hours 30 min ago
8 hours 36 min ago
13 hours 10 min ago
15 hours 10 min ago
18 hours 34 min ago
20 hours 41 min ago
20 hours 51 min ago
23 hours 18 min ago