I. Installation of postfix Mail Service
Red Hat Enterprise Linux offers sendmail and postfix two kinds of stmp mail service software, allowing users to choose one of them at random! However, by default, Setup has installed SendMail on the system, and if you want to use Postfix, you must stop the SendMail service before you install the Postfix service software. The specific steps are as follows:
1). Check to see if the SendMail service has started
[Root@mail ~] #netstat-NUTLP | Grep:25
2>. Turn off the SendMail service and boot from the startup
[Root@mail ~]#/etc/rc.d/init.d/sendmail stop
[Root@mail ~] #chkconfig sendmail off
3> install Postfix service
Put Red Hat Enterprise Linux 5 's 3rd installation disk into the optical drive, load the optical drive, locate the postfix RPM installation package file postfix-2.3.3-2.i386.rpm in the disc's server directory, and then use
The following RPM installation:
[Root@mail ~] #rpm-ivh/mnt/server/postfix-2.3.3-2.i386.rpm
SOURCE Pack Installation:
[Root@mail ~]# groupadd-g 1000 postfix
[Root@mail ~]# useradd-m-u 1000-g postfix-g postdrop-s/sbin/nologin postfix
[Root@mail ~]# groupadd-g 1200 Postdrop
[Root@mail ~]# tar zxvf postfix-2.6.2.tar.gz
[Root@mail ~] #gunzip postfix-2.6.2-vda-ng.patch.gz
[Root@mail ~]# CD postfix-2.6.2
[Root@mail postfix-2.6.2] #patch-PL <. /postfix-2.6.2-vda-ng.patch
[Root@mail postfix-2.6.2] #make makefiles \ ' Ccargs=-dhas_mysql-i/usr/local/mysql/include/mysql-duse_sasl_auth-duse _cyrus_sasl-i/usr/local/include/sasl-i/usr/local/berkeleydb/include-duse_tls-i/usr/local/ssl/include/openssl ' auxlibs=-l/usr/local/mysql/lib/mysql-lmysqlclient-lz-lm-l/usr/local/lib-lsasl2-l/usr/local/berkeleydb/lib-l/ Usr/local/ssl/lib-lssl-lcrypto '
Among them, the compilation parameter Ccargs and Auxlibs function are as follows:
Ccargs parameter: Provides additional parameters for the compiler. The "-I" option indicates the storage directory of the standard extra header files. For example, MySQL and CYRUS-SASL header files are located in the directory:/usr/local/mysql/lib/mysql,/USR/INCLUDE/SASL.
Auxlibs parameter: Indicates an additional function library that is outside the standard location. If you need to link SASL, MySQL, or any additional library of functions, and they are not in a standard location (/usr/lib directory), you must indicate the path to these libraries in the Auxlibs parameter, for example, the MySQL and CYRUS-SASL library files are located in the directory:/usr /local/mysql/lib/mysql,/USR/LIB/SASL2.
[Root@mail postfix-2.6.2]# make
[Root@mail postfix-2.6.2]# make install
After you execute the make install command, you will need to set some installation parameters.
Follow the prompts below to enter the relevant path (the [] number is the default value, and the "]" is the input value)
Install_root: [/]/
TempDir: [/root/postfix-2.6.2]
Config_directory: [/etc/postfix]
Daemon_directory: [/usr/libexec/postfix]
Command_directory: [/usr/sbin]
Queue_directory: [/var/spool/postfix]
Sendmail_path: [/usr/sbin/sendmail]
Newaliases_path: [/usr/bin/newaliases]
Mailq_path: [/USR/BIN/MAILQ]
Mail_owner: [Postfix]
Setgid_group: [Postdrop]
Html_directory: [No]
Manpages: [/usr/local/man]
Readme_directory: [No]
Above to finish enter, the default automatic recognition settings. Postfix Compile installation Successful!
This article URL address: http://www.bianceng.cn/OS/Linux/201410/45499.htm