FreeBSD 研习课程讲义
Prev Next

Open WebMail 安装


Open WebMail 官方站台

Open WebMail 的官方网址是 http://openwebmail.org/, 这部机器位於美国 Spring Link 骨干上
的机房, 是由热心的网友 Daniel Pentecost还有他的公司 Norvasen Pentecost Inc. 所完全免
费提供, 目前并由网友 Thomas Chung 负责整个网站的运行与维护. 在发展 Open WebMail的
过程中, 受到许许多多来自世界各地朋友的帮助, 实在是感动良多, 真的让人有一种世界村, 
天涯若比邻的感觉。
至於 http://turtle.ee.ncku.edu.tw/openwebmail  则是程式发展的中心, 所有最新的程式码都是在
这里测试完后才开始对外公布, 不过这边只有 Perl 原始码的 tgz file, 并没有像官方站台会提
供Linux 的快速安装 RPM package.

 

Open WebMail 安装需求

 

安装套件(由 source 安装)

首先请先到 http://openwebmail.org/openwebmail/download/packages/下载上述的各个套件
并建立一个tmp资料夹,或任何一个你喜欢的资料夹来存放它们。

安装 CGI.pm 套件

cd /tmp
tar -zxvf CGI.pm-3.05.tar.gz
cd CGI.pm-3.05
perl Makefile.PL
make
make install


安装 MIME-Base64 套件

cd /tmp
tar -zxvf MIME-Base64-3.01.tar.gz
cd MIME-Base64-3.01
perl Makefile.PL
make
make install

备注】虽然您的机器可能已经安装了 MIME-Base64 这个套件, 还是建议您从 source 重新装一次. 这样做的话, 
                可以确定 MIME-Base64中的 XS 支援有被启动, 可以大幅地增加处理 MIME 附件编码与解码的速度


安装 libnet 套件

cd /tmp
tar -zxvf libnet-1.91.tar.gz
cd libnet-1.91
perl Makefile.PL (ans "no" if asked  to update configuration)
make
make install

安装 libiconv 套件

cd /tmp
tar -zxvf  libiconv-1.9.1.tar.gz
cd libiconv-1.9.1
./configure 
make
make instal


安装 Text-Iconv-1.2 套件

openwemail 自 1.80 版以后开始支援多国的字集转换功能(如: 中文的简繁转换, 日文的 
Shif-JIS/ISO-2022-JP/EUC-JP 转换, 或是各种字集对 Unicode (UTF-8) 的转换), 这个转换
的动作是透过Text-Icon 套件来完成的. 

cd /tmp
tar -zxvf Text-Iconv-1.2.tar.gz
cd Text-Iconv-1.2 叁考下列
【备注1】
perl Makefile.PL

【备注1】如果您用的是 FreeBSD, 或是您刚才用手动安装 libiconv-1.9.1.tar.gz  这个套件, 请在执行 
                 perl Makefile.PL 之前, 先修改 Makefile.PL 档案, 将 LIBS 和 INC 这两行设定如下:
'LIBS' => ['-L/usr/local/lib -liconv'], # e.g., '-lm'
'INC' => '-I/usr/local/include', # e.g., '-I/usr/include/other'

make
make test

【备注2】如果 make test 失败, 代表您的 OS 不支援 iconv() 这个功能或是 Makefile.PL 中的 LIB, INC 设定有误. 
                 您可以将 uty/iconv.pl.fake 拷贝到 iconv.pl 这个档案上, 让 openwebmail不透过 iconv 进行字集转换. 
                 这样 简/繁转换功能会还在, 但是会丧失如 自动转换 UTF-8 格式信件的功能. 

make install

升级 perl

我们须先把perl升级到5.8.5或更新版本,才能完成安装OpenWebmail,方式如下: 
perl -v         (查看系统目前 perl 的版本)
#cd /usr/ports/lang/perl5.8

#make install clean

升级完之后,请用以下指令启动新版的perl,启动之后再用perl -v看看是否为新版本

#use.perl port
   

