Installing Postfix on CentOS
CentOS Linux come with two default email
(MTA) packages:-
The default MTA package of CentOS is
Sendmail. If you have Sendmail installed earlier, you need Changing Default CentOS Mail System (MTA)
to Postfix. The following example shows that the Sendmail was
installed.
rpm -qa sendmail
sendmail-8.13.8-2.el5
rpm
-qa postfix
|
Option A : Install via Internet
If your CentOS Linux Mail Server is connected to
internet, you can install the package using yum command
Option B: Install via DVD media
Step1: Install all dependencies
Let us try to install postfix. It
seem like we need some quite a number dependencies.
rpm -iUvh postfix*
warning: postfix-2.3.3-2.1.el5_2.i386.rpm: Header V3 DSA signature:
NOKEY, key ID e8562897
error: Failed dependencies:
perl(Date::Calc) is needed by
postfix-pflogsumm-2.3.3-2.1.el5_2.i386
perl-Date-Calc is needed by postfix-pflogsumm-2.3.3-2.1.el5_2.i386
[root@srv2 CentOS]# rpm -iUvh perl-Date-Calc
error: open of perl-Date-Calc failed: No such file or directory
rpm -iUvh
perl-Date-Calc*
warning: perl-Date-Calc-5.4-1.2.2.1.i386.rpm: Header V3 DSA
signature: NOKEY, key ID e8562897
error: Failed dependencies:
perl(Bit::Vector) is needed by perl-Date-Calc-5.4-1.2.2.1.i386
perl(Carp::Clan) is needed by perl-Date-Calc-5.4-1.2.2.1.i386
perl-Bit-Vector >= 6.4 is needed by perl-Date-Calc-5.4-1.2.2.1.i386
rpm -iUvh
perl-Date-Calc* perl-Bit-Vector
warning: perl-Date-Calc-5.4-1.2.2.1.i386.rpm: Header V3 DSA
signature: NOKEY, key ID e8562897
error: open of perl-Bit-Vector failed: No such file or directory
rpm -iUvh
perl-Date-Calc* perl-Bit-Vector*
warning: perl-Date-Calc-5.4-1.2.2.1.i386.rpm: Header V3 DSA
signature: NOKEY, key ID e8562897
error: Failed dependencies:
perl(Carp::Clan) is needed by perl-Date-Calc-5.4-1.2.2.1.i386
perl(Carp::Clan) is needed by perl-Bit-Vector-6.4-2.2.2.1.i386
perl-Carp-Clan >= 5.3 is needed by perl-Bit-Vector-6.4-2.2.2.1.i386 |
Now let us install the required depencies.
rpm -iUvh perl-Date-Calc* perl-Bit-Vector* perl-Carp-Clan*
warning: perl-Date-Calc-5.4-1.2.2.1.i386.rpm: Header V3 DSA
signature: NOKEY, key ID e8562897
Preparing... ########################################### [100%]
1:perl-Carp-Clan ########################################### [ 33%]
2:perl-Bit-Vector ########################################### [
67%]
3:perl-Date-Calc ########################################### [100%] |
Step2: Install postfix package
rpm -iUvh postfix*
warning: postfix-2.3.3-2.1.el5_2.i386.rpm: Header V3 DSA signature:
NOKEY, key ID e8562897
Preparing... ########################################### [100%]
1:postfix ########################################### [ 50%]
2:postfix-pflogsumm ###########################################
[100%] |
Step3: verify the postfix
installed
Verify the package installed. "rpm -qi"
command give you the packages installed information.
rpm -qi postfix
Name : postfix Relocations: (not relocatable)
Version : 2.3.3 Vendor: CentOS
Release : 2.1.el5_2 Build Date: Thu 14 Aug 2008 05:06:38 PM EDT
Install Date: Thu 03 Dec 2009 07:07:41 AM EST Build Host:
builder16.centos.org
Group : System Environment/Daemons Source RPM:
postfix-2.3.3-2.1.el5_2.src.rpm
Size : 8332580 License: IBM Public License
Signature : DSA/SHA1, Fri 15 Aug 2008 06:59:49 AM EDT, Key ID
a8a447dce8562897
URL : http://www.postfix.org
Summary : Postfix Mail Transport Agent
Description :
Postfix is a Mail Transport Agent (MTA), supporting LDAP, SMTP AUTH
(SASL),TLS
rpm -qa postfix
postfix-2.3.3-2.1.el5_2
|
Step4 : Start your postfix
Start your postfix daemon by using using
"service posfix start" . We want to make the postfix automatic
start at level 2,3, 4 and 5, we use "chkconfig postfix on"
service postfix start
Starting postfix: [ OK ]
chkconfig
postfix on
chkconfig
--list postfix
postfix 0:off 1:off 2:on 3:on 4:on 5:on 6:off
|
Note
1. Although both mail server packages (Sendmail and
Postfix) are compatible with each other. I strongly suggest you remove
Sendmail packages to only allow one mail system in the sever.
2. Due to CentOS Linux needs minimum one mail server
installed. You must make sure that you installed Postfix first then
remove Sendmail! Else, you will faced with some libraries dependencies
issues.
To remove Sendmail packages, please use rpm -e command
|