Install third-party Software on macOS

To have additional features like the full preview, you need to install some external components.

LibreOffice

  1. Please download and install LibreOffice in your system: https://www.libreoffice.org/download/
  2. Setup the application following the instructions at https://www.libreoffice.org/get-help/install-howto/os-x/
  3. Create a symbolic link from the command line (Terminal server) using the instructions below
    $ cd /Applications/LibreOffice.app/Contents/MacOS
    $ ln -s soffice soffice.bin

XCode

Please download and install XCode in your system: https://developer.apple.com/xcode

After the installation of XCode you also need to install the optional package 'Command Line Tools', so proceed as follows:

  • Launch XCode
  • Open the menu XCode->Preferences->Downloads
  • Select the 'Components' tab
  • Install 'Command Line Tools' item

Once you have your command line tools installed you can quit XCode.

Homebrew

Please download and install Homebrew in your system: http://brew.sh/

You can install Homebrew by executing this command:

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

ImageMagick

You have to install and configure ImageMagick (rel 6.6 or greater). LogicalDOC uses ImageMagick to manipulate images for previewing. 

To install it on MAC, execute this command:

$ brew install imagemagick

GhostScript

LogicalDOC needs to print documents to a virtual device sometimes when performing barcode recognition. In general in GhostScript is a package installed by default.

To install it on MAC, execute this command:

$ brew install ghostscript

Pdftohtml

This is a converter from Pdf to HTML format, LogicalDOC makes use of this utility to prepare the documents for annotations. Without this you will not be able to insert annotations inside the content of the document.

To install it on MAC, execute this command:

$ brew install pdftohtml

Tesseract

Tesseract is an Open Source OCR engine adopted by Google. This package represents the basic OCR engine available on LogicalDOC and it is required only if you want to extract texts inside images. Read this Mini How-To on how to install it.

However, to install it on MAC, execute this command:

$ brew install tesseract

OpenSSL

OpenSSL is the most known Open Source SSL implementation. This package is required to sign documents server-side.

To install it on MAC, execute this command:

$ brew install openssl

Antivirus ClamAV

LogicalDOC is integrated with the ClamAV antivirus to check if a submitted document is infected, the the best way is to install ClamXav, a free graphical front end that includes the clamav software: http://www.clamxav.com. Once installed execute it and it will guide to in the installation of the ClamAV antivirus, at the end check to have the command clamscan installed in your system, probably in /usr/local/clamXav/bin/clamscan

AcmeCadConverter

This utility is used to manage AutoCAD preview and conversion. The LogicalDOC distribution cannot include a licensed version of this utility so the preview will contain a watermark, to remove this watermark you will have to purchase a license from here: http://www.dwgtool.com/cadconvert.htm

Once you have a valid license key please do the following in LogicalDOC:

  • Stop LogicalDOC
  • Open the text file conf/context.properties
  • Locate the property acmecad.key and put here your license key
  • Save and start LogicalDOC

As this is a Windows application, you need to install wine in your MAC to use it so follow this procedure:

1. Go to the XQuartz homepage, download XQuartz, and install it.

2. Install wine by executing these commands:

$ brew install wine
$ sudo ln -s /usr/local/Cellar/wine/1.6.2/bin/wine /usr/local/bin/wine

The path /usr/local/Cellar/wine/1.6.2/bin/wine is where your wine was installed, it may be different in your system

To check if all is ok, execute this command:

$ wine /LogicalDOC/acmecad/AcmeCADConverter.exe

 

Prepare the Database on macOS

In order to setup a production system you have to prepare a MySQL database where the application will store all data.
To perform this step, make sure to have a MySQL up and running, if this is not the case install it: http://dev.mysql.com/downloads/mysql/

Once your MySQL instance is up and running, please open a terminal and execute this command:

$ sudo su

Setting Password for MySQL Root User

Execute the following commands at a shell prompt:

$ /usr/local/mysql/bin/mysqladmin -u root password 'password'

Type your password as requested in order to login as the root user.

Creating the database

Connect to mysql prompt typing the command:

$ /usr/local/mysql/mysql -u root -ppassword

Execute the following commands at the mysql prompt:

CREATE DATABASE logicaldoc;

Now we have an empty database called logicaldoc with a user root that can access it using password password.
You can exit the mysql prompt(command \q) and go ahead.

Post-installation

OS X uses launch daemons to automatically start, stop, and manage processes and applications such as MySQL.
But sometimes the installation process can go wrong or perhaps you run an upgrade of your Mac and MySQL will not start at boot...
To fix this problem you just need to add a special file into your /Library/LaunchDaemons directory, so please refer to the Oracle's MySQL reference manual to better understand the procedure:

https://dev.mysql.com/doc/refman/8.0/en/osx-installation-launchd.html

Attention

Directories and executable files inside the StartupItems and LaunchDaemons folder should have permissions of 0755 with the owner set to "root" and group set to "wheel." Other (non-executable) files should have permissions of 0644 with the owner set to "root" and group set to "wheel."

Install the Application on macOS

Get from the download website the setup file: installer-linux-<ver>.zip

To install LogicalDOC unpack the zip archive, open a terminal window and execute the command from command line:

$ java -jar logicaldoc-installer.jar

When the installer asks for database, please put your connection parameters as specified earlier during database preparation, don't use the embedded database for production.

Post-installation

To start LogicalDOC at server bootstrap you need to copy the startup script logicaldoc-all.plist into your StartupItems directory so execute the command:

$ cp /LogicalDOC/bin/logicaldoc-all.plist /Library/LaunchDaemons
$ chown root:wheel /Library/LaunchDaemons/logicaldoc-all.plist
$ chmod 0644 /Library/LaunchDaemons/logicaldoc-all.plis

Attention

Directories and executable files inside the StartupItems and LaunchDaemons folder should have permissions of 0755 with the owner set to "root" and group set to "wheel." Other (non-executable) files should have permissions of 0644 with the owner set to "root" and group set to "wheel."

Configure LogicalDOC

After the installation of LogicalDOC you will have to configure some paths in the administration.

Enter the the administration area: Administration > Settings > Client & External Apps

Here put the following paths:

  • Convert: /usr/local/bin/convert
  • Ghostscript: /usr/local/bin/gs
  • Tesseract: /usr/local/bin/tesseract
  • Pdftohtml: /usr/local/bin/pdftohtml
  • Openssl: /usr/bin/openssl

NOTE: paths may be different in your system

Enter the the administration area: Administration > Security > Antivirus

Here put the following paths:

  • ClamAV: /usr/local/clamXav/bin/clamscan

NOTE: paths may be different in your system

Configure the format converters

You may want to address at this time the configuration of the format converters you want to use to render the previews, and in particular the converter that uses Libre Office, please read the Format Converters Guide.

Save

Save