本文描述在Linux系统上安装Alfresco的步骤:

1. 下载安装文件:alfresco-community-5.0.d-installer-linux-x64.bin

2. 增加执行权限并执行:

   chmod +x alfresco-community-5.0.d-installer-linux-x64.bin

   ./alfresco-community-5.0.d-installer-linux-x64.bin

3. 选择安装过程中语言:

   Please select the installation language

   [1] English - English

   [2] French - Français

   [3] Spanish - Español

   [4] Italian - Italiano

   [5] German - Deutsch

   [6] Japanese - 日本語

   Please choose an option [1] :

4. 输入安装目录

   Installation folder

   Please choose a folder to install Alfresco Community (Evaluation Use Only)

   Select a folder [/opt/alfresco-5.0.d]:

5. 输入管理员(admin)的密码

   Admin Password

   Please give a password to use for the Alfresco administrator account.

   Admin Password: :

6. 重复密码,输入Y,继续安装

7. 安装提示,继续安装,直到完成

8. 访问:

    http://127.0.0.1:8080/share

  • Create a file extension, named ocr-transform-context.xml into /tomcat/shared/classes/alfresco/extenssion with the following content:

    <?xml version='1.0' encoding='UTF-8'?>
    <!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN''http://www.springframework.org/dtd/spring-beans.dtd'>
 
<beans>
<bean id="transformer.worker.ocr.tiff"class="org.alfresco.repo.content.transform.RuntimeExecutableContentTransformerWorker">
 
<property name="mimetypeService">
<ref bean="mimetypeService"/>
</property>
 
<property name="checkCommand">
<bean class="org.alfresco.util.exec.RuntimeExec">
<property name="commandsAndArguments">
<map>
<entry key=".*">
<list>
<!--<value>tesseract</value>-->
<value>/opt/alfresco/ocr</value>
</list>
</entry>
</map>
</property>
<property name="errorCodes">
<value>2</value>
</property>
</bean>
</property>
 
<property name="transformCommand">
<bean class="org.alfresco.util.exec.RuntimeExec">
<property name="commandsAndArguments">
<map>
<entry key=".*">
<list>
<!--<value>tesseract</value>
<value>${source}</value>
<value>${target}</value>
<value>-l</value>
<value>eng</value>-->
<value>/opt/alfresco/ocr</value>
<value>${source}</value>
<value>${target}</value>
</list>
</entry>
</map>
</property>
<property name="errorCodes">
<value>1,2</value>
</property>
</bean>
</property>
 
<property name="explicitTransformations">
<list>
<bean class="org.alfresco.repo.content.transform.ExplictTransformationDetails">
<property name="sourceMimetype"><value>image/tiff</value></property>
<property name="targetMimetype"><value>text/plain</value></property>
</bean>
</list>
</property>
</bean>
<bean id="transformer.ocr.tiff"class="org.alfresco.repo.content.transform.ProxyContentTransformer" parent="baseContentTransformer">
<property name="worker">
<ref bean="transformer.worker.ocr.tiff"/>
</property>
</bean>
</beans> Create a bash file, named "ocr" and put into the alfresco root directory. And put it into /opt/alfresco. #!/bin/bash
# save arguments to variables
SOURCE=$1
TARGET=$2
TMPDIR=/tmp
FILENAME=`basename $SOURCE`
OCRFILE=$FILENAME.tif # to see what happens
#echo "from $SOURCE to $TARGET" >>/tmp/ocrtransform.log cp -f $SOURCE $TMPDIR/$OCRFILE # call tesseract and redirect output to $TARGET
tesseract $TMPDIR/$OCRFILE ${TARGET%\.*} -l eng
rm -f $TMPDIR/$OCRFILE

