Alfresco 4.0.e + MySQL 5.5 + Ubuntu 12.04.1 64 Bit
Installasi ini menggunakan OS Ubuntu 12.04.1 Server 64 Bit.
Mengingat bawaan dari paket alfresco menggunakan postgreSQL maka tutorial dibawah ini untuk koneksi ke MySQL. Tapi apabila mau diubah ke postgreSQL maka tinggal disesuaikan aja.
Alfresco di install pada direktori /opt/alfresco-4.0.e
Pastikan bahwa tidak terinstall java sebelumnya.
Semua installasi dibawah ini dalam mode root.
Installasi Oracle Java
- Download aplikasinya di http://www.oracle.com/technetwork/java/javase/downloads/jdk7u7-downloads-1836413.html jangan lupa untuk memilih yang 64 bit lalu di ekstrak
- tar xfvz jdk-7u7-linux-x64.tar.gz
- mkdir -p /opt/alfresco-4.0.e
- mv jdk1.7.0_07 /opt/jdk1.7.0_07
- chown -R root:root /opt/jdk1.7.0_07
- pico /etc/profile
Tambahkan baris terakhir dengan :JAVA_HOME=/opt/jdk1.7.0_07
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
JRE_HOME=/opt/jdk1.7.0_07/jre
PATH=$PATH:$HOME/bin:$JRE_HOME/bin
export JAVA_HOME
export JRE_HOME
export PATH - update-alternatives –install “/usr/bin/java” “java” “/opt/jdk1.7.0_07/bin/java” 1
- update-alternatives –install “/usr/bin/javac” “javac” “/opt/jdk1.7.0_07/bin/javac” 1
- update-alternatives –install “/usr/bin/javaws” “javaws” “/opt/jdk1.7.0_07/bin/javaws” 1
- update-alternatives –set java /opt/jdk1.7.0_07/bin/java
- update-alternatives –set javac /opt/jdk1.7.0_07/bin/javac
- update-alternatives –set javaws /opt/jdk1.7.0_07/bin/javaws
- /etc/profile
- java -version
Pastikan bahwa keluaran merupakan java 64 bit yang baru diinstall
java version “1.7.0_07”
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)
Installasi MySQL, ImageMagick, FFMpeg, LiberOffice
- apt-get install mysql-server mysql-client
- apt-get install imagemagick ffmpeg liberoffice
Installasi SWFTools
- apt-get install python-software-properties
- add-apt-repository ppa:guilhem-fr/swftools
- apt-get update
- apt-get install swftools
Installasi Tomcat 7
- wget http://www.gtlib.gatech.edu/pub/apache/tomcat/tomcat-7/v7.0.30/bin/apache-tomcat-7.0.30.tar.gz
Download aplikasi di http://tomcat.apache.org/download-70.cgi - tar xfvz apache-tomcat-7.0.30.tar.gz
- mv apache-tomcat-7.0.30 /opt/apache-tomcat-7.0.30
- chown -R root:root /opt/apache-tomcat-7.0.30
- ln -s /opt/apache-tomcat-7.0.30 /opt/alfresco-4.0.e/tomcat
- mkdir /opt/alfresco-4.0.e/tomcat/shared
- mkdir /opt/alfresco-4.0.e/tomcat/shared/classes
- mkdir /opt/alfresco-4.0.e/tomcat/shared/lib
- mkdir /opt/alfresco-4.0.e/tomcat/endorsed
- pico /opt/alfresco-4.0.e/tomcat/conf/catalina.properties
Tambahkan isian berikut pada shared.loadershared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar
- pico /opt/alfresco-4.0.e/tomcat/conf/server.xml
Tambahkan URIEncoding=”UTF-8″ sehingga menjadi : - wget http://cdn.mysql.com/Downloads/Connector-J/mysql-connector-java-5.1.21.tar.gz
Download pada http://www.mysql.com/downloads/connector/j/ - tar xfvz mysql-connector-java-5.1.21.tar.gz
- cp mysql-connector-java-5.1.21/mysql-connector-java-5.1.21-bin.jar /opt/alfresco-4.0.e/tomcat/lib
Installasi Alfresco
- wget http://dl.alfresco.com/release/community/build-00007/alfresco-community-4.0.e.zip
Download pada http://wiki.alfresco.com/wiki/Community_file_list_4.0.e - apt-get install unzip
- unzip alfresco-community-4.0.e.zip
- mv bin /opt/alfresco-4.0.e/
- mv licenses /opt/alfresco-4.0.e/
- mv web-server/endorsed/* /opt/alfresco-4.0.e/tomcat/endorsed/
- mv web-server/shared/* /opt/alfresco-4.0.e/tomcat/shared/
- mv web-server/lib/* /opt/alfresco-4.0.e/tomcat/lib/
- mv web-server/webapps/* /opt/alfresco-4.0.e/tomcat/webapps/
- mkdir /opt/alfresco-4.0.e/extras
- pico /opt/alfresco-4.0.e/extras/db_setup.sql
Isi dengan berikut :create database alfresco default character set utf8 collate utf8_bin;
grant all on alfresco.* to ‘alfresco’@’localhost’ identified by ‘my_password’ with grant option; - pico /opt/alfresco-4.0.e/extras/db_remove.sql
Isi dengan berikut :drop database alfresco;
revoke all privileges, grant option from ‘alfresco’@’localhost’;
drop user ‘alfresco’@’localhost’; - mysql -u root -p < /opt/alfresco-4.0.e/extras/db_setup.sql
- pico /opt/alfresco-4.0.e/alfresco.sh
#!/bin/sh
# Start or stop Alfresco server
# Set the following to where Tomcat is installed
ALF_HOME=/opt/alfresco-4.0.e
cd “$ALF_HOME”
APPSERVER=”${ALF_HOME}/tomcat”
export CATALINA_HOME=”$APPSERVER”# Set any default JVM values
#export JAVA_OPTS=’-Xms512m -Xmx1024m -Xss1024k -XX:MaxPermSize=256m -XX:NewSize=256m -server’
export JAVA_OPTS=’-Xms512m -Xmx768m -Xss768k -XX:MaxPermSize=256m -XX:NewSize=256m -server’
export JAVA_OPTS=”${JAVA_OPTS} -Dalfresco.home=${ALF_HOME} -Dcom.sun.management.jmxremote”#
if [ “$1” = “start” ]; then
“${APPSERVER}/bin/startup.sh”
# if [ -r ./virtual_start.sh ]; then
# sh ./virtual_start.sh
# fi
# if [ -r ./start_oo.sh ]; then
# sh ./start_oo.sh
# fi
elif [ “$1” = “stop” ]; then
“${APPSERVER}/bin/shutdown.sh”
# if [ -r ./virtual_start.sh ]; then
# sh ./virtual_stop.sh
# fi
# if [ -r ./start_oo.sh ]; then
# killall soffice.bin
# fi
fi - chmod ug+x /opt/alfresco-4.0.e/alfresco.sh
- pico /opt/alfresco-4.0.e/tomcat/shared/classes/alfresco-global.properties
Isi dengan dibawah ini dan sesuaikan datanya :###############################
# Common Alfresco Properties
###############################
#
# Sample custom content and index data location
#
dir.root=/opt/alfresco-4.0.e/alf_data
#
# Sample database connection properties
#
db.name=alfresco
db.username=alfresco
db.password=my_password
db.host=localhost
db.port=3306
#
# External locations
#————-
ooo.exe=/usr/bin/soffice
ooo.enabled=true
jodconverter.officeHome=/usr/lib/libreoffice
jodconverter.portNumbers=8101
jodconverter.enabled=true
img.root=/usr
swf.exe=/usr/bin/pdf2swf
ffmpeg.exe=/usr/bin/ffmpeg
#
# Property to control whether schema updates are performed automatically.
# Updates must be enabled during upgrades as, apart from the static upgrade scripts,
# there are also auto-generated update scripts that will need to be executed. After
# upgrading to a new version, this can be disabled.
#
db.schema.update=true
#
# MySQL connection
#
db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://${db.host}:${db.port}/${db.name}
#db.driver=org.gjt.mm.mysql.Driver
#db.url=jdbc:mysql://localhost/alfresco340?useUnicode=yes& amp;characterEncoding=UTF-8
# ALTER DATABASE alfresco SET ALLOW_SNAPSHOT_ISOLATION ON;
#
#db.driver=net.sourceforge.jtds.jdbc.Driver
#db.url=jdbc:jtds:sqlserver://localhost:1433/alfresco
#db.txn.isolation=4096
#PostgreSQL connection (requires postgresql-8.2-504.jdbc3.jar or equivalent)
#db.driver=org.postgresql.Driver
#db.url=jdbc:postgresql://localhost:5432/alfresco# Index Recovery Mode
#————-
index.recovery.mode=AUTO# Outbound Email Configuration
#————-
#mail.host=
#mail.port=25
#mail.username=anonymous
#mail.password=
#mail.encoding=UTF-8
#mail.from.default=alfresco@alfresco.org
#mail.smtp.auth=false
#
# Alfresco Email Service and Email Server
#————-
# Enable/Disable the inbound email service. The service could be used by processes other than
# the Email Server (e.g. direct RMI access) so this flag is independent of the Email Service.
#————-
#email.inbound.enabled=true
# Email Server properties
#————-
#email.server.enabled=true
#email.server.port=25
#email.server.domain=alfresco.com
#email.inbound.unknownUser=anonymous
# A comma separated list of email REGEX patterns of allowed senders.
# If there are any values in the list then all sender email addresses
# must match. For example:
# .*\@alfresco\.com, .*\@alfresco\.org
# Allow anyone:
#————-
#email.server.allowed.senders=.*
#
# The default authentication chain
# To configure external authentication subsystems see:
# http://wiki.alfresco.com/wiki/Alfresco_Authentication_Subsystems
#————-
authentication.chain=alfrescoNtlm1:alfrescoNtlm
# The password for the default principal (only used for LDAP sync)
#ldap.synchronization.java.naming.security.credentials=secret
#
# URL Generation Parameters (The ${localname} token is replaced by the local server name)
#————-
#alfresco.context=alfresco
#alfresco.host=${localname}
#alfresco.port=8080
#alfresco.protocol=http
#
#share.context=share
#share.host=${localname}
#share.port=8080
#share.protocol=http
cifs.enabled=true
ftp.enabled=true
cifs.serverName=${localname}
cifs.hostannounce=true
imap.server.enabled=false
#imap.server.port=143
#imap.server.host=
# Default value of alfresco.rmi.services.host is 0.0.0.0 which means ‘listen on all adapters’.
# This allows connections to JMX both remotely and locally.
#
alfresco.rmi.services.host=0.0.0.0
#
# RMI service ports for the individual services.
# These seven services are available remotely.
# Assign individual ports for each service for best performance
# or run several services on the same port. You can even run everything on 50500 if needed.
# Select 0 to use a random unused port.
#avm.rmi.service.port=50501
#avmsync.rmi.service.port=50502
#attribute.rmi.service.port=50503
#authentication.rmi.service.port=50504
#repo.rmi.service.port=50505
#action.rmi.service.port=50506
#wcm-deployment-receiver.rmi.service.port=50507
#monitor.rmi.service.port=50508 - /opt/alfresco-4.0.e/alfresco.sh start
Apabila berjalan dengan benar maka dapat mengakses alamat berikut http://my_ipaddress:8080/alfresco
Dan dapat login pada http://my_ipaddress:8080/share
Untuk ngebuat init scriptnya bisa merujuk di http://wiki.alfresco.com/wiki/Installing_Labs_3_Stable_on_Debian_Etch#INIT_Scripts
Apabila mengalami masalah dalam installasi dapat mengecek pada file :
tail -f /opt/alfresco-4.0.e/alfresco.log
Lalu bisa cek ke http://www.lucasmanual.com/mywiki/Alfresco
Selain itu juga pastikan bahwa hostname dapat di ping dan reply :
ping `hostname`
Proses start alfresco membutuhkan hardware yang rada besar maka dari itu proses up nya rada lama.
Referensi :
http://www.wikihow.com/Install-Oracle-Java-on-Ubuntu-Linux
http://www.ubuntugeek.com/how-to-install-swftools-in-ubuntu-12-0411-10-using-ppa.html
http://diegobenna.blogspot.com/2011/01/install-tomcat-7-in-ubuntu-1010.html
http://www.minoraddition.com/2012/01/23/installing-alfresco-4-0-c-on-ubuntu-server-11-10-32bit/
http://tpeelen.wordpress.com/2012/01/04/installing-alfresco-3-x-4-x-on-32bit-ubuntu/
http://wiki.alfresco.com/wiki/Installing_Labs_3_Stable_on_Debian_Etch#INIT_Scripts
http://www.lucasmanual.com/mywiki/Alfresco