Open-Xchange安装日志
Pre-install
安装apt
wget http://ftp.freshrpms.net/pub/freshrpms/redhat/9/apt-0.5.5cnc6-frl.i386.rpm
rpm -ihv apt-
apt-get update
vi /etc/apt/sources.list
在该文件中添加以下五行:
rpm http://mirrors.sunsite.dk/jpackage 1.5/generic free
rpm-src http://mirrors.sunsite.dk/jpackage 1.5/generic free non-free
rpm http://mirrors.sunsite.dk/jpackage 1.5/redhat-9 free
rpm-src http://mirrors.sunsite.dk/jpackage 1.5/redhat-9 free
rpm http://apt.sw.be redhat/9/en/i386 dag
返回命令行提示符.
apt-get update
apt-get install postgresql postgresql-server postgresql-libs
#apt-get install httpd httpd-manual
#注:因为在原有linux服务器上已经安装了Apache http server2.2 故无需执行
apt-get install xerces-j2
apt-get install jdom
apt-get install postgresql-jdbc
apt-get install mod_jk-ap20
#此命令为下载安装Apache与Tomcat的连接器
#除非linux上的Apache安装在默认路径/usr/local/apache2
#否则,在此安装的连接器是不起作用的.
#后面mod_jk须自行手动下载、编译、安装、配置
apt-get install perl-Convert-ASN1
apt-get install perl-ldap
#此perl模块下载时也自动下载的所需的模块包括:
# perl-IO-Socket-SSL
# perl-Net-SSLeay
# perl-XML-NamespaceSupport
# perl-XML-SAX
apt-get install perl-Authen-SASL
#命令提示找不到相应的模块,可通过CPAN安装,如下:
perl –MCPAN –e shell
cpan>install Authen::SASL
从http://sietse.net/exoops/modules/OpenXchange/?distr=rh9下载
openldap-clients-2.0.27-8.i386.rpm
openldap-servers-2.0.27-8.i386.rpm
到/home/xkx/ox目录下。
cd /home/xkx/ox
rpm -Uvh openldap-servers-
service ldap start
从Sun官方网站下载
j2sdk-1_4_2_10-linux-i586.bin
jaf-1_0_2-upd2.zip
javamail-1_4-ea.zip
存放到/home/xkx/ox目录下
安装JDK
cd /home/xkx/ox
chmod 755 j2sdk-1_4_2_10-linux-i586.bin
在/etc/profile,/etc/profile.d/java.sh,/root/.bashrc下分别加入如下四行:
JAVA_HOME="/home/xkx/ox/j2sdk
JAVA_BIN="/home/xkx/ox/j2sdk
PATH=$JAVA_HOME/bin:$PATH
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
#设置了环境变量后,可在命令提示符下检查:
echo $JAVA_HOME
java -version
解压jaf-1_0_2-upd2.zip和javamail-1_4-ea.zip,分别把其中的mail.jar和activation.jar拷贝到
/usr/share/java目录下
apt-get install ant
从Apache官方网站下载
jakarta-tomcat-
jakarta-tomcat-
到/home/xkx目录下
tar –xvzf jakarta-tomcat-
cd akarta-tomcat-
./startup.sh
把jakarta-tomcat-
Configure
1、 Postgresql
service postgresql start
编辑文件/var/lib/pgsql/data/postgresql.conf,确保有下面这样一行:
tcpip_socket = true
编辑文件/var/lib/pgsql/data/pg_hba.conf,确保有下面这样的两行:
local all all trust
host all all 127.0.0.1 255.255.255.255 trust
service postgresql restart
useradd ox
su – postgres
createuser -A -D -P openxchange
键入密码:123456
createdb openxchange
exit
2、安装OX
从http://mirror.open-xchange.org/ox/EN/community/download.htm下载
open-xchange-
到/home/xkx/ox下
tar –xvzf open-xchange-
cd open-xchange-
export OX_INSTALL=/usr/local/ox
./configure \
--prefix=$OX_INSTALL \
--with-mailjar=/usr/share/java/mail.jar \
--with-activationjar=/usr/share/java/activation.jar \
--with-jdomjar=/usr/share/java/jdom-1.0.jar \
--with-xercesjar=/usr/share/java/xerces-j2-
--with-jsdkjar=/usr/share/java/servlet-api.jar \
--with-jdbcjar=/usr/share/pgsql/pg73jdbc3.jar \
--enable-webdav \
--with-htdocsdir=/home/htdocs \
--with-cgibindir=/home/cgi-bin \
--with-dbname=openxchange \
--with-dbuser=openxchange \
--with-dbpass=123456 \
--with-dbhost=localhost \
--with-runuid=ox \
--with-rungid=ox
make
make install
在浏览器中输入http://192.168.0.185/cgi-bin/login.pl看是否能看到登录的画面。
3、配置Servlet
cd /home/xkx/jakarta-tomcat-
mkdir servlet
mkdir servlet/WEB-INF
mkdir servlet/WEB-INF/classes
mkdir servlet/WEB-INF/lib
cd servlet/WEB-INF/
cp $OX_INSTALL/share/servlets/*.class classes/
cp $OX_INSTALL/lib/* lib/
cp lib/umin.war .
从http://sietse.net/exoops/modules/OpenXchange/?distr=rh9下载web.xml
并把所有
之后把文件放在/home/xkx/jakarta-tomcat-
重新启动tomcat,即:
cd /home/xkx/jakarta-tomcat-
./shutdown.sh
./startup.sh
在浏览器中输入:http://192.168.0.185:8080/servlet/intranet 可以看到“The Open-XChange(tm) Server is not running-Groupware Please inform the Administrator!”
在文件/home/xkx/jakarta-tomcat-
4、整合Apache和Tomcat
cp /usr/share/doc/mod_jk-ap20-
在/etc/httpd/conf.d/下创建文件mod_jk.conf,内容如下:
JkWorkersFile /home/conf/workers.properties
JkLogFile /home/logs/mod_jk.log
JkLogLevel error
JkMount /servlet/* ajp13
JkMount /umin/* ajp13
JkMount /*.jsp ajp13
JkMount /examples/* ajp13
JkMount /servlet/webdav.contacts* ajp13
JkMount /servlet/webdav.ical* ajp13
JkMount /servlet/weddav.documents* ajp13
JkMount /servlet/webdav.calendar* ajp13
JkMount /servlet/webdav.tasks* ajp13
JkMount /servlet/webdav.contacts* ajp13
JkMount /servlets-examples/* ajp13
JkMount /jsp-examples/* ajp13
#JkMount /servlet/intranet/* ajp13
从Apache官方网站下载jakarta-tomcat-connectors-
/home/xkx目录下
tar –xvzf jakarta-tomcat-connectors-
cd /home/xkx/jakarta-tomcat-connectors-
./configure \
--with-apxs=/home/bin/apxs
--with-java-home=/home/xkx/ox/j2sdk
make
make install
#之后会发现/home/modules下多了一个文件mod_jk.so
在/home/conf/httpd.conf中加入:
LoadModule jk_module modules/mod_jk.so
Include /etc/httpd/conf.d/mod_jk.conf
修改文件/home/conf/workers.properties
workers.tomcat_home=/home/xkx/jakarta-tomcat-
workers.java_home=/home/xkx/ox/j2sdk
重新启动Tomcat
在浏览器中重新输入http://192.168.0.185/servlet/intranet
如能看到和8080端口一样的内容则整合成功
5、为数据库Postgresql创建表
psql -dopenxchange -h localhost -Uopenxchange -W -f $OX_INSTALL/share/init_database.sql
psql -dopenxchange -h localhost -Uopenxchange -W
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');
\q
#总共47个’y’
6、是Tomcat开机自动运行
在/etc/rc.d/init.d下创建文件tomcat,内容如下:
RETVAL=$?
CATALINA_HOME="/home/xkx/jakarta-tomcat-
case "$1" in
start)
if [ -f $CATALINA_HOME/bin/startup.sh ];
then
echo $"Starting Tomcat"
/bin/su - root -c $CATALINA_HOME/bin/startup.sh
fi
;;
stop)
if [ -f $CATALINA_HOME/bin/shutdown.sh ];
then
echo $"Stopping Tomcat"
/bin/su - root -c $CATALINA_HOME/bin/shutdown.sh
fi
;;
*)
echo $"Usage: $0 {start|stop}"
exit 1
;;
Esac
7、配置LDAP
编辑/etc/openldap/slapd.conf文件。使其内容从63行起如下:
include /usr/local/ox/share/openxchange.schema
suffix "dc=example,dc=org"
rootdn "cn=Manager,dc=example,dc=org"
#注意上面两行的“,”与字母间千万不能有空格!!!以下类似。
rootpw secret