首页 技术 正文
技术 2022年11月14日
0 收藏 757 点赞 3,327 浏览 3419 个字

本文描述在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

<!–
pre { direction: ltr; color: rgb(0, 0, 0); orphans: 2; widows: 2; }pre.western { font-family: “DejaVu Sans Mono”,monospace; }pre.cjk { font-family: “DejaVu Sans Mono”,monospace; }pre.ctl { font-family: “DejaVu Sans Mono”,monospace; }p { margin-bottom: 0.08in; direction: ltr; color: rgb(0, 0, 0); text-align: justify; orphans: 2; widows: 2; }p.western { font-family: “Trebuchet MS”,sans-serif; font-size: 12pt; }p.cjk { font-family: “Times New Roman”,serif; font-size: 12pt; }p.ctl { font-family: “Times New Roman”,serif; font-size: 12pt; }code { font-family: “DejaVu Sans Mono”,monospace; }a.western:visited { }a.cjk:visited { }a.ctl:visited { }a:link { color: rgb(0, 0, 255); }
–>

  • 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
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,076
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,552
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,400
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,176
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,812
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,894