文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>postfix 与mysql 在不同的机器上

postfix 与mysql 在不同的机器上

时间:2006-08-08  来源:huanghaojie

参考我的blog http://blog.chinaunix.net/u/7869/showart.php?id=97674, 我把改动的地方写出来,没改的就是和blog 一样
a,b 机器的系统是centos4.3
在b 机器上
  1.  到http://mysql.oss.eznetsols.org/Downloads/MySQL-5.0/  上下载
     1)MySQL-devel-standard-5.0.24-0.rhel4.i386.rpm           #rpm -ivh  MySQL-devel-standard-5.0.24-0.rhel4.i386.rpm
     2) MySQL-shared-standard-5.0.24-0.rhel4.i386.rpm           #rpm -ivh --nodeps MySQL-shared-standard-5.0.24-0.rhel4.i386.rpm
     3) mysqlclient10-3.23.58-4.RHEL4.1.i386.rpm               #rpm -ivh mysqlclient10-3.23.58-4.RHEL4.1.i386.rpm
     4) mysqlclient10-devel-3.23.58-4.RHEL4.1.i386.rpm          #rpm -ivh mysqlclient10-devel-3.23.58-4.RHEL4.1.i386.rpm

  2. 安装 cyrus-sasl
     #cd cyrus-sasl
     #./configure \
        --disable-anon -enable-plain --enable-login \
        --enable-sql \
        --with-mysql-includes=/usr/include/mysql \
        --with-mysql-libs=/usr/lib/mysql \
        --with-authdaemond
     # make
     # make install
   
  3. 安装 postfix
     # cd postfix
     # make -f Makefile.init makefiles \
        'CCARGS=-DHAS_MYSQL -I/usr/include/mysql -DUSE_SASL_AUTH -I/usr/local/include/sasl' \
        'AUXLIBS=-L/usr/lib/mysql -lmysqlclient -lz -lm -L/usr/local/lib -lsasl2'
     # make install

  4. 安装postfixadmin                  如何不安装postfixadmin的话,哪位高手知道如何创建mail account.
     # cd /var/www/postfixadmin
     把/var/www/postfixadmin/DATABASE_MYSQL.TXT 文件 cp 到 a机器上,然后运行 # mysql -u root < DATABASE_MYSQL.TXT

     #  vi config.inc.php
      $CONF['database_host'] = 'localhost'; 把locahost 改成a 机器的主机名 or IP
      $CONF['database_host'] = 'coventry';   我的a机器名叫 coventry
   
  5. 然后登录到a机器

     # mysql
     > grant all on postfix.* to "postfix"@"cambridge" identified "postfix';        ###cambridge为 b机器名  
     > grant all on postfix.* to "postfixadmin"@"cambridge" identified "postfixadmin';    ###cambridge为 b机器名
     > exit
  
  6. 回到b机器
     # vi /etc/postfix/main.cf
        myhostname = www.test.com     换成自己的域名
        mydomain = test.com

  7. 修改/etc/postfix/mysql/ 目录下的四个文件,把四个文件中的 hosts = localhost 改成 host = coventry(a的机器名)

  8. 安装Courier-authlib 0.57
    # cd courier-a ./configure \
       --with-redhat \
       --with-authmysql=yes \
       --with-mailuser=vmail --with-mailgroup=vmail \
       --with-mysql-libs=/usr/lib/mysql --with-mysql-includes=/usr/include/mysql/uthlib
    # make  #make install  # make install-configure

    # vi /usr/local/etc/authlib/authmysqlrc
       把 MYSQL_SERVER localhost 改成 MYSQL_SERVER coventry(a的主机名)

其它不变。
相关阅读 更多 +
排行榜 更多 +
进击的小动物安卓版

进击的小动物安卓版

飞行射击 下载
进攻yalghaar

进攻yalghaar

飞行射击 下载
深空战场

深空战场

飞行射击 下载