Installing 3.2 CE on Solaris 10 SPARC

Document created by resplin Employee on Jun 6, 2015
Version 1Show Document
  • View in full screen mode

Obsolete Pages{{Obsolete}}

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



This is a step by step how-to for installing Alfresco 3.2 on Solaris 10.  It uses JBoss because I found it easier than the Linux install script.  So just follow the steps and you should be up and running as fast as you can download the required software.

If your internet connection is slow (Expect to download about 800MB), you should run the download commands inside a 'screen' session so that the downloads will continue even if your ssh session disconnects.


Table of Contents


Security


Solaris do not allow you to log in as root by default.  For this howto you must perform the steps as root, to become root run the following:

su

Now create a user for alfresco and jboss to run on: (All the autostart scripts will be run as this user.)

useradd alfresco
passwd alfresco

As with any service account, choose a secure password that you can't remember and put it in a sealed envelope in a safe after you are done with the installation.


Blastwave pkgutil


Blastwave pkgutil allow you to securely install software to your server.

pkgutil will connect to the internet to download software, if you need a proxy for this, configure it in the .wgetrc file.



vi ~/.wgetrc

progress=dot:mega
use_proxy=on
ftp_proxy=http://proxy.abc.com:8080
http_proxy=http://proxy.abc.com:8080
proxy-user=XXX
proxy-passwd=XXXX

Install the pkgutil package manager

pkgadd -d http://blastwave.network.com/csw/pkgutil_`/sbin/uname -p`.pkg 

This was step 1, follow the other 3 steps from the blastwave howto.

http://www.blastwave.org/howto.html

JBoss


All the scripts in this howto assume that JBoss is installed to /opt/jboss.


Download and unzip JBoss


JBoss 4 is used because JBoss 5 support is still experimental. Download the latest JBoss 4 by editing the url below:

cd ~
/opt/csw/bin/wget http://sourceforge.net/projects/jboss/files/JBoss/JBoss-4.2.3.GA/jboss-4.2.3.GA-jdk6.zip/download
unzip jboss-4.2.3.GA-jdk6.zip -d /opt/jboss
mkdir /opt/jboss/log

Create JBoss startup script


This may be replaced by Solaris SMF services...

vi /etc/init.d/jboss

put the following in there.



#! /bin/sh

start(){
        FQDN=`/usr/sbin/check-hostname|cut -d' ' -f7`
        echo `date` ' : Starting jboss with FQDN:$FQDN' >> /opt/jboss/log/jboss-init.log
cd /opt/jboss/server/default/
        /opt/jboss/bin/run.sh -c default -b $FQDN -D jboss.bind.address=0.0.0.0 > /opt/jboss/log/jboss-console.log 2> /opt/jboss/log/jboss-console.log &
}

stop(){
        echo `date` ' : Stopping jboss' >> /opt/jboss/log/jboss-init.log
        /opt/jboss/bin/shutdown.sh -S &
}

restart(){
        stop
# give stuff some time to stop before we restart
        sleep 60
# protect against any services that can't stop before we restart (warning this kills all Java instances running as 'jboss' user)
        su -l jboss -c 'killall java'
# if the 'su -l ...' command fails try:
        #   sudo -u jboss killall java
        start
}

case '$1' in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        restart
        ;;
  *)
        echo 'Usage: jboss {start|stop|restart}'
        exit 1
esac
exit 0

Create a symlink to enable starting this script

ln -s /etc/init.d/jboss /etc/rc3.d/S85jboss

JBoss persistence provider


vi /opt/jboss/server/default/deploy/ejb3.deployer/META-INF/persistence.properties 

Change the line:

hibernate.bytecode.provider=javassist

to:

hibernate.bytecode.provider=cglib

JBoss JAVA_OPTS memory settings


vi /opt/jboss/bin/run.conf

Ensure JAVA_OPTS include the following

-Xms128m -Xmx512m -XX:MaxPermSize=128m

Alfresco


Download the latest Alfresco 3.2 WAR bundle and unzip the WAR files to /opt/jboss/server/default/deploy/ and the config files to /opt/jboss/server/default/conf/

