注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

曹兆领的博客

有志者事竟成,破釜沉舟,百二秦关终属楚!

 
 
 

日志

 
 

在solaris 10上安装openwebmail 2.0  

2010-08-05 23:21:30|  分类: solaris |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |


A.安装准备

1.安装环境:solaris 10(X86,sparc)

2.openwebmail版本为2.00,不建议使用2.4以上的版本,有问题,但不知道如何解决

3.操作用户为root,使用bash shell,.bash_profile内容如下:

PATH=$PATH:/usr/local/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin

export PATH

4.安装openwebmail前需安装以下组件:

CGI.pm-3.05.tar.gz

MIME-Base64-3.01.tar.gz

libnet-1.19.tar.gz

libiconv-1.9.1.tar.gz

Text-Iconv-1.2.tar.gz 

相关文件下载地址为:

http://turtle.ee.ncku.edu.tw/openwebmail/download/packages/

注:apache为solaris系统自带、sendmail已经正常运行。

B.开始安装

1.安装CGI.pm

#cd /mnt

#gunzip CGI.pm-3.05.tar.gz

#tar xvf CGI.pm-3.05.tar

#cd CGI.pm-3.05

#perl Makefile.PL

#make

#make install

检查已安装的CGI.pm

#perl –MCGI –e ‘print $CGI::VERSION’

3.05

#

2.安装MIME-Base64

#gunzip MIME-Base64-3.01.tar.gz

#tar xvf MIME-Base64-3.01.tar

#cd MIME-Base64-3.01

#perl Makefile.PL

#make

cc -c -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xO3 -xdepend -DVERSION=\"3.01\" -DXS_VERSION=\"3.01\" -KPIC -I/usr/perl5/5.6.1/lib/i86pc-solaris-64int/CORE Base64.c
gmake: cc: Command not found
gmake: *** [Base64.o] Error 127

如在make时出现以上提示错误信息,则需要修改Makefile文件:

#vi Makefile

将CCCDLFLAGS = -KPIC 中的 -KPIC 改成 –fPIC

将所有 CC = cc 中的cc 改成gcc

将所有 LD = cc 中的cc 改成gcc

将OPTIMIZE=后的内容改成-O2

保存后make

#make

#make install

3.安装libnet

#gunzip libnet-1.19.tar.gz

#tar xvf libnet-1.19.tar

#cd libnet-1.19

#perl Makefile.PL

Checking for Socket...ok

Checking for IO::Socket...ok

Checking if your kit is complete...

Looks good

Ah, I see you already have installed libnet before.

Do you want to modify/update your configuration (y|n) ? [no]

This script will prompt you to enter hostnames that can be used as

defaults for some of the modules in the libnet distribution.

To ensure that you do not enter an invalid hostname, I can perform a

lookup on each hostname you enter. If your internet connection is via

a dialup line then you may not want me to perform these lookups, as

it will require you to be on-line.

Do you want me to perform hostname lookups (y|n) ? [yes]

The following questions all require a list of host names, separated

with spaces. If you do not have a host available for any of the

services, then enter a single space, followed by <CR>. To accept the

default, hit <CR>

Enter a list of available NNTP hosts : []

Enter a list of available SMTP hosts : []

Enter a list of available POP3 hosts : []

Enter a list of available SNPP hosts : []

Enter a list of available PH Hosts   : []

Enter a list of available TIME Hosts   : []

Enter a list of available DAYTIME Hosts   : []

Do you have a firewall/ftp proxy  between your machine and the internet

If you use a SOCKS firewall answer no (y|n) ? [no]

Normally when FTP needs a data connection the client tells the server

a port to connect to, and the server initiates a connection to the client.

Some setups, in particular firewall setups, can/do not work using this

protocol. In these situations the client must make the connection to the

server, this is called a passive transfer.

Should all FTP connections be passive (y|n) ? [no]

What is your local internet domain name : []

If you specified some default hosts above, it is possible for me to

do some basic tests when you run `make test'

This will cause `make test' to be quite a bit slower and, if your

internet connection is via dialup, will require you to be on-line

unless the hosts are local.

Do you want me to run these tests (y|n) ? [yes]

To allow Net::FTP to be tested I will need a hostname. This host

should allow anonymous access and have a /pub directory

What host can I use : []

Writing libnet.cfg

Writing Makefile for Net

#make

#make install

4.安装liniconv

#gunzip libiconv-1.9.1.tar.gz

#tar xvf libiconv-1.9.1.tar

#cd libiconv-1.9.1

#./configure

#make

