Installing Alfresco Lab 3 Stable on Ubuntu 8.10

From alfrescowiki

Jump to: navigation, search

Warning: Archived Page
This page addresses a topic that is better suited to Alfresco's official documentation. This page is not being maintained and might not apply to modern versions of Alfresco. It is likely that we will completely remove this page in the future.

The official documentation is at: http://docs.alfresco.com


Install Ubuntu

Lets just make sure everything is current

apt-get update
apt-get upgrade

Install packages

I have added MySQL as part of the Ubuntu setup.

sudo apt-get install imagemagick mysql-server 'openoffice.org-headless' xvfb swftools  sun-java6-jdk 
sun-java6-jre nfs-common portmap ia32-libs

Note: The ia32-libs package is only needed if installing in a 64-bit environment.

You will have accept the JAVA license.
You will have to enter a password for MySQL.

Install Alfresco Lab

Ensure you have downloaded Alfresco-Labs-3Stable-Linux-x86-Install.

Locate and download

Alfresco-Labs-3Stable-Linux-x86-Install
  
chmod 777 Alfresco-Labs-3Stable-Linux-x86-Install
./Alfresco-Labs-3Stable-Linux-x86-Install


The installer will ask you if you want to install Alfresco [n/Y] The installer will ask you where you want to install Alfresco. The default is /opt/Alfresco.

[root@alfresco tmp]# ./Alfresco-Labs-3Stable-Linux-x86-Install
This will install Alfresco Labs on your computer.  Continue? [n/Y]
Where do you want to install Alfresco Labs? [/opt/Alfresco]
Installing Alfresco Labs...
Installing Program Files...
Installing Program Files Linux...
Installing Samples...
Installing WCM...
Installing WCM Linux...
Installation complete.
[root@alfresco tmp]#

Set up Alfresco Environment

cd /opt/Alfresco

Only have to change ALF_HOME and export JAVA_HOME

vi /opt/Alfresco/alfresco.sh
#!/bin/sh
# Start or stop Alfresco server
# Set the following to where Tomcat is installed
ALF_HOME=/opt/Alfresco
cd "$ALF_HOME"
APPSERVER="${ALF_HOME}/tomcat"
export JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.10/"
# Set any default JVM values
export JAVA_OPTS='-Xms128m -Xmx512m -XX:MaxPermSize=128m -server'
# Following only needed for Sun JVMs before to 1.5 update 8
#export JAVA_OPTS="${JAVA_OPTS}     -XX:CompileCommand=exclude,org/apache/lucene/index/IndexReader\$1,doBody -XX:CompileCommand=exclude,org/alfr
#esco/repo/search/impl/lucene/index/IndexInfo\$Merger,mergeIndexes -XX:CompileCommand=exclude,org/alfresco/repo/search/impl/lucene/index/Ind
#exInfo\$Merger,mergeDeletions"
#
if [ "$1" = "start" ]; then
  "${APPSERVER}/bin/startup.sh"
#  if [ -r ./virtual_start.sh ]; then
#    sh ./virtual_start.sh
#  fi
#  if [ -r "$ALF_HOME"/start_oo.sh ]; then
#    sh "$ALF_HOME"/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 "$ALF_HOME"/start_oo.sh ]; then
#    killall soffice.bin
#  fi
fi

Set up Virtual Alfresco Environment

Only have to change ALF_HOME and export JAVA_HOME

vi /opt/Alfresco/virtual_alf.sh
#!/bin/sh
# Start or stop Alfresco server
# Set the following to where Tomcat is installed
ALF_HOME=/opt/Alfresco
cd "$ALF_HOME"
APPSERVER="$ALF_HOME"/virtual-tomcat
export JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.10/"

# Start virtual-tomcat
#
if [ "$1" = "start" ]; then
  "$APPSERVER"/bin/startup.sh
elif [ "$1" = "stop" ]; then
  "$APPSERVER"/bin/shutdown.sh
fi


Change HSQL Database to MySQL Database

This process will wipe out all your data, be very very careful.

Test mysql is running:

mysql -u root -p

then exit:

mysql> exit;

Add Alfresco user etc to mysql

