Before installation, check that the RedHatEnterpriseLinux5.4 system has compiled and installed the LAMP architecture compilation and installation postfix. because the system has the postfix installed by rpm, You Need To uninstall it and stop sendmail, then you can start the installation. Servicesendmailstop: chkconfigsend is disabled currently.
Before installation, check that the compiled LAMP architecture has been installed in the Red Hat Enterprise Linux 5.4 system.
Compile and install postfix
Because the system has the postfix installed by rpm, You Need To uninstall it and stop the sendmail service before you can start the installation.
Service sendmail stop is currently disabled
Chkconfig sendmail off permanently disabled
(1) download the source code package from the official site http://mirror.postfixchina.org, postfix-2.4.6.tar.gz, and download the patch package from the site http://vda.sourceforge.org postfix-2.4.6-vw.ng.patch.gz
Create postfix users and groups:
# Groupadd-g 1200 postdrop
# Groupadd-g 1000 postfix
# Useradd-u 1000-g postfix-G postdrop postfix
(2) decompress and release the source code package
# Tar zxvf postfix-2.4.6.tar.gz-C/usr/src
# Gunzip postfix-2.4.6-vda-ng.patch.gz
# Cd postfix 2.4.6
# Patch-p1 </patch directory/postfix-2.4.6-vda-ng.patch
(3) pre-compiled configuration parameters
[Root @ mail postfix-2.4.6] # make makefiles \
> 'Ccargs =-DHAS_MYSQL-I/usr/local/mysql/include/mysql \
>-DUSE_SASL_AUTH \
>-DUSE_CYRUS_SASL-I/usr/include/sasl '\
> 'Auxlibs =-L/usr/local/mysql/lib/mysql-lmysqlclient-lz-lm \
>-L/usr/lib/sasl2-lsasl2'
Note: "\" is the line feed mark of the command. Because the command is too long, use "\" to line the input.
CCARGS parameter: provides additional parameters (C-language Compiler Arguments) for the C language Compiler. The-I option (uppercase letter I) specifies the directory where the additional header files are stored.
AUXLIBS parameter: indicates an additional/auxiliary function library (Auxiliaries Libraries) located outside the standard location. "l" in-lmysqlclient,-lz,-lm, and-lsasl2 is the lowercase letter of L.
(4) make compilation and make install
During the installation, you will encounter some configuration parameters. Press enter directly.