当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 1 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : 资源共享:我的ubuntu 使用历程(11-open-xchange)
帖子发表于 : 2006-02-18 15:42 

注册: 2005-10-23 21:46
帖子: 132
地址: 深圳
送出感谢: 0 次
接收感谢: 0 次
ubuntu安装配置说明(续九)
==============

李家芳(leejiafang@tom.com)

安装配置Open-Xchange



1、Download needed software for Open-Xchange:

$ sudo su -
# mkdir -p /usr/adm/ox
# cd /usr/adm/ox

Download Java J2SDK 1.4.2 (tested with j2sdk-1_4_2_08-linux-i586.bin).
Download Apache Tomcat 5.x (tested with jakarta-tomcat-5.0.28.tar.gz).
Download Apache Ant (tested with apache-ant-1.6.5-bin.tar.gz).
Download PostgreSQL JDBC Driver (tested with pg74.216.jdbc3.jar).
Download JavaMail (tested with javamail-1_3_2-upd.zip).
Download JAF (tested with jaf-1_0_2-upd2.zip).
Download Xerces-J (tested with Xerces-J-bin.2.6.2.tar.gz).
Download JDOM (tested with jdom-1.0.tar.gz).
Download Open-Xchange (tested with open-xchange-0.8.0-5.tar.gz).
Download OX Zenith Iconset 0.1 (tested with ox_zenith_iconset-0.1.tar.gz).
Download Apache 2.0 (tested with httpd-2.0.54.tar.gz).
Download Tomcat Connectors (mod_jk) (tested with jakarta-tomcat-connectors-1.2.13-src.tar.gz).
Download zlib (tested with zlib-1.2.2.tar.gz).

2、编辑环境变量:
Modify the /etc/profile file:

# vi /etc/profile
在文件末尾加上:
JAVA_HOME=/opt/java
CATALINA_HOME=/opt/tomcat
ANT_HOME=/opt/ant
OX_HOME=/opt/openxchange
TOMCAT_HOME=$CATALINA_HOME
PATH=$PATH:$JAVA_HOME/bin:$CATALINA_HOME/bin:$ANT_HOME/bin:$OX_HOME/bin:$OX_HOME/sbin
CLASSPATH=$CLASSPATH:/opt/jdbc/pg74.216.jdbc3.jar //注意:本行配置原文没有,好像确实不需要在这里配置。
export PATH JAVA_HOME CATALINA_HOME ANT_HOME OX_HOME TOMCAT_HOME CLASSPATH

Please add the text to the bottom of the file.

# source /etc/profile

注意:不知道为什么?使用/etc/bash.bashrc配置环境变量tomcat找不到,所以不建议使用/etc/bash.bashrc的方式,使用上面的/etc/profile文件。
---------------------
# vi /etc/bash.bashrc
......
JAVA_HOME=/opt/java
CATALINA_HOME=/opt/tomcat
ANT_HOME=/opt/ant
OX_HOME=/opt/openxchange
TOMCAT_HOME=$CATALINA_HOME
PATH=$PATH:$JAVA_HOME/bin:$CATALINA_HOME/bin:$ANT_HOME/bin:$OX_HOME/bin:$OX_HOME/sbin
export PATH JAVA_HOME CATALINA_HOME ANT_HOME OX_HOME TOMCAT_HOME

......

# source /etc/bash.bashrc
------------------

3. Install all the needed software for Open-Xchange:

# apt-get update
# apt-get install perl
# apt-get install perl-base
# apt-get install libperl5.8
# apt-get install gcc
# apt-get install libc-dev
# apt-get install g++
# apt-get install make
# apt-get install ispell
# apt-get install postgresql
# apt-get install libnet-ssleay-perl
# apt-get install libio-socket-ssl-perl
# apt-get install libxml-namespacesupport-perl
# apt-get install libxml-sax-perl
# apt-get install libauthen-sasl-perl
# apt-get install libconvert-asn1-perl
# apt-get install libnet-ldap-perl
# apt-get install fakeroot