alfresco install in linux, and integrated with tesseract ocr的更多相关文章

  1. [VirtualBox] - Install Oracle Linux 7 on Oracle VirtualBox

    I'll start coding with JEE soon. Product environment adopts Oracle + WebLogic in Linux, technology a ...

  2. 如何处理错误消息Please install the Linux kernel header files

    Please install the Linux kernel "header" files matching the current kernel 当我启动minilkube时遇 ...

  3. Tesseract OCR使用介绍

    #Tesseract OCR使用介绍 ##目录[TOC] ##下载地址及介绍 官网介绍:http://code.google.com/p/tesseract-ocr/wiki/TrainingTess ...

  4. Tesseract Ocr引擎

    Tesseract Ocr引擎 1.Tesseract介绍 tesseract 是一个google支持的开源ocr项目,其项目地址:https://github.com/tesseract-ocr/t ...

  5. Python下Tesseract Ocr引擎及安装介绍

    1.Tesseract介绍 tesseract 是一个google支持的开源ocr项目,其项目地址:https://github.com/tesseract-ocr/tesseract,目前最新的源码 ...

  6. tesseract ocr文字识别Android实例程序和训练工具全部源代码

    tesseract ocr是一个开源的文字识别引擎,Android系统中也可以使用.可以识别50多种语言,通过自己训练识别库的方式,可以大大提高识别的准确率. 为了节省大家的学习时间,现将自己近期的学 ...

  7. Tesseract——OCR图像识别 入门篇

    Tesseract——OCR图像识别 入门篇 最近给了我一个任务,让我研究图像识别,从我们项目的screenshot中识别文字信息,so我开始了学习,与大家分享下. 我看到目前OCR技术有很多,最主要 ...

  8. 开源图片文字识别引擎——Tesseract OCR

    Tessseract为一款开源.免费的OCR引擎,能够支持中文十分难得.虽然其识别效果不是很理想,但是对于要求不高的中小型项目来说,已经足够用了. 文字识别可应用于许多领域,如阅读.翻译.文献资料的检 ...

  9. Docker install in Linux

    install command sudo yum install -y yum-utils device-mapper-persistent-data lvm2 sudo yum-config-man ...

随机推荐

  1. PTA Insert or Merge

    According to Wikipedia: Insertion sort iterates, consuming one input element each repetition, and gr ...

  2. 第三节 Hello world --python初体验

    祭旗--hello world 据说简单优雅.功能强大是python的魅力所在,这里看到简单了,优雅是什么样的,接下来的学习中慢慢体会吧! print ("Hello world" ...

  3. ios 按钮点击无反应

    今天项目遇到有个UIButton无法点击,弄了半天,总结出以下几个结论 1.如果一个UIButton的frame超出父视图的frame,UIButton还是可以显现的,但响应不了点击事件了,当开发中, ...

  4. win10使用小技巧以及常见问题处理方案

    1.win10开机一直处于黑屏状态或者反复重启怎么处理? 处理小方法:开机按win+X组合件进入高级修复模式---选择修复开启模式---f4进入安全模式开机状态---管理控制面板---禁用或者卸载显卡 ...

  5. getWinSystemIcon

    #include <QtGui/QImage>#include <QtGui/QPixmap>void getSystemIcon(const chConstStringA&a ...

  6. Arguments Optional

    function add() { //return false; if(typeof arguments[0] !== "number" || arguments.length & ...

  7. io流导出csv

    @RequestMapping("/doExport") public void doExport(Model model, @RequestParam(value = " ...

  8. POJ 3469 Dual Core CPU 最大流

    划分成两个集合使费用最小,可以转成最小割,既最大流. //#pragma comment(linker, "/STACK:1024000000,1024000000") #incl ...

  9. [修改后]html+css 做成一个可浏览的表格

    现在表格内容需要显示的要求如下: 1, 表格很大,界面放不小,需要放到div中. 2, 在div中可以用scroll滑动查看. 3, td中的内容保持在一行中. 4, 可以点击tr,然后可以选中并了解 ...

  10. sublime配置coffeeScript

    node.js 全局模块所在目录  npm -g ls 1.安装 npm install -g coffee-script 2.sublime安装CoffeeScript sublime语法高亮插件 ...