一、安装前的准备工作:
1.卸载系统默认安装postfix
# service postfix stop # chkconfig postfix off # rpm -e postfix --nodeps
2.安装所需的rpm包,这包括以下这些
db4-devel, openssl-devel, cyrus-sasl-devel
二、启动依赖的服务:
1、启动mysql数据库,并给mysql的root用户设置密码:
# service mysqld start # chkconfig mysqld on # mysqladmin -uroot password ‘your_password‘
2、启动saslauthd服务,并将其加入到自动启动队列:
# service saslauthd start # chkconfig saslauthd on
三、安装配置postfix
# groupadd -g 2525 postfix # useradd -g postfix -u 2525 -s /sbin/nologin -M postfix # groupadd -g 2526 postdrop # useradd -g postdrop -u 2526 -s /sbin/nologin -M postdrop # tar zxvf postfix-2.9.3.tar.gz # cd postfix-2.9.3 # make makefiles ‘CCARGS=-DHAS_MYSQL -I/usr/local/mysql/include -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/include/sasl -DUSE_TLS ‘ ‘AUXLIBS=-L/usr/local/mysql/lib -lmysqlclient -lz -lm -L/usr/lib/sasl2 -lsasl2 -lssl -lcrypto‘ # make # make install
注:MySQL通过通用二进制安装在/usr/local/mysql下
按照以下的提示输入相关的路径([]号中的是缺省值,”]”后的是输入值,省略的表示采用默认值)
install_root: [/] / tempdir: [/root/postfix-2.9.3] /tmp/postfix config_directory: [/etc/postfix] /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]/var/www/html/postfix manpages: [/usr/local/man] readme_directory: [no]
时间: 2024-10-16 23:03:22