sudo mysql -p < /opt/Alfresco/extras/databases/mysql/db_setup.sql

See if the database is there:

#mysql -p
mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| alfresco           |
| mysql              |
+--------------------+
3 rows in set (0.00 sec)

mysql>quit


Change settings from HSQL to MySQL

cd tomcat/shared/classes/alfresco/extension/

Now, to direct Alfresco to use the MySQL database, two files (both located in the above directory) must be changed. Edit the first file, custom-repository.properties, with this command:

vi custom-repository.properties

Change the dir.root to the absolute path of the data folder:

# Sample custom content and index data location
#
dir.root=/opt/Alfresco/alf_data


Add comments to HSQL connection options Remove comments from MySQL connection options So it looks like below:

.....
# Derby connection
#
#db.driver=org.apache.derby.jdbc.EmbeddedDriver
#db.url=jdbc:derby:alf_data/derby_data/alfresco;create=true
#
# HSQL connection
#
#db.driver=org.hsqldb.jdbcDriver
#db.url=jdbc:hsqldb:file:alf_data/hsql_data/alfresco;ifexists=true;shutdown=true;
#
# MySQL connection (This is default and requires mysql-connector-java-5.0.3-bin.jar, which ships with the Alfresco server)
#
db.driver=org.gjt.mm.mysql.Driver
db.url=jdbc:mysql://localhost/alfresco
......

Save and close the file. We need to change one more file with this command:

vi custom-hibernate-dialect.properties
.......
#
# Derby dialect
#
#hibernate.dialect=org.hibernate.dialect.DerbyDialect
#
# HSQL dialect
#
#hibernate.dialect=org.hibernate.dialect.HSQLDialect
#
# MySQL dialect (default)
#
hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect
#
# PostgreSQL dialect
#
......

MySQL connectivity

If you use an already installed MySQL server you have to check if it's configured to be accessible over network.

Look at the configuration file with

more /etc/mysql/my.cnf

and search for a line which begins with

bind-address

If it looks like

......
bind-address = localhost
......

you can continue with the next steps of Alfresco installation.

Otherwise you have to change the hostname in the DB-URL in

custom-repository.properties

Look for

......
db.url=jdbc:mysql://localhost/alfresco
......

and replace localhost with the bind-adress of the mysql-configuration.

Give it a go

Share Website

/opt/Alfresco/alfresco.sh start
http://HOSTNAME:8080/share
user: admin
pass: admin

Web Interface

sh virtual_alf.sh start
http://HOSTNAME:8080/alfresco/
user: admin
pass: admin

SMB Interface

For SMB access try:

\\HOST_IP_ADDRESS\alfresco

Login as:

user: admin
pass: admin

FTP Access

For FTP access try:

ftp HOST_IP_ADDRESS

Login as:

user: admin
pass: admin

WebDAV access

For WebDAV access try this in a browser: The browser only has read only permissions.

http://HOST_IP_ADDRESS:8080/alfresco/webdav
user: admin
pass: admin

You can also access this through a Windows Mapped drive using the same URL. The Windows Mapped drive and read/write.


All good.


Start Alfresco at boot up

This will start alfresco when the server boots up The code was from http://blog.khax.net/2009/02/26/alfresco-setup-in-ubuntu-810-with-git/


create a file

vi initialize.sh

Add these lines

#!/bin/sh
ALF_HOME=/opt/Alfresco
echo "Creating init.d links"
ln -s $ALF_HOME/alfresco.sh /etc/init.d/alfresco
ln -s $ALF_HOME/virtual_alf.sh /etc/init.d/virtual_alf
update-rc.d alfresco defaults
ln -s $ALF_HOME/alfresco.sh /etc/init.d/alfresco
ln -s $ALF_HOME/virtual_alf.sh /etc/init.d/virtual_alf
update-rc.d alfresco defaults
update-rc.d virtual_alf defaults

Lets make it executable

chmod 777 initialize.sh

Run it

./initialize.sh


Reboot and see what happens.

Personal tools
© 2015 Alfresco Software, Inc. All Rights Reserved. Legal | Privacy | Disclaimers | Accessibility