cd ~
/opt/csw/bin/wget http://dl.alfresco.com/release/community/build-2039/alfresco-community-war-3.2.zip
unzip alfresco-community-war-3.2.zip -d ~/tmpalfresco
mv ~/tmpalfresco/*.war /opt/jboss/server/default/deploy/
rm -r /opt/jboss/server/default/conf/alfresco
mv ~/tmpalfresco /opt/jboss/server/default/conf/alfresco
mv /opt/jboss/server/default/conf/alfresco/extensions/extension/alfresco-global.properties /opt/jboss/server/default/conf/


Alfresco paths


vi /opt/jboss/server/default/conf/alfresco-global.properties 

Set the following

dir.root=/opt/jboss/server/default/alf_data
img.root=/opt/jboss/server/default/conf/alfresco/commands/ImageMagick
swf.exe=/opt/jboss/server/default/conf/alfresco/commands/bin

Sharepoint extensions


To use Sharepoint extensions you must install the VTI sharepoint extensions into the war file.
This script will download the sharepoint extension and the alfresco module management tool and then use the tool to install the extension into the war file.

cd ~
/opt/csw/bin/wget http://dl.alfresco.com/release/community/build-2384/vti-module.amp
/opt/csw/bin/wget http://dl.alfresco.com/release/community/build-2384/alfresco-mmt-3.2r.jar
java -jar alfresco-mmt-3.2r.jar install vti-module.amp /opt/jboss/server/default/deploy/alfresco.war -verbose


Alfresco JDBC connection


Create a datasource file which defines the connection details for your MySQL database and edit it with the appropriate parameters for your database.

cp /opt/jboss/docs/examples/jca/mysql-ds.xml /opt/jboss/server/default/deploy/
vi /opt/jboss/server/default/deploy/mysql-ds.xml

Change the jndi-name (I do not know if this is really needed because mine works without it)

<jndi-name>alfresco-datasource</jndi-name>

Change the connection url

<connection-url>jdbc:mysql://localhost:3306/alfresco</connection-url>

MySQL


MySQL JDBC driver


Download and install the MySQL JDBC driver.
In a browser open the following link then register or click the bypass registration link at the bottom of the screen to get to the list of mirrors.

http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.10.zip/from/pick

Copy a url from the mirror list provided and make the XXXX to be the same as the mirror URL.

/opt/csw/bin/wget http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.10.zip/from/XXXX
unzip mysql-connector-java-5.1.10.zip
mv ./mysql-connector-java-5.1.10/mysql-connector-java-5.1.10-bin.jar /opt/jboss/server/default/lib
rm -R ./mysql-connector-java-5.1.10/

MySQL Install


/opt/csw/bin/pkgutil -i CSWmysql5

or if you want phpmyadmin with apache then use:

/opt/csw/bin/pkgutil -i phpmyadmin

MySQL Config


Create the config file /opt/csw/mysql5/my.cnf, as follows:

cp /opt/csw/mysql5/share/mysql/my-medium.cnf /opt/csw/mysql5/my.cnf

From: http://www.sun.com/bigadmin/features/articles/samp_setup.jsp


Create DB


/opt/csw/mysql5/bin/mysql 


This makes the database accessible from anywhere with an easy password, don't do it in production!



/opt/csw/mysql5/bin/mysql

drop user 'alfresco'@'localhost';
create user 'alfresco'@'localhost' identified by 'alfresco';
grant all privileges on *.* to alfresco @'localhost' with grant option;

drop user 'alfresco'@'%';
create user 'alfresco'@'%' identified by 'alfresco';
grant all privileges on *.* to alfresco @'%' with grant option;

Other useful MySQL commands:



show databases;
show grants;

OpenOffice


Install OpenOffice

/opt/csw/bin/pkgutil -i openofficeengb

Create OpenOffice startup script


vi /etc/init.d/openoffice

put the following in there.



#!/bin/sh
# Boot open office so that Alfresco can do transforms.

SOFFICE_PATH='/opt/csw/OpenOffice.org/program'
SOFFICE_ARGS1='-nofirststartwizard -nologo -headless '
SOFFICE_ARGS2='-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager'
SOFFICE_PIDFILE=/var/run/soffice.bin.pid

start_soffice() {
       echo `date` ' : Starting OpenOffice' >> /opt/jboss/log/openoffice-init.log
       $SOFFICE_PATH/soffice $SOFFICE_ARGS1 $SOFFICE_ARGS2 > /opt/jboss/log/openoffice-console.log 2> /opt/jboss/log/openoffice-console.log &
       echo
}
start() {
       start_soffice
}
stop() {
       echo `date` ' : Stopping OpenOffice' >> /opt/jboss/log/openoffice-init.log
       echo -n $'Stopping OpenOffice ... I haven't figured out how to yet...'
       echo
}
case '$1' in
       start)
               start
               ;;
       stop)
               stop
               ;;
       restart)
               stop
               start
               ;;
       *)
               echo $'Usage: $0 {start|stop|restart}'
esac

Create a symlink to auto start this script

ln -s /etc/init.d/openoffice /etc/rc3.d/S60openoffice

ImageMagick


Download ImageMagick and install.

cd ~
/opt/csw/bin/wget http://www.imagemagick.org/download/binaries/ImageMagick-sparc-sun-solaris2.10.tar.gz
file=ImageMagick-sparc-sun-solaris2.10.tar.gz
gzcat $file | tar xfv -
rm -r /opt/jboss/server/default/conf/alfresco/commands/ImageMagick
mv ImageMagick-6.4.4 /opt/jboss/server/default/conf/alfresco/commands/ImageMagick

pdf2swf


TODO: Find a binary for Solaris and install it.




DONE! Test It


The following links use the default ports, if you changed the ports, then use those instead.


Start Alfresco Manually


/etc/init.d/openoffice start
/etc/init.d/jboss start

Default Login Credentials


user: admin
pass: admin

Share Website


http://HOSTNAME:8080/share

Web Interface


http://HOSTNAME:8080/alfresco/

SMB Interface


\\HOST_IP_ADDRESS\alfresco

FTP Access


ftp HOST_IP_ADDRESS

WebDAV access


Try this in a browser for read only access or through a Windows mapped drive for read/write access.

http://HOST_IP_ADDRESS:8080/alfresco/webdav

Management


Logging


vi /opt/jboss/server/default/conf/jboss-log4j.xml

find the <root> section and delete the CONSOLE item and add or edit the following item

<priority value='INFO' />

Monitor the logs


Run these each in it's own screen session, then you can connect at any time to see the output.

tail -f /opt/jboss/log/jboss-console.log
tail -f /opt/jboss/log/openoffice-console.log
tail -f /opt/jboss/server/default/log/server.log
tail -f /opt/jboss/server/default/alfresco.log

Cleanup Logs


This script is useful for debug purposes when you want to remove old log files and start from a clean slate.

rm -i /opt/jboss/log/* /opt/jboss/server/default/log/* /opt/jboss/server/default/alfresco.log*

Delete Alfresco data!


WARNING: This will delete all Alfresco data! It can not be undone!!
Make sure Jboss and Alfresco is not running.

ps -eaf |grep jboss

Delete the alf_data folder.

rm -R /opt/jboss/server/default/alf_data

Delete the database. Remember to go back to the top of this howto and re-create the database, otherwise alfresco will not start up again.


/opt/csw/mysql5/bin/mysql
$ALF_HOME/tomcat/shared/classes/alfresco-global.properties


???

Alfresco Share NTLM


Edit $ALF_HOME/tomcat/webapps/share/WEB-INF/web.xml
Uncomment the 2 commented NTLM sections as described here: http://wiki.alfresco.com/wiki/3.0_Configuring_NTLM#Alfresco_Share_SSO_using_NTLM




CIFS File Server subsystem


Append to:


$ALF_HOME/tomcat/shared/classes/alfresco-global.properties


# CIFS File Server subsystem
cifs.localname=Server DNS name
cifs.domain=WORKGROUP

cifs.serverName=${localname}
cifs.urlfile.prefix=http://${localname}:8080/alfresco/
filesystem.name=Alfresco
cifs.enabled=true
cifs.bindto=0.0.0.0

Enable Debug Logging


Undo this when everything is working.
Edit the file:

/opt/jboss/server/default/deploy/alfresco.war/WEB-INF/classes/log4j.properties

Append the following:



# Enable Debug Logging for some subsystems
log4j.logger.org.alfresco=info
log4j.logger.org.alfresco.repo.workflow=debug
log4j.logger.org.alfresco.smb.protocol.auth=debug
log4j.logger.org.alfresco.acegi=debug
log4j.logger.org.alfresco.ftp.server=debug
log4j.logger.org.alfresco.webdav.protocol=debug
log4j.logger.org.alfresco.web.app.servlet.NTLMAuthenticationFilter=debug
log4j.logger.org.alfresco.repo.webdav.auth.NTLMAuthenticationFilter=debug
log4j.logger.org.alfresco.web.app.servlet.KerberosAuthenticationFilter=debug
log4j.logger.org.alfresco.repo.webdav.auth.KerberosAuthenticationFilter=debug
log4j.logger.org.alfresco.repo.security.authentication.ldap=DEBUG
log4j.logger.org.alfresco.module.vti=debug
log4j.logger.org.alfresco.cmis=debug
log4j.logger.org.alfresco.repo.imap=debug
log4j.logger.org.alfresco.fileserver=debug

Change port numbers


If you are sharing a server with other Java apps, here is how to make Alfresco use other ports.


Tomcat



$ALF_HOME/tomcat/conf/server.xml

FROM:

   

TO:

   

RMI


Append to:


$ALF_HOME/tomcat/shared/classes/alfresco-global.properties


# The well known RMI registry port is defined in the alfresco-shared.properties file
alfresco.rmi.services.port=50600
#
# RMI service ports for the individual services.
# These six 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=50601
avmsync.rmi.service.port=50602
attribute.rmi.service.port=50603
authentication.rmi.service.port=50604
repo.rmi.service.port=50605
action.rmi.service.port=50606

Sharepoint


Append to:


$ALF_HOME/tomcat/shared/classes/alfresco-global.properties


#Sharepoint
vti.server.port=8082
web.application.context.url=http://localhost:8081/alfresco

Share


Edit:


$ALF_HOME/tomcat/webapps/share/WEB-INF/classes/alfresco/webscript-framework-config.xml

Change all references to 8080 to the new port 8081
As described here http://www.linknet.se/cstrom/index.php?entry=entry090103-214918




References


This is a combination of the following pages with additions and corrections.


TODO


  • Explain how to configure LDAP/Active Directory authentication, this is not yet working in my environment.

Installation
JBoss

Attachments

    Outcomes