AnsweredAssumed Answered

Guide to install Alfresco 5.0d on FreeBSD (FreeNAS Jail)

Question asked by andre78 on Jul 9, 2015
Latest reply on Jan 14, 2016 by newbe
Hello everybody,

I spent some time getting alfresco installed in a FreeBSD Jail on my FreeNAS Storage, and want to share my experience with you. I Do not know if this is suitable for a productive use, but for I me it is the perfect solution for my homeoffice.

<strong>Before I start, please let me ask you for a favour:</strong> I am still learning Alfresco, and will continue to do so. My plan is to integrate <strong>tesseract OCR</strong> for newly added PDFs. I found some hints, but haven't been successful yet. There are a lot of open questions for me (it looks like the way for alfresco 5 is different to V4, for which i found some info). To make it short: if anyone has the files (transformations) that are used (I think I am able to edit them for FreeBSD if they are for linux), can tell where to put them and which actions are to take - it would be great to have this as a step-by-step guide. I spent a lot of time on this without success.

ok, lets go:

There are some decisions to maker during install. I decided for MySQL over PostgreSQL, as the latter is difficult to install and keep running over Host system updates in FreeNAS.
After some searching i found a great install script, which finally worked after preparing the system with the following steps. You will find the script by searching for "andergrim freebsd" on github.

<strong>Prepare a new Jail:</strong>

pkg update
pkg upgrade

Install nano

pkg install nano wget

Prepare Jail for SSH access:

service start sshd

Now set sshd to autostart by setting sshd_enable to "YES" in /etc/rc.conf

nano /etc/rc.conf

Enable SSH over IPv4 by uncommenting  ListenAdress in the following file:

nano /etc/ssh/sshd_conf

now add a user for SSH, do not forget to invite to the group wheel when prompted:


<strong>Install the database</strong>

pkg install mysql56-server mysql-connector-java

If MySQL is installed, set your MySQL root password (you will need it later)

mysql -u root -p

<strong>Prepare for OpenJDK</strong>

Add the following lines to your /etc/fstab by using nano:

fdesc   /dev/fd   fdescfs   rw   0   0
proc   /proc   procfs   rw   0   0

<strong>Install packages needed for Alfresco</strong>

pkg install tomcat7  nginx libreoffice liberation-fonts-ttf droid-fonts-ttf ImageMagick-nox11 swftools tex-dvipsk

This will make sure you have all the packages needed by Alfresco. You might not need tex-dvipsk.

<strong>Run the install script</strong>

Download the script you found on githubm, make it executable as described there and run it. I answered the questions as follows. The fact I installed all the packages before was neccessary for my installation success.

Add alfresco system user [y/N] y
Install Tomcat [y/N] yPlease enter the public host name for Share server (fully qualified domain name) [alf] alf.home
Please enter the protocol to use for public Share server (http or https) [http]
Please enter the host name for Alfresco Repository server (fully qualified domain name) [alf.home]
Install Share config file (recommended) [y/N] y
Install Postgres JDBC Connector [y/N] y (you can possibly say no here)
Install Mysql JDBC Connector [y/N] y
Install nginx [y/N] y
Install OpenJDK7 [y/N] y
Install LibreOffice [y/N] y
Install ImageMagick [y/N] y
Install swftools [y/N] y
Add Alfresco war files [y/N] y
Add Google docs integration [y/N] n (up to you)
Add Sharepoint plugin [y/N] n (up to you)
Install SOLR4 indexing engine [y/N] y

Now run the database install scripts and follow the instructions:

cd /opt/alfresco/scripts/

One of the main problems after install were the keystore files. The files downloaded by the script are broken. You might need to edit the file below, at the time of my installation i had to change http to https:


Wgen you have edited the file, run it


After that, your installation is complete. Restart your jail, goto to http://YOURHOST:8080/share/ and enjoy Alfresco.