//安装ldap这两步可以不要,因为这样安装的LDAP不支持ACI,不能用。
# apt-get install slapd
# apt-get install ldap-utils

# apt-get install db4.2-util
# apt-get install sudo
# apt-get install unzip
# apt-get clean

If you get an error, for example:
Reading Package Lists... Done
Building Dependency Tree... Done
E: Couldn't find package libnet-ssleay-perl
Then you must configure Apt:
# apt-setup



特别注意:LDAP要重新编译,支持ACI,否则后面添加用户时会出大麻烦!所以下面这些步骤不能省略:
----------------------------------------------

And now, the funny part ! If you try to use the debian packages for LDAP, your OX installation won't work
because LDAP doesn't understand the word openLDAPaci, used in the LDAP declaration of OX users ...

You can have a look at bug #101602, opened on ...20 Jun 2001 !

Solving the problem is very simple : we need to add the --enable-aci option to the configure script.
So we have to rebuild the package :

Make sure you have the packages dpkg-dev and fakeroot on your system, then check that your source.list contains something like this:
deb-src ftp://ftp.proxad.net/mirrors/ftp.debian.org/ testing contrib main non-free

1)首先确认是否安装了dpkg-dev,fakeroot:

$ sudo su -
# apt-get update //如果运行更新时提示gzip error,说明镜像站点有问题。
注意:下面的netselect方法虽然好,但是不太适用于ubuntu,因为其下载的软件包源码在ubuntu环境下编译存在问题。
所以还是使用apt-setup方法解决问题:

用apt-setup命令,选择hongkong或者japan等来设置。有时国内、香港、日本等都很慢时,法国、德国反到很快。
# apt-setup //最好不要选china,有问题。
# apt-get update


^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
可以使用下面命令安装netselect-apt,自动选择mirror站点:
# apt-get install netselect-apt
# cd /etc/apt
# mkdir apt-tmp
# cd apt-tmp
# netselect-apt stable //可以多运行几遍这个命令,直到在当前目录下生成sources.list为止。
# mv /etc/apt/sources.list /etc/apt/sources.list.bak //备份原有的sources.list;
# cd /etc/apt/apt-tmp
# mv sources.list .. //使用新的sources.list;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

# apt-get install dpkg-dev fakeroot

2)下载源码包:
You can now download the source package :
# cd /usr/adm/ox
# apt-get build-dep slapd //下载所有编译slapd的依赖包。
# apt-get source slapd
# cd openldap2-2.1.30/debian

3)编辑configure.options文件,去掉 --enable-aci注释符号,编译包:
Edit te file configure.options and uncomment the line --enable-aci. Now, go back to $/usr/adm/ox/openldap2-2.1.30/ and build the package :
# cd /usr/adm/ox/openldap2-2.1.30/
# dpkg-buildpackage -rfakeroot -uc -b

如果编译时提示unmet dependancies等,则需要运行以下命令来安装依赖包:
The first time, it will probably complains that it lacks xxx-dev and yyy-dev.
Install all the dependancies with “apt-get build-dep slapd” and try again to launch dpkg-buildpackage.
# apt-get build-dep slapd //下载所有编译slapd的依赖包。
然后再重新运行:
# cd /usr/adm/ox/openldap2-2.1.30/
# dpkg-buildpackage -rfakeroot -uc -b

编译成功后,会在/usr/adm/ox目录下得到以下deb文件:
You obtain the following packages in $/usr/adm/ox:
ldap-utils_2.1.30-3_i386.deb
libldap2_2.1.30-3_i386.deb
libldap2-dev_2.1.30-3_i386.deb
libslapd2-dev_2.1.30-3_all.deb
slapd_2.1.30-3_i386.deb

4)安装编译所得的包:
Install them with the command dpkg -i <package>.

# cd /usr/adm/ox/
# dpkg -i ldap-utils_2.1.30-3ubuntu3_i386.deb
# dpkg -i libldap2_2.1.30-3ubuntu3_i386.deb
# dpkg -i libldap2-dev_2.1.30-3ubuntu3_i386.deb
# dpkg -i libslapd2-dev_2.1.30-3ubuntu3_all.deb
# dpkg -i slapd_2.1.30-3_3ubuntui386.deb

