MyTetra Share
Делитесь знаниями!
Ручная установка Alfresco (на английском)
Время создания: 25.01.2012 12:09
Раздел: Компьютер - Управление проектами - Tomcat и Alfresco
Запись: xintrea/mytetra_syncro/master/base/1327478945ruhz58qir5/text.html на raw.github.com

Alfresco WAR install guide for Ubuntu 10.04

by citizenkane » 15 Jun 2011, 21:22

I have experienced that running Alfresco 3.4d from the install binaries on a system running other services and servers is most unreliable and buggy. (Not to mention that the whole install runs as root!)

Doing a clean install from the WAR using a Postgresql database is much more stable and efficient. (and it runs as a non-privelidged user)

Here is how on a 64bit Zentyal server (Ubuntu 10.04 based)

Thanks to: http://blog.mycroes.nl/2010/04/installing-alfresco-33-on-ubuntu-lucid.html

from which this guide is expanded from.

Install additional apps

sudo apt-get install imagemagick swftools sun-java6-jre postgresql

I have had endless trouble with OpenOffice "breaking" and being unable to convert docs for preview. I find Libreoffice is much more reliable, besides the log error it throws regarding not being able to find the openoffice version. So:

sudo apt-get purge openoffice.org ure

sudo apt-get install python-software-properties

sudo add-apt-repository ppa:libreoffice/ppa

sudo apt-get update

sudo apt-get install libreoffice

Install Tomcat6 from the Ubuntu repo

sudo apt-get install tomcat6

Install Tomcat native libraries

sudo apt-get install libtcnative-1

Download Alfresco

Download the Alfresco WAR from:

http://process.alfresco.com/ccdl/?file=release/community/build-3370/alfresco-community-3.4.d.zip

and unzip into ~Downloads/alfresco

Stop tomcat

sudo service tomcat6 stop

Copy the following

sudo cp -r ~/Downloads/alfresco/web-server/shared /var/lib/tomcat6

sudo cp -r ~/Downloads/alfresco/web-server/webapps /var/lib/tomcat6

sudo cp -r ~/Downloads/alfresco/web-server/lib /var/lib/tomcat6/shared/lib

sudo cp -r ~/Downloads/alfresco/bin /var/lib/tomcat6/bin

sudo cp -r ~/Downloads/alfresco/licenses /var/lib/tomcat6/licenses

sudo cp -r ~/Downloads/alfresco/README.txt /var/lib/tomcat6/README.txt

sudo rm /var/lib/tomcat6/shared/lib/mysql-connector-java-5.1.13-bin.jar

Download JDBC drivers for Postgresql

Download the JDBC drivers for Postgresql from

http://jdbc.postgresql.org/download.html

to folder ~/Downloads and type command:

sudo cp ~/Downloads/postgresql-9.0-801.jdbc3.jar /var/lib/tomcat6/shared/lib/postgresql-9.0-801.jdbc3.jar

sudo su

Then

mv /var/lib/tomcat6/shared/classes/alfresco-global.properties.sample /var/lib/tomcat6/shared/classes/alfresco-global.properties

mv /var/lib/tomcat6/shared/classes/alfresco/web-extension/share-config-custom.xml.sample /var/lib/tomcat6/shared/classes/alfresco/web-extension/share-config-custom.xml

Edit config:

nano /var/lib/tomcat6/conf/catalina.properties

and change the "shared.loader=" line to:

shared.loader=${catalina.home}/shared/classes,${catalina.home}/shared/*.jar,/var/lib/tomcat6/shared/classes,/var/lib/tomcat6/shared/lib/*.jar

Java does not handle memory for Alfresco suitably "out of the box" and you have to configure it in file /etc/default/tomcat6:

JAVA_HOME=/usr/lib/jvm/java-6-sun

JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=512m -Xms128m -Xmx768m -Dalfresco.home=/opt/alfresco -Dcom.sun.management.jmxremote"

If you have a single CPU with one or dual cores:

JAVA_OPTS="${JAVA_OPTS} -XX:+CMSIncrementalMode" (note the typo of missing brackets in the default file)

These can vary to suite your needs and resources and more can be read here:

http://www.alfresco.com/help/34/community/all/

under "Tuning the JVM"

Postgresql database

Create a Postgresql database of UTF8 called "alfresco".

Create a directory for your data in a place of your choosing, eg:

mkdir -p /srv/www/alfresco/alf_data

Ensure the user you are running Tomcat as has the correct access permissions:

chown -R tomcat6:tomcat6 /var/lib/tomcat6 /srv/www/alfresco

Set the Alfresco properties in /var/lib/tomcat6/shared/classes/alfresco-global.properties to suite your system, eg:

web.application.context.url=http://127.0.0.1:<yourport>/alfresco

ooo.exe=/usr/lib/libreoffice/program/soffice

ooo.enabled=true

jodconverter.officeHome=/usr/lib/libreoffice

jodconverter.portNumbers=8101

jodconverter.enabled=true

img.root=/usr/lib/ImageMagick-6.5.7

img.exe=/usr/bin/convert

swf.exe=/usr/bin/pdf2swf

db.driver=org.postgresql.Driver

db.url=jdbc:postgresql://localhost:5432/alfresco

IF YOU NEED TO CHANGE THE DEFAULT PORTS

The default port is 8080. There are a number of places you need to change this if, for eg. you need to use 8180.

Find and replace :8080 to :8180 in the following places:

/etc/tomcat6/server.xml

/var/lib/tomcat6/shared/classes/alfresco-global.properties

/var/lib/tomcat6/shared/classes/alfresco/web-extension/share-config-custom.xml

In share-config-custom.xml be sure to uncomment the "example port config used to access remote Alfresco server" section at the bottom and revise your port number.

You should now be good to go!

service tomcat6 start

Browse to:

http://<yourip>:<yourport>/share (it will take a few minutes to start up)

Default user and password is: admin admin

You can find your log files in:

/var/lib/tomcat6/alfresco.log

/var/lib/tomcat6/log/catalina.out

Good Luck!

Так же в этом разделе:
 
MyTetra Share v.0.59
Яндекс индекс цитирования