---
title: "Alfresco-Community-4.0.e安装配置"
author: "IThead"
date: "2012-11-14T13:45:30Z"
tags: []
categories: ["企业架构"]
slug: "alfresco-community-4-0-e"
draft: false
lastmod: "2012-11-14T15:56:13Z"
id: 1725461
url: "https://ithead.iteye.com/blog/1725461"
---

Alfresco是一款开源的企业内容管理系统（ECM），为企业提供了日常的文档管理、协同工作、工作记录管理、知识管理、网络内容管理、图片管理等多种功能。是基于JAVA开发的，可以部署到多种J2EE容器中;数据库支持mysql，oarcle,sqlserver等数据库。

我们这里已[Alfresco-Community-4.0.e.zip](http://fossies.org/unix/www/alfresco/alfresco-community-4.0.e.zip/)在Tomcat 6.0下的安装部署为例。

**安装**
1、环境及准备
            1>、jdk6.0（<span style="color:red">注意：Alfresco 4.2及以上版本需要jdk7</span>）；
            2>、postgreSQL数据库；（也可用MySQL）
            3>、tomcat6.0.XX 版本
            4>、Alfresco-Community-4.0.e.zip

2、解压alfresco-community-4.0.e.zip
![](http://dl.iteye.com/upload/attachment/0076/5725/72dc5bcf-42ca-3a2d-b6e6-bb7bb6d14166.jpg)
把bin文件下的所有内容copy到tomcat的bin文件夹下；
把shared目录及里面文件cppy到tomcat目录下，与tomcat的bin,webapps等目录平级；
把webapps下的alfresco.war和share.war两个war包copy到webapps目录下；
把数据库驱动程序copy到Tomcat/lib下即可；

3、配置
a)、打开<TOMCAT-HOME>/conf/catalina.properties配置文件，修改shared.loader=${catalina.base}/shared/classes，保存退出
b)、打开<TOMCAT_HOME>/shared/classes,
修改文件名alfresco-global.properties.sample为alfresco-global.properties
打开alfresco-global.properties，
修改dir.root=D:/apache-tomcat-alfresco_4.0/alf_data（数据存放目录，需提前建立好，下载[alf_data](http://222.73.28.91/7/file.data.vdisk.me/19474834/aefd342f256a6f11b4d301619f5f37803564b5c3?ip=1352879287,10.75.7.26&ssig=Z3lGaKnIlh&Expires=1352878087&KID=sae,l30zoo1wmz&fn=alf_data.zip)）
修改db.username=postgre
   db.password=root1234
这是数据库的用户名和密码，修改成自己的就可以。
选择不同的数据库connection,我这里使用的是postgerSQL
db.driver=org.postgresql.Driver
db.url=jdbc:postgresql://localhost/alfresco_4_0
这里需要注意：把驱动copy到tomcat/lib下；提前建立好一个空的数据库命名为alfresco_4_0
其他的可以暂时不用配置。

4、启动Tomcat，在浏览器中输入<http://localhost:8080/alfresco/faces/jsp/login.jsp>
输入用户名:admin ,密码admin，即可！

**问题**
Alfresco share 默认的端口是8080，如果你改了tomcat的端口，share 就不能登录了。
解决办法：打开<TOMCAT_HOME>/shared/classes/alfresco-global.properties
找到以下信息：修改端口即可!
#share.context=share
#share.host=${localname}
#share.port=8080
#share.protocol=http