5)确保apt不会乱动你手工编译的包:
To make sure APT will not touch your hand-compiled LDAP packages do this:

# dpkg --set-selections <<E_O_F
>slapd hold
>ldap-utils hold
>libldap2 hold
>E_O_F

--------------------------------------



4、安装其他上面下载的程序:

$ sudo su -
# mkdir -p /usr/adm/ox
# cd /usr/adm/ox
如果是另外下载方式,把第一步下载的程序拷贝到/usr/adm/ox目录下
# cd /home/ftp/pub
# cp * /usr/adm/ox
# cd /usr/adm/ox

# chmod 755 /usr/adm/ox/j2sdk-1_4_2_08-linux-i586.bin
# cd /opt
# /usr/adm/ox/j2sdk-1_4_2_08-linux-i586.bin
# ln -s /opt/j2sdk1.4.2_08 /opt/java

# cd /opt
# tar -zxf /usr/adm/ox/jakarta-tomcat-5.0.28.tar.gz
# ln -s /opt/jakarta-tomcat-5.0.28 /opt/tomcat

# cd /opt
# tar -zxf /usr/adm/ox/apache-ant-1.6.5-bin.tar.gz
# ln -s /opt/apache-ant-1.6.5 /opt/ant

# cd /opt
# mkdir jdbc
# cp /usr/adm/ox/pg74.216.jdbc3.jar jdbc

注意:要特别检查/opt/jdbc/pg74.216.jdbc3.jar的权限,一定要具有读的权限:
# chmod +r /opt/jdbc/pg74.216.jdbc3.jar

否则,/opt/openxchange/var/log/groupware.log中会出现:java.lang.ClassNotFoundException: org.postgresql.Driver
即找不到jdbc驱动。


# cd /opt
# unzip /usr/adm/ox/javamail-1_3_2-upd.zip
# ln -s /opt/javamail-1.3.2 /opt/javamail

# cd /opt
# unzip /usr/adm/ox/jaf-1_0_2-upd2.zip
# ln -s /opt/jaf-1.0.2 /opt/jaf

-------------------------
注意:因为为了运行jain-sip,在以前的安装说明文档中已经将xerces编译成deprecated模式,即在/opt/xerces/目录下有文件:
xerces.jar
所以如果存在这种情况,就需要把按照下列步骤处理
# cd /home/ftp/pub
# tar zxvf Xerces-J-bin.2.6.2.tar.gz
# cd xerces-2_6_2
# mv *.jar /opt/xerces/
# cd ..
# rm -R xerces-2_6_2

如果没有上面的情况,可以按照下面处理:
# cd /opt
# tar -zxf /usr/adm/ox/Xerces-J-bin.2.6.2.tar.gz
# ln -s /opt/xerces-2_6_2 /opt/xerces
--------------------------


# cd /opt
# tar -zxf /usr/adm/ox/jdom-1.0.tar.gz
# ln -s /opt/jdom-1.0 /opt/jdom

# cd /usr/adm/ox/
# tar -zxf zlib-1.2.2.tar.gz
# cd zlib-1.2.2
# ./configure
# make test
# make install

# cd /usr/adm/ox/
# tar -zxf httpd-2.0.54.tar.gz
# cd httpd-2.0.54
# ./configure --prefix=/opt/apache2 --with-mpm=prefork --enable-rewrite --enable-deflate --enable-vhost-alias --enable-so
# make
# make install

# cd /usr/adm/ox/
# tar -zxf jakarta-tomcat-connectors-1.2.13-src.tar.gz
# cd jakarta-tomcat-connectors-1.2.13-src/jk/native
# ./configure --with-apxs=/opt/apache2/bin/apxs
# make
# make install


5. Install Open-Xchange:

