项目

一般

简介

插件 » Redmine DMSF 文档管理插件

Redmine Dmsf

Redmine DMSF是文档管理系统插件,它的目标是替代Redmine自带的文档模块。

发布于: https://github.com/danmunn/redmine_dmsf
兼容于: Redmine 5.1.*, 5.0.*, 4.2.*, 4.1.*, 4.0.*

最新版本: 3.1.3_2 更新日期: 2024-04-18 10:27

安装指导

插件安装步骤

安装全文搜索(可选项目)

  • Ubuntu为例
    sudo apt-get install xapian-omega ruby-xapian libxapian-dev xpdf poppler-utils antiword  unzip catdoc libwpd-tools \
    libwps-tools gzip unrtf catdvi djview djview3 uuid uuid-dev xz-utils libemail-outlook-message-perl
    
  • CentOS为例
    sudo yum install xapian-core xapian-bindings-ruby libxapian-dev xpdf poppler-utils antiword unzip catdoc libwpd-tools \
    libwps-tools gzip unrtf catdvi djview djview3 uuid uuid-dev xz libemail-outlook-message-perl
    

    安装完相关依赖后,在插件设置中可以看到已经支持全文检索的配置了,如下图:

配置全文检索功能

  • 配置dmsf文档保存路径,例图中的位置是redmine的files目录下
  • 配置xapian索引数据库保存路径
  • 修改配置对应配置文件(redmine_dmsf/extra/xapian_indexer.rb), 必须 保持与Redmine插件上图中的设置一致,以下仅截取了关键配置部分
    require 'optparse'
    
    ########################################################################################################################
    # BEGIN Configuration parameters
    # Configure the following parameters (most of them can be configured through the command line):
    ########################################################################################################################
    
    # Redmine installation directory
    $redmine_root = File.expand_path('../../../../', __FILE__)
    
    # DMSF document location $redmine_root/$files
    $files = '/files/dmsf'
    
    # scriptindex binary path 
    $scriptindex = '/usr/bin/scriptindex'
    
    # omindex binary path
    $omindex = '/usr/bin/omindex'
    
    # Directory containing Xapian databases for omindex (Attachments indexing)
    $dbrootpath = File.expand_path('/home/liwei/redmine-4.1/files/dmsf_index', $redmine_root)
    
    # Verbose output, values of 0 no verbose, greater than 0 verbose output
    $verbose = 0
    
  • 手动创建文档索引
    ruby redmine_dmsf/extra/xapian_indexer.rb -v # 显示索引详情
    ruby redmine_dmsf/extra/xapian_indexer.rb -v -f # 显示索引详情,仅索引文件
    
  • 通过创建crontab计划任务,定期自动建立文档索引,例如每8分钟做一次索引活动
    8 * * * * root /usr/bin/ruby redmine_dmsf/extra/xapian_indexer.rb