用了将近1周时间,终于能够把OpenKM正式上线了。
下面把安装的过程和配置分享给大家。
OS: CentOS 5.4基本安装
OpenKM: OpenKM 5.1.7
1. 下载OpenKM软件
http://sourceforge.net/projects/openkm
2. 安装tesseract ocr
yum install libjpeg-devel libpng-devel libtiff-devel zlib-devel gcc gcc-c++ make -y wget http://www.leptonica.com/source/leptonlib-1.67.tar.gz tar -zxvf leptonlib-1.67.tar.gz ./configure make make install wget http://tesseract-ocr.googlecode.com/files/tesseract-3.00.tar.gz tar -zxvf tesseract-3.00.tar.gz ./configure && make && sudo make install cd /usr/local/share/tessdata wget http://tesseract-ocr.googlecode.com/files/deu.traineddata.gz gunzip deu.traineddata.gz
3. 安装OpenOffice
yum install openoffice* -y
(其实只要安装几个软件就可以了)
4. 安装swftools
yum install gcc* automake zlib-devel libjpeg-devel giflib-devel freetype-devel -y wget http://www.swftools.org/swftools-0.9.1.tar.gz tar -zxvf swftools-0.9.1.tar.gz cd swftools-0.9.1 ./configure make make install
5. 安装ImageMagick
yum install ImageMagick -y
6. 安装ClamAV
yum install unzip bzip2 unrar perl-DBD-mysql -y
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt rpm -i rpmforge-release-0.5.2-2.el6.rf.i686.rpm
更新/etc/yum.repos.d/CentOS-Base.repo文件,在Base和update中添加以下内容:
[base] exclude=spamassass* ... [updates] exclude=spamassass* ...
再安装
yum install amavisd-new spamassassin clamav clamd -y
sa-update chkconfig --levels 235 amavisd on chkconfig --levels 235 clamd on /usr/bin/freshclam /etc/init.d/amavisd start /etc/init.d/clamd start mkdir /var/run/amavisd /var/spool/amavisd /var/spool/amavisd/tmp /var/spool/amavisd/db chown amavis /var/run/amavisd /var/spool/amavisd /var/spool/amavisd/tmp /var/spool/amavisd/db ln -s /var/run/clamav/clamd.sock /var/spool/amavisd/clamd.sock
7. 运行OpenKM
cd /opt unzip /root/OpenKM-5.1.7_JBoss-4.2.3.GA.zip cd jboss-4.2.3.GA ./bin/run.sh -b 0.0.0.0
使用浏览器访问OpenKM
http://OpenKM_IP:8080/OpenKM
默认的管理员帐号和密码
帐号:okmAdmin 密码:admin
8. 停止OpenKM服务
如果是前台运行的,Ctrl+C
如果是后台运行的
/opt/jboss-4.2.3.GA/bin/shutdown.sh -S
9. 修改OpenKM.cfg
#system.ocr=/usr/bin/cuneiform #system.openoffice.path=/usr/lib/openoffice #system.imagemagick.convert=/usr/bin/convert #system.swftools.pdf2swf=/usr/bin/pdf2swf #system.antivir=/usr/bin/clamscan hibernate.dialect=org.hibernate.dialect.HSQLDialect hibernate.hbm2ddl=none #application.url=http://localhost:8080/OpenKM/com.openkm.frontend.Main/index.jsp
将hibernate.hbm2ddl的值从create改为none
(运行系统后,使用帐号登录后,在更新此选项,目的是建立初始的数据库)
安装篇结束。
参考文档:
1. http://blog.srvme.de/2011/04/16/install-openkm-on-centos-5/
2. http://wiki.centos.org/HowTos/Amavisd
3. http://wiki.openkm.com/index.php/Quick_Install