# cd /usr/adm/ox/
# tar -zxf open-xchange-0.8.0-5.tar.gz
# cd /usr/adm/ox/open-xchange-0.8.0-5
# ./configure \
--prefix=/opt/openxchange --with-mailjar=/opt/javamail/mail.jar --with-activationjar=/opt/jaf/activation.jar \
--with-jdomjar=/opt/jdom/build/jdom.jar --with-xercesjar=/opt/xerces/xercesImpl.jar \
--with-jsdkjar=/opt/tomcat/common/lib/servlet-api.jar --with-jdbcjar=/opt/jdbc/pg74.216.jdbc3.jar \
--with-htdocsdir=/opt/apache2/htdocs/ --with-cgibindir=/opt/apache2/cgi-bin/ --with-runuid=nobody --with-rungid=nogroup \
--with-domain=dipdns.org --with-organization="DipDNS Network" --with-basedn="dc=dipdns,dc=org" \
--with-rootdn="cn=admin,dc=dipdns,dc=org" --with-dbname=openexchange --with-dbuser=openexchange \
--with-dbpass=secret --with-dbhost=127.0.0.1 --enable-webdav

注意:
Please change dipdns.org to your domain name. //例如:tiancheng.com
Please change DipDNS Network to your organization name. //Tiancheng Network
Please change dc=dipdns,dc=org according to your domain name. // dc=tiancheng,dc=com