#make install

5.安装Text-Iconv

#gunzip Text-Iconv-1.2.tar.gz

#tar xvf Text-Iconv-1.2.tar

#cd Text-Iconv-1.2

#vi Makefile.PL

'LIBS' => [''], # e.g., '-lm'
'INC' => '', # e.g., '-I/usr/include/other'

改为:

LIBS' => ['-L/usr/local/lib -liconv'], # e.g., '-lm'
'INC' => '-I/usr/local/include', # e.g., '-I/usr/include/other'

#perl Makefile.PL

#make

cp Iconv.pm blib/lib/Text/Iconv.pm
AutoSplitting blib/lib/Text/Iconv.pm (blib/lib/auto/Text/Iconv)
/usr/bin/perl -I/usr/perl5/5.6.1/lib/i86pc-solaris-64int -I/usr/perl5/5.6.1/lib /usr/perl5/5.6.1/lib/ExtUtils/xsubpp -typemap /usr/perl5/5.6.1/lib/ExtUtils/typemap -typemap typemap Iconv.xs > Iconv.xsc && mv Iconv.xsc Iconv.c
cc -c -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -xO3 -xdepend -DVERSION=\"1.2\" -DXS_VERSION=\"1.2\" -KPIC -I/usr/perl5/5.6.1/lib/i86pc-solaris-64int/CORE Iconv.c
gmake: cc: Command not found
gmake: *** [Iconv.o] Error 127

如在make时出现以上提示错误信息,则需要修改Makefile文件:

#vi Makefile

将CCCDLFLAGS = -KPIC 中的 -KPIC 改成 –fPIC

将所有 CC = cc 中的cc 改成gcc

将所有 LD = cc 中的cc 改成gcc

将OPTIMIZE=后的内容改成-O2

保存后make

#make

#make install

6.安装openwebmail

#gunzip openwebmail-2.10.tar.gz

#tar xvf openwebmail-2.10.tar

# chmod 4755 /usr/sbin/perl (设置perl的suid为)

# ln -s /usr/sbin/perl /usr/sbin/suidperl (openwebmail默认用suidperl解释)

修改:/usr/httpd/cgi-bin/openwebmail/auth_unix.pl文件:

my $unix_passwdfile_plaintext="/etc/passwd";

my $unix_passwdfile_encrypted="/etc/shadow";

my $unix_passwdmkdb="none";

修改 /var/apache/cgi-bin/openwebmail/etc/openwebmail.conf (我的文件内容如下)

domainnames             auto

auth_module             auth_unix.pl

mailspooldir            /var/mail

dbm_ext                 .pag

dbmopen_ext             none

dbmopen_haslock         no

ow_cgidir               /var/apache/cgi-bin/openwebmail

ow_cgiurl               /cgi-bin/openwebmail

ow_htmldir              /var/apache/htdocs/openwebmail

ow_htmlurl              /openwebmail

logfile                 /var/log/openwebmail.log

spellcheck              /usr/local/bin/ispell

<default_signature>

--

Open WebMail Project (http://openwebmail.org)

</default_signature>

然后运行/var/apache/cgi-bin/openwebmail/openwebmail-tool.pl --init

#/var/apache/cgi-bin/openwebmail/./openwebmail-tool.pl –init

启动apache:

./apachectl start

验证是否安装成功,IE地址栏输入以下地址:

http://yourdomain(or ipaddress)/cgi-bin/openwebmail/openwebmail.pl

C.登陆错误提示:

Open WebMail ERROR 无法建立用户目录!/export/home/mailtest/mail

如在登陆过程中出现以上提示错误信息,则更改cgi-bin/openwebmail/etc/openwebmail.conf文件

将create_syshomedir       no

改为create_syshomedir       yes

参考资料:
Open WebMail 安装与设置 ---- http://turtle.ee.ncku.edu.tw/~tung/openwebmail/install.html
Open WebMail 进阶说明 ---- http://turtle.ee.ncku.edu.tw/~tung/openwebmail/advanced.html


可能出现的问题:用户目录的问题,CGI设置的问题

在最后openwebmail目录下

cp iconv.pl iconv.pl.bak

cp uty/iconv.pl.fake iconv.pl

1.在/etc目录下建立openwebmail_path.conf文件,写上安装目录
2.将openwebmail目录下的文件设置成 chmod 4755 * 属性
3.将sessions 目录设置成777属性
4.将uty目录下的iconv.pl.fake 文件复制到openwebmail目录下,替换iconv.pl文件

  评论这张
 
阅读(811)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017