安装 Open WebMail

1. chmod 4555 /usr/bin/suidperl (不要忘了这步骤!!)

2. 方式一 :

    #cd /usr/local/www 

    #tar -zxvBpf  openwebmail-X.XX.tgz  
   
    #/usr/local/www/cgi-bin/openwebmail/openwebmail-tool.pl --init

   方式二 :

    #cd /usr/ports/mail/openwebmail/
 
    #make install

    #make clean
 http://openwebmail.org/openwebmail/download/ 下可以下载 Open WebMail 的各个 Release 版本
(openwebmail-x.yy.tar.tgz) 与最新的 current 版本 (openwebmail-current.tgz). Release 版本 是属於
经过测试后, 功能较为稳定的版本, 而 current 则是含有每日最新功能或修正的程式码.


问题分享

Q: 安装之后出现如下讯息:该怎麽办??

Installing /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/Quota.pm
Installing /usr/local/lib/perl5/5.00503/man/man3/Quota.3
Writing /usr/local/lib/perl5/site_perl/5.005/i386-freebsd/auto/Quota/.packlist
Appending installation info to /usr/local/lib/perllocal.pod
===> Compressing manual pages for p5-Quota-1.5.0
===> Registering installation for p5-Quota-1.5.0
===> Returning to build of openwebmail-2.50
===> openwebmail-2.50 depends on file: /usr/local/lib/perl5/site_perl/5.005/Ma
il/SpamAssassin.pm - not found
===> Verifying install for /usr/local/lib/perl5/site_perl/5.005/Mail/SpamAssa
ssin.pm in /usr/ports/mail/p5-Mail-SpamAssassin
===> p5-Mail-SpamAssassin-3.0.2 Needs perl 5.6.1 or higher, install lang/perl5.
8 and try again.
*** Error code 1

Stop in /usr/ports/mail/p5-Mail-SpamAssassin.
*** Error code 1

Stop in /usr/ports/mail/openwebmail.
*** Error code 1

Stop in /usr/ports/mail/openwebmail.
free182[/usr/ports/mail/openwebmail]#
A:把openwebmail先make deinstall ; make clean 再依照指示,把perl升级到5.85以上的版本,路径: /usr/ports/lang/perl5.8 接着再重新安装openwebmail即可


Q:安装完毕之后,网页显示如下错误

Internal Server Error 
The server encountered an internal error or misconfiguration and was unable to
complete your request.
Please contact the server administrator, you@your.address and inform them of t
he time the error occurred, and anything you might have done that may have cau
sed the error.
More information about this error may be available in the server error log.
A: 这应该与更新过新版的perl有关,可能一些程式和新的perl不太相容,可以使用portupgrade来解决问题。 portupgrade是一支提供由port、packages来升级或是安装新软体的工具。首先我们要先到ports下安装它, 路径: /usr/ports/sysutils/portupgrade 叁考网页:ohaha 安装完毕之后,用下列指令重新编译perl #portupgrade -f "perl-5.8.*" -m "ENABLE_SUIDPERL=yes" -r "perl-5.8.*" (*就看你机器本身的perl版本而定) 跑完之后应该就会正常显示了 ________________________________________________________________________
______________________ 指令说明:
-f "perl-5.8.*" 不论perl版本是相同,一律强迫更新。
-m "ENABLE_SUIDPERL=yes"             make时送出 ENABLE_SUIDPERL=yes 的叁数。
                                     建议写入 /usr/local/etc/pkgtools.conf里面。
-r "perl-5.8.*"                      把相依於 perl-5.8 的软体、程式一并作更新

______________________________________________________________________________________________
######把"ENABLE_SUIDPERL=yes"加入pkgtools.conf的方法######

vi /usr/local/etc/pkgtools.conf
在 MAKE_ARGS 区段加入以下的设定:

 'lang/perl5.8' => 'ENABLE_SUIDPERL=yes',

这样Perl版本随着portupgrade方式升级后,就不用再重装一次!


Prev Home Next
UP