When you run the ./configure command, it's safe to ignore these messages:
configure: WARNING: `missing' script is too old or missing
configure: WARNING: database check ... failed

# make
# make install



6. Configure Apache Tomcat:

# vi /opt/tomcat/bin/catalina.sh
#
# CATALINA_PID (Optional) Path of the file which should contains the pid
# of catalina startup java process, when start (fork) is used
#
# $Id: catalina.sh,v 1.13.2.1 2004/08/21 15:49:49 yoavs Exp $
# -----------------------------------------------------------------------------
# 正文最开头,新增一行:
JAVA_OPTS="-Dopenexchange.propfile=/opt/openxchange/etc/groupware/system.properties"
# OS specific support. $var _must_ be set to either true or false.

# vi /opt/tomcat/conf/tomcat-users.xml
<tomcat-users>
<user name="tomcat" password="tomcat" roles="tomcat" />
<user name="role1" password="tomcat" roles="role1" />
<user name="both" password="tomcat" roles="tomcat,role1" />
//新增一行:
<user username="admin" password="tomcat-admin-password" roles="manager" />
</tomcat-users>

Please change tomcat-admin-password to a real password.//这里取:secret

In previous version of this document, the classpath was defined this way: edit the file $TOMCAT_HOME/conf/catalina.properties and modify the last line like this :
shared.loader=${catalina.base}/shared/classes, ${catalina.base}/shared/lib/*.jar,/opt/openxchange/lib/*.jar


7. Configure Open-Xchange:

# mkdir -p /opt/tomcat/webapps/servlet/WEB-INF/classes
# mkdir /opt/tomcat/webapps/servlet/WEB-INF/lib
# cp /opt/openxchange/share/servlets/*.class /opt/tomcat/webapps/servlet/WEB-INF/classes/
# cp /usr/adm/ox/open-xchange-0.8.0-5/system/servlet/web.xml /opt/tomcat/webapps/servlet/WEB-INF/
# cp /opt/openxchange/lib/*.jar /opt/tomcat/webapps/servlet/WEB-INF/lib/
# cp /opt/jdom/build/jdom.jar /opt/tomcat/webapps/servlet/WEB-INF/lib/
# cp /opt/jdbc/pg74.216.jdbc3.jar /opt/tomcat/webapps/servlet/WEB-INF/lib/
# cp /opt/jaf/activation.jar /opt/tomcat/webapps/servlet/WEB-INF/lib/
# cp /opt/javamail/mail.jar /opt/tomcat/webapps/servlet/WEB-INF/lib/
# cp /opt/openxchange/lib/umin.war /opt/tomcat/webapps/
# ln -s /etc/ldap/ldap.conf /opt/openxchange/etc/groupware/ldap.conf
# ln -s /etc/ldap/ldap.conf /opt/openxchange/etc/webmail/ldap.conf



8. Configure mod_jk:

# vi /opt/apache2/conf/httpd.conf
# Example:
# LoadModule foo_module modules/mod_foo.so
#
新增一行:
LoadModule jk_module modules/mod_jk.so
...
...
...
#<VirtualHost *:80>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www/docs/dummy-host.example.com
# ServerName dummy-host.example.com
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
#
在文件末尾,新增以下</IfModule>模块行:
<IfModule mod_jk.c>
JkWorkersFile /opt/apache2/conf/workers.properties
JkLogFile /opt/apache2/logs/mod_jk.log
JkLogLevel warn
JkMount /*.jsp localhost
JkMount /servlet/* localhost
JkMount /umin/* localhost
JkMount /examples/* localhost
JkMount /servlet/webdav.contacts* localhost
</IfModule>

# vi /opt/apache2/conf/workers.properties
新增以下行:
worker.list=localhost
worker.localhost.port=8009
worker.localhost.host=localhost
worker.localhost.type=ajp13
worker.localhost.lbfactor=1
workers.tomcat_home=/opt/tomcat
workers.java_home=/opt/java //注意:这一行的java_home要按照实际情况修改。

# /opt/apache2/bin/apachectl start



9. Copy the Iconset for Open-Xchange:

cd /usr/adm/ox
tar -zxf ox_zenith_iconset-0.1.tar.gz
cd ox_zenith_iconset/top
cp * /opt/apache2/htdocs/cfintranet/images/top/EN/
cp * /opt/apache2/htdocs/cfintranet/images/top/DE/



10. Configure PostgreSQL:

# vi /etc/postgresql/pg_hba.conf
Change this line(将以下行):
# All other connections by UNIX sockets
local all all ident sameuser
To this line(改成):
# All other connections by UNIX sockets
local all all trust

And change this line(将以下行):
# All IPv4 connections from localhost
host all all 127.0.0.1 255.255.255.255 ident sameuser
To this line(改成):
# All IPv4 connections from localhost
host all all 127.0.0.1 255.255.255.255 trust

注意:下面这三行不需要配置也可以。
------------------------------------------------------
#vi /etc/postgresql/postgresql.conf and set :
POSTGRES_OPTIONS="-i"
or else postgresql wont accept network connections.
------------------------------------------------------

# /etc/init.d/postgresql reload



11. Create the PostgreSQL user and database for Open-Xchange:

# su - postgres
$ createuser --pwprompt
Enter name of user to add: openexchange //注意:这个用户名应该是与前面./configure openxchange的参数--with-dbname=openexchange --with-dbuser=openexchange 相一致。
Enter password for new user: secret
Enter it again: secret
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) n
CREATE USER

$ createdb -O openexchange -E UNICODE openexchange //注意:数据库db的名称应该是与前面./configure openxchange的参数--with-dbname=openexchange --with-dbuser=openexchange 相一致。
CREATE DATABASE

$ psql -U openexchange openexchange < /opt/openxchange/share/init_database.sql
CREATE SEQUENCE
CREATE SEQUENCE
CREATE SEQUENCE
CREATE SEQUENCE
CREATE SEQUENCE
CREATE TABLE
...
INSERT 17664 1

$ psql -U openexchange openexchange
Welcome to psql 7.4.7, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit
INSERT INTO sys_gen_rights_template values
('now','admin','now','','default_template','y','y','y','y',
'y','y','y','y','y','y','y','y','y','y','y','y','y','y','y',
'y','y','y','y','y','y','y','y','y','y','y','y','y','y','y',
'y','y','y','y','y','y','y','y','y','y','y','y','y');
INSERT 17665 1
\q

$ exit



12. Configure OpenLDAP:

# vi /etc/ldap/slapd.conf
# Schema and objectClass definitions
include /etc/ldap/schema/core.schema
include /etc/ldap/schema/cosine.schema
include /etc/ldap/schema/nis.schema
include /etc/ldap/schema/inetorgperson.schema
新增一行:
include /opt/openxchange/share/openxchange.schema


#######################################################################
# Specific Directives for database #1, of type bdb:
# Database specific directives apply to this databasse until another
# 'database' directive occurs
database bdb
新增一行:
suffix "dc=tiancheng,dc=com"

directory "/var/lib/ldap"
index objectClass eq

新增以下行:
-------------------------------------------------------
index uid,mailEnabled,cn,sn,givenname,lnetMailAccess,alias,loginDestination eq,sub
index memberUid eq
rootdn "cn=admin,dc=tiancheng,dc=com"
rootpw secret

access to dn.subtree="ou=Users,ou=OxObjects,dc=tiancheng,dc=com"
by self write
by users write
by anonymous auth

access to dn.subtree="ou=Groups,ou=OxObjects,dc=tiancheng,dc=com"
by self write
by users write
by anonymous auth
-----------------------------------------------------------
# Save the time that the entry gets modified, for database #1
lastmod on

Attention: Be careful when you copy and past it (pay attention for "Space" and "Tab")!

Please change dc=dipdns,dc=org according to your domain name.//这里是tiancheng,com

# vi /etc/ldap/ldap.conf
#TIMELIMIT 15
#DEREF never
BASE dc=tiancheng,dc=com
HOST localhost

Please change dc=dipdns,dc=org according to your domain name.//这里是tiancheng,com
注意:这里的BASE dc=tiancheng,dc=com的两个dc之间确保不能有空格,只有一个逗号,否则会出错。
----------------------------------------
note:
Ensure that your BASE line reads without any spaces after the comma. If there are any spaces you'll experience problems. So, it should read:

BASE dc=ox-domain,dc=tld

instead of:

BASE dc=ox-domain, dc=tld
---------------------------------

# /etc/init.d/slapd restart



13. Insert the LDAP data for Open-Xchange:

# perl -e 'print crypt("secret",pack("C2",(int(rand 26)+65),(int(rand 26)+65)))."\n";'
HTC7s0hcd3H9s

Please change mailadmin-password to a real password.//这里是secret.

# vi /opt/openxchange/share/init_ldap.ldif
Please change:
homeDirectory: /home/mailadmin/
loginShell: /bin/bash
mailEnabled: OK
gidNumber: 500
mailDomain: dipdns.org
ou: Administration
uid: mailadmin
sn: Admin
preferredLanguage: EN
mail: mailadmin@dipdns.org
o: DipDNS Network
smtpServer: localhost
imapServer: localhost
alias: postmaster@dipdns.org
alias: root@dipdns.org
givenName: Admin
cn: Admin Admin
shadowMin: 0
shadowMax: 9999
shadowWarning: 7
shadowExpire: 0
修改以下行:
userPassword: secret 本行修改成:userPassword: {CRYPT}HTC7s0hcd3H9s 即改成你上面使用perl命令生成的密码值。
OXAppointmentDays: 5
OXGroupID: 500
OXTaskDays: 5

注意:
Please change HTC7s0hcd3H9s to the string that you get from the
"perl -e 'print crypt("mailadmin-password",pack("C2",(int(rand 26)+65),(int(rand 26)+65)))."\n";'" command.

# /etc/init.d/slapd stop
# rm /var/lib/ldap/*
# slapadd -l /opt/openxchange/share/init_ldap.ldif

注意:如果执行slapadd -l /opt/openxchange/share/init_ldap.ldif出现“slapadd:couldnot parse entry(line145)”错误提示时,
说明init_ldap.ldif的格式有问题,只需要使用vi编辑该文件,除了第一行以"dn:"开头的行之外,把后面所有以"dn:"开头的行之前
添加一个空行即可,其他部分没有空行,参考本说明目录下的init_ldap.ldif.success文件。
然后重新执行:
# rm /var/lib/ldap/*
# slapadd -l /opt/openxchange/share/init_ldap.ldif

重新启动slapd。
# /etc/init.d/slapd start


14. Create the group developers for Open-Xchange:

# addgroup_ox --group=developers



15. Create a new user for Open-Xchange:

# adduser_ox --username="lee" --passwd="xxxxxx" --name="jiafang" \
--sname="li" --maildomain="tiancheng.com" --ox_timezone="Asia/Shanghai"

注意:如果提示出现error code 17错误,就是安装的ldap不支持ACI需要按照上面的方法重新手动编译LDAP。
执行时,提示出现psql:fatal error,找不到database:openxchange错误:
是由于前面建立数据库时用户名和database的名称都是openexchange,所以有两种方式解决这个问题:

方法一、
重新建立用户openxchange和数据库openxchange,即重新执行第11步。这种方法很麻烦,而且已经建立的openexchange数据库没用了。

方法二、修改配置文件admintools.conf和server.conf,见以下3步:
1、修改openxchange的配置文件,使其默认的用户和数据库名称为openexchange:
# cd /opt/openxchange/etc/
# vi admintools.conf //注意:openxchange的部分接口配置,包括ldap和db的都在这个文件中。

找到以下部分进行修改:
######################## SQL Stuff ##########################
DEFAULT_SQL_HOST="127.0.0.1"
DEFAULT_SQL_DB="openxchange" //修改为"openexchange"
DEFAULT_SQL_USER="openxchange" //修改为"openexchange"
DEFAULT_SQL_PASS="secret"

2、修改/opt/openxchange/etc/groupware/server.conf文件:
# cd /opt/openxchange/etc/groupware/
# vi server.conf

找到并修改以下部分:
# Database Connection Parameter
NAS_CON_CLASS_NAME: jdbc:postgresql://127.0.0.1/openxchange //修改为"openexchange"
NAS_CON_USER: openxchange //修改为"openexchange"
NAS_CON_PASS: secret
NAS_CON_DRIVER: org.postgresql.Driver

3、修改/opt/openxchange/etc/webmail/server.conf文件:
# cd /opt/openxchange/etc/webmail/
# vi server.conf

找到并修改以下部分:
# Database Connection Parameter
NAS_CON_CLASS_NAME: jdbc:postgresql://127.0.0.1/openxchange //修改为"openexchange"
NAS_CON_USER: openxchange //修改为"openexchange"
NAS_CON_PASS: secret
NAS_CON_DRIVER: org.postgresql.Driver


然后重新执行adduser_ox命令。

注意:数据库postgres的log文件在/var/log/postgresql/目录下,postgres.log文件,可以查看确认问题。

参考:配置文件位置。
--------------------------
Here a quick help where you can find some parameters:

-- SQL Database --
Files:

PREFIX/etc/groupware/server.conf
PREFIX/etc/webmail/server.conf

Entry:
jdbc:postgresql:///openexchange

-- LDAP Server --
Files:
PREFIX/etc/groupware/ldap.conf
PREFIX/etc/webmail/ldap.conf

Entry:
HOST

-- SMTP Server --
mailadmin "smtpServer" attribute in the LDAP Tree.

-- IMAP Server --
mailadmin "imapServer" attribute in the LDAP Tree.
---------------------------

16. Add the new user to the group users for Open-Xchange:

# addusertogroup_ox --user=lee --group=users


17. Make Apache 2.0 to start on boot:

# cp /opt/apache2/bin/apachectl /etc/init.d/apache2
# ln -s /etc/init.d/apache2 /etc/rc2.d/S91apache2
# ln -s /etc/init.d/apache2 /etc/rc3.d/S91apache2


18. Make Open-Xchange to start on boot:

# cp /opt/openxchange/etc/init.d/openexchange /etc/init.d/
# ln -s /etc/init.d/openexchange /etc/rc2.d/S86openexchange
# ln -s /etc/init.d/openexchange /etc/rc3.d/S86openexchange



19. Finish configure Apache Tomcat and make it to start on boot:

# chown -R nobody:nogroup /opt/jakarta-tomcat-5.0.28
# chown -R nobody:nogroup /opt/tomcat

编辑文件:
注意:下面编辑tomcat这一步可以直接使用本说明文件下的tomcat.success文件:
# cd /home/ftp/pub
# cp tomcat.success /etc/init.d/tomcat
# cd /etc/init.d/
# chmod 755 tomcat
即可。

# vi /etc/init.d/tomcat
文件内容如下:
---------------------------------------------
#!/bin/bash
#
# tomcat
#
# chkconfig:
# description: Start up the Tomcat servlet engine.


RETVAL=$?
CATALINA_HOME="/opt/tomcat"

case "$1" in
start)
if [ -f $CATALINA_HOME/bin/startup.sh ];
then
echo $"Starting Tomcat"
/bin/su - nobody -c $CATALINA_HOME/bin/startup.sh
fi
;;
stop)
if [ -f $CATALINA_HOME/bin/shutdown.sh ];
then
echo $"Stopping Tomcat"
/bin/su - nobody -c $CATALINA_HOME/bin/shutdown.sh
fi
;;
*)
echo $"Usage: $0 {start|stop}"
exit 1
;;
esac

exit $RETVAL
---------------------------------------------------

更改tomcat权限:
# chmod 755 /etc/init.d/tomcat
# ln -s /etc/init.d/tomcat /etc/rc2.d/S91tomcat
# ln -s /etc/init.d/tomcat /etc/rc3.d/S91tomcat

编辑文件logrotate.conf:
# vi /etc/logrotate.conf
# system-specific logs may be configured here
在文件末尾增加以下行:
/opt/tomcat/logs {
weekly
rotate 4
postrotate
endscript
compress
}



20. Make some minor changes to the Webmail part of Open-Xchange:

# vi /opt/openxchange/etc/webmail/system.cfg

Please change:
AVAILABLE-ENCODINGS="ISO-8859-1,ISO-8859-15,UTF-8"
To:
AVAILABLE-ENCODINGS="ISO-8859-1,ISO-8859-15,UTF-8,ISO-8859-8"

Please change:
USER-CAN-SELECT-ENCODING="false"
To:
USER-CAN-SELECT-ENCODING="true"

# vi /opt/openxchange/etc/webmail/webmail.properties

Please change:
user.default.folder.autocreate=false
To:
user.default.folder.autocreate=true

Please change:
user.default.folder.sent=INBOX/Sent
user.default.folder.trash=INBOX/Trash
user.default.folder.drafts=INBOX/Drafts
user.default.folder.spam=INBOX/Spam
To:
user.default.folder.sent=INBOX.Sent
user.default.folder.trash=INBOX.Trash
user.default.folder.drafts=INBOX.Drafts
user.default.folder.spam=INBOX.Spam




21. The installation of Open-Xchange is complete, you may now login to Open-Xchange:
安装完成,可以使用以下命令启动open-xchange,并登录:
# /etc/init.d/tomcat start
如果提示不能够touch catalina.out文件,可以直接将其删除:
# rm /opt/tomcat/logs/catalina.out
然后再启动tomcat。

# /etc/init.d/openexchange start
# /etc/init.d/apache2 restart


注意:要特别检查/opt/jdbc/pg74.216.jdbc3.jar的权限,一定要具有读的权限:
# chmod +r /opt/jdbc/pg74.216.jdbc3.jar

否则,/opt/openxchange/var/log/groupware.log中会出现:java.lang.ClassNotFoundException: org.postgresql.Driver
即找不到jdbc驱动。




登录:
Please go to http://server-ip/cgi-bin/login.pl and login in with the "username" and the "password"
that you created early for Open-Xchange.

因为上面已经设置了自启动相关服务,所以可以reboot系统以后,再登录Open-Xchange:

# reboot

在客户端登录:
http://172.17.1.106/cgi-bin/login.pl


22. And now ...
Where are the icons ????

到www.icon-king.com下载icons:
No icons. Instead you have beautifuls coloured squares ... Try to go here www.icon-king.com for instance ...

Update ! Manuel Kraft as started a theme page with a nice iconset. Rush to http://ox.cutmasta.org/ !
Open-Xchange with a nicer inconset.
到http://ox.cutmasta.org/下载theme。


23.图形化的管理界面:


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 1 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 1 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译