把 Open WebMail 升级了一下,不过好像没多大变化。
查看全文可以看更新记录(包括原先2.21版本的安装记录)。
1. Download main package
<
2. Check and download the required packages
<
===========================================
REQUIREMENT
-----------
Apache web server with cgi enabled
Perl 5.005 or above
CGI.pm-2.74.tar.gz (required)
MIME-Base64-2.12.tar.gz (required)
libnet-1.0901.tar.gz (required)
Text-Iconv-1.2.tar.gz (required)
libiconv-1.9.1.tar.gz (required if system doesn't support iconv)
CGI-SpeedyCGI-2.22.tar.gz (optional)
Compress-Zlib-1.21.tar.gz (optional)
ispell-3.1.20.tar.gz (optional)
Quota-1.4.6.tar.gz (optional)
Authen-PAM-0.12.tar.gz (optional)
ImageMagick-5.5.3.tar.gz (optional)
===========================================
ps: It is reported that Open Webmail will hang in attachment uploading
when used with older version of CGI module. We recommend using CGI
version 2.74 or above for Open WebMail.
To check the version of your CGI module :
perl -MCGI -e 'print $CGI::VERSION'
My Version: 2.89
PASS...
******************************
MIME-Base64 do the following:
******************************
cd /tmp
tar -zxvf MIME-Base64-2.12.tar.gz
cd MIME-Base64-2.12
perl Makefile.PL
make
make install
ps: Though you may already have the MIME-Base64 perl module,
we recommended you install MIME-Base64 module from source.
This would enable the XS support in this module which greatly
improves the encoding/decoding speed of MIME attachment.
***************************
**********libnet***********
***************************
cd /tmp
tar -zxvf libnet-1.0901.tar.gz
cd libnet-1.0901
perl Makefile.PL (ans 'no' if asked to update configuration)
make
make install
My Installation:
I think i should pass this step
*****************************
** MIME-Base64-2.20.tar.gz **
*****************************
http://openwebmail.com/openwebmail/download/packages/MIME-Base64-
2.20.tar.gz
tar -zxvf MIME-Base64-2.12.tar.gz
cd MIME-Base64-2.12
perl Makefile.PL
make
make install
Install Completed.
*****************************
** Text-Iconv-1.2 **
*****************************
For Text-Iconv-1.2 do the following:
Since Text-Iconv-1.2 is actually a perl interface to the underlying
iconv()
support, you have to check if iconv() support is available in your
system.
Please type the following command
man iconv
My Installation: EXISTS
PASS...
INSTALL OPENWEBMAIL
-------------------
1. tar -zxvBpf openwebmail-X.XX.tgz
mv data/ /home/dalouis/public_html/webmail
rmdir data
2. cd /刚才的解压目录/cgi-bin/openwebmail
modify auth_unix.pl
a. set variable $unix_passwdfile_encrypted to '/etc/shadow'
b set variable $unix_passwdmkdb to 'none'
c. do not change my $unix_passwdfile_plaintext="/etc/passwd";
2.1 对于 2.3版本
cd /刚才的解压目录/cgi-bin/openwebmail/etc
edit etc/auth_unix.conf (from etc/auth_unix.conf.default)
set passwdfile_encrypted to /etc/shadow
passwdmkdb to none
3. modify /var/www/cgi-bin/openwebmail/etc/openwebmail.conf
a,b,c. set
mailspooldir /var/spool/mail
ow_cgidir /home/dalouis/public_html/cgi-bin/webmail
ow_cgiurl /cgi-bin/webmail
ow_htmldir /home/dalouis/public_html/webmail
ow_htmlurl /webmail
logfile /var/log/openwebmail.log
spellcheck /usr/bin/ispell
d. change default_signature for your need
e. other changes you want
3.1 对于 2.3版本
cd etc
edit openwebmail.conf:
set mailspool to /var/spool/mail
ow_cgidir to /home/dalouis/public_html/cgi-bin/webmail
ow_cgiurl to /cgi-bin/webmail
ow_htmldir to /home/dalouis/public_html/webmail
ow_htmlurl to /webmail
spellcheck to /usr/bin/aspell
default_language to zh_CN.GB2312
4. add
/var/log/openwebmail.log {
postrotate
/usr/bin/killall -HUP syslogd
endscript
}
to /etc/logrotate.d/syslog to enable logrotate on openwebmail.log
5. execute /var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init
5.1 对于 2.3版本 会出现以下信息
<
Please change '/home/dalouis/public_html/cgi-bin/webmail/etc/dbm.conf'
from
dbm_ext .db
dbmopen_ext none
dbmopen_haslock no
to
dbm_ext .pag
dbmopen_ext none
dbmopen_haslock yes
And execute '/home/dalouis/public_html/cgi-bin/webmail/openwebmail-tool.pl
--init' again!
ps: If you are running openwebmail in persistent mode,
don't forget to 'touch openwebmail*.pl', so speedycgi
will reload all scripts, modules and conf files in --init.
PS: dbm.conf 来自 dbm.conf.default
重新运行 /home/dalouis/public_html/cgi-bin/webmail/openwebmail-tool.pl --
init 后出现
<
[root@dalouis etc]# /home/dalouis/public_html/cgi-bin/webmail/openwebmail
-tool.pl --init
creating db /home/dalouis/public_html/cgi-bin/webmail/etc/b2g ...done.
creating db /home/dalouis/public_html/cgi-bin/webmail/etc/g2b ...done.
creating db /home/dalouis/public_html/cgi-bin/webmail/etc/lunar ...done.
Welcome to the Open WebMail!
This program is going to send a short message back to the developer,
so we could have the idea that who is installing and how many sites are
using this software, the content to be sent is:
OS: Linux 2.4.20-30.9smp i686
Perl: 5.008002
WebMail: Open WebMail 2.30 20040414
Send the site report?(Y/n) n
Thank you.
-----------------------------------------------------------
遇到关于perl 的很多问题,解决方法是用tarball 安装新的perl
这里有很多类似的问题和解答
Q: I got "Internal server error" when running Open WebMail?
I got "can not do setuid" error?
I got "Software error: Can't locate etc/openwebmail.conf in @INC"
error?
A: There are many possible answers...
1. Please check if you have installed a complete set of perl 5.005 or
above.
and You have uncompressed the openwebmail-1.xx.tgz with proper
parameter.
It should be "tar -zxvBpf openwebmail-1.xx.tgz"
2. Your openwebmail scripts may have wrong owner or mode.
The permission of all openwebmail*.pl should be
mode=4555
owner=root
group=mail
3. Your perl may be compiled with suid ability disabled.
a. check if you have a executable of suidperl,
then 'chmod 4555 suidperl'
b. Or recompile your perl with suid enabled
Here are the steps:
*****************IMPORTANT!!***********************
1. grab the perl source tar ball
2. sh Configure -de (de means default perl config)
3. edit config.sh and set this :
d_dosuid='define'
d_suidsafe='undef'
INSTALL PERL 5.8
rm -f config.sh Policy.sh
sh Configure -de
make
make test
make install
4. then make, make install (make suidperl if needed)
5. if you have compiled suidperl, then chmod 4555 suidperl
if you don't have suidperl, change #!/usr/bin/suidperl to
the path of your perl
(thanks to Nemo Kaiser, nemoo.AT.users.sourceforge.net)
***********************************************
c. Or use uty/suidwrap.pl to generate C wrappers for all suid
scripts.
Here are the steps:
1. cd cgi-bin/openwebmail
2. perl uty/wrapsuid.pl /fullpath/cgi-bin/openwebmail
3. change #!/usr/bin/suidperl to the path of your perl
All suid scripts will be renamed to .scriptname.pl and
the C wrapper will be generated and named as script.pl
(thanks to Chris Heegard, heegard.AT.NativeI.com)
ps: If you use the wrappers for the suid scripts on the Solaris,
and the spelling check doesn't work not work
You may need to recompile your perl with suid enabled
instead of using C wrappers.
(thanks to Isam Ishaq, isam.AT.planet.edu)
-------------------------------------
装完以后,发现 suidperl 在 /usr/local/bin/ 下面 而不是默认的
/usr/bin/ 下面,于是
<
ln /usr/local/bin/suidperl /usr/bin/suidperl
做个链接,然后再运行
<
[root@dalouis webmail]# openwebmail-tool.pl --init
Please change the following 3 options in openwebmail.conf
from
dbm_ext .db
dbmopen_ext %dbm_ext%
dbmopen_haslock 0
to
dbm_ext .pag
dbmopen_ext none
dbmopen_haslock yes
And execute './openwebmail-tool.pl --init' again!.
--
Shengzhou Dalouis Garment CO, LTD. (http://www.dalouis.com)
<
[root@dalouis webmail]# openwebmail-tool.pl --init
creating /home/dalouis/public_html/cgi-bin/webmail/etc/b2g.pag ...done.
creating /home/dalouis/public_html/cgi-bin/webmail/etc/g2b.pag ...done.
creating /home/dalouis/public_html/cgi-bin/webmail/etc/lunar.pag ...done.
Welcome to the Open WebMail!
This program is going to send a short message back to the developer,
so we could have the idea that who is installing and how many sites are
using this software, the content to be sent is:
OS: Linux 2.4.20-20.9smp i686
Perl: 5.008002
WebMail: Open WebMail 2.21 20031110
Send the site report?(Y/n) n
Thank you.
发现Text/Iconv.pm 和 libiconv-1.9.1.tar.gz没有装!!!!
tar -zxvf Text-Iconv-1.2.tar.gz
cd Text-Iconv-1.2
perl Makefile.PL
make
make test
http://openwebmail.com/openwebmail/download/packages/libiconv-1.9.1.tar.gz
原因是:
我的perl一开始是用rpm包装的 所以和这个tar包装的libiconv 和iconv.pm 的
路径不同
rpm 是在/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Text
而tarball 是在/usr/local/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/Text
*******************************************************
ps: if your system is FreeBSD, or you just installed libiconv manually,
please edit the Makefile.PL and change the LIBS and INC lines
to the following before doing 'perl Makefile.PL'
'LIBS' => ['-L/usr/local/lib -liconv'], # e.g., '-lm'
'INC' => '-I/usr/local/include', # e.g., '-
I/usr/include/other'
还是再看看安装perl5
<
-----------------------------------
Installation prefix
By default, for most systems, perl will be installed in
/usr/local/{bin, lib, man}. (See L<"Installation Directories">
and L<"Coexistence with earlier versions of perl5"> below for
further details.)
You can specify a different 'prefix' for the default installation
directory, when Configure prompts you or by using the Configure command
line option -Dprefix='/some/directory', e.g.
sh Configure -Dprefix=/opt/perl
-----------------------------------
As a final catch-all, Configure also offers an $otherlibdirs
variable. This variable contains a colon-separated list of additional
directories to add to @INC. By default, it will be empty.
Perl will search these directories (including architecture and
version-specific subdirectories) for add-on modules and extensions.
For example, if you have a bundle of perl libraries from a previous
installation, perhaps in a strange place:
Configure -Dotherlibdirs=/usr/lib/perl5/site_perl/5.6.1
=item APPLLIB_EXP
There is one other way of adding paths to @INC at perl build time, and
that is by setting the APPLLIB_EXP C pre-processor token to a colon-
separated list of directories, like this
sh Configure -Accflags='-DAPPLLIB_EXP=\"/usr/libperl\"'
我运行的是 sh Configure -Dprefix=/usr/ -de
然后
edit config.sh and set this :
d_dosuid='define'
d_suidsafe='undef'
然后
make
出错信息
<
Can't locate Text/Iconv.pm in @INC (@INC contains:
/usr/lib/perl5/5.8.2/i686-linux /usr/lib/perl5/5.8.2
/usr/lib/perl5/site_perl/5.8.2/i686-linux /usr/lib/perl5/site_perl/5.8.2
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl
/home/dalouis/public_html/cgi-bin/webmail) at
/home/dalouis/public_html/cgi-bin/webmail/iconv.pl line 7.
BEGIN failed--compilation aborted at /home/dalouis/public_html/cgi-
bin/webmail/iconv.pl line 7.
原来是!!!
在安装 Text::ICONV 的时候
把配置文件 'INC' => '-I/usr/lib/perl5/5.8.2', 一下
就是把INC包括现有的PERL程序!!!!
考!
评论 (1 条)
匿名
2006年04月10日 17:10
发表于 2006 年 04 月 10 日 17:10
macoto
註冊時間: 2005-04-06
文章: 4
發表於: 星期日 七月 31, 2005 6:12 pm 文章主題:
--------------------------------------------------------------------------------
Dear all:
解決了openwebmail問題了..真是開心呀..
下載
http://openwebmail.org/openwebmail/download/packages/Text-Iconv-1.2.tar.gz
依照README閱讀,安裝後.就可以使用了 ^^