From Limbas Wiki

Jump to: navigation, search
This page is a translated version of the page -FreeBSD and the translation is 100% complete.

Main Page

This installation was successfully tested on freeBSD 10.2 32bit.

Note: Labels in brackets {} can be replaced with any text, but they must be consistently consistent in order to successfully install LIMBAS. Unless otherwise specified, the following calls from the command line are made by the user "root".

Installation Hints

If LIMBAS is installed on a virtual machine, it is recommended to set up an SSH access, e.g. to paste the command line commands by copy-and-paste. For this, the following steps should be carried out on the server installation:

The line PermitRootLogin yes must be added or uncommented in the "/etc/ssh/sshd_config" file.

The line sshd_enable="YES" must be added or uncommented in the "/etc/rc.conf" file.

 $ /etc/rc.d/sshd restart

FreeBSD Package Selection

In addition to the minimalist installation, the following base packages have be installed as well for LIMBAS:

  • apache24
  • php56
  • php56-gd
  • php56-imap
  • php56-odbc
  • php56-soap
  • php56-xml
  • php56-ctype
  • php56-mbstring
  • php56-iconv
  • postgresql93-server
  • postgresql-odbc
  • htmldoc
  • wget
  • ImageMagick
  • unixODBC
  • zip
  • unzip
  • p5-Image-Exiftool
  • mod_php56
 $ pkg install apache24 php56 php56-gd php56-imap php56-odbc php56-soap php56-xml php56-ctype php56-mbstring php56-iconv\
              postgresql93-server postgresql-odbc htmldoc wget ImageMagick unixODBC zip unzip p5-Image-Exiftool mod_php56
$ pkg update

If there are problems with unixODBC during the LIMBAS installation, a new installation via ports can help:

$ cd /usr/ports/databases/unixODBC
$ make install

Database Setup

Limbas supports multiple databases. Depending on the database, different installations must be carried out. By default, the PostgreSQL database is used.
see Quickinstall


From version 2.0.22 onwards, LIMBAS supports UTF8. LIMBAS converts the date and time formats independently and requires the date format "DD.MM.YYYY". Since PostgreSQL is installed with localization as standard, a few additional steps must be considered.
See also PostgreSQL

  • Restart Database Server automatically:

Add or uncomment the line postgresql_enable="YES" to the /etc/rc.conf file.

  • Stop Database Server:
$ /usr/local/etc/rc.d/postgresql stop
  • If a database cluster already exists, the following step can be skipped.
  • Create Database Cluster:
$ /usr/local/etc/rc.d/postgresql initdb
  • Authentication is performed when a client accesses the PostgreSQL database server. This client authentication is controlled by the file "pg_hba.conf". If no changes have been made to the PostgreSQL configuration file "postgresql.conf", this is taken from the directory "/usr/local/pgsql/data/" (for more information see http://www.postgresql.org/docs/8.4/interactive/runtime-config-file-locations.html). By means of the corresponding entry in the file "pg_hba.conf" make sure that the authentication for LIMBAS access is successful (see client-authentication)
  • Start the Database Server and, if necessary, check the status:
$ /usr/local/etc/rc.d/postgresql start
  • Check Status
$ /usr/local/etc/rc.d/postgresql status
  • Create Database (Possible encodings would be LATIN1, SQL_ASCII or UTF-8) and if necessary check for existence:
 $ su - pgsql
# createuser -P {limbasuser}
Enter password for new role: {limbasuserPW}
# createdb {limbasdb} -O {limbasuser} --encoding=UTF-8 --locale=C --template=template0
# createlang plpgsql {limbasdb}
# psql -l
                                 Liste der Datenbanken
   Name    | Eigentümer | Kodierung | Sortierfolge | Zeichentyp  | Zugriffsrechte
{limbasdb} |{limbasuser}| SQL_ASCII | C            | C           |
 postgres  | postgres   | SQL_ASCII | C            | C           |
 template0 | postgres   | SQL_ASCII | C            | C           | =c/postgres
                                                                 : postgres=CTc/postgres
 template1 | postgres   | SQL_ASCII | C            | C           | =c/postgres
                                                                 : postgres=CTc/postgres
(4 Zeilen)
# createlang -l {limbasdb}
Prozedurale Sprachen
  Name   | Vertraut?
 plpgsql | yes
# exit

Configure ODBC

There are two variants of connecting LIMBAS to the database:

  • Connection with direct ODBC driver access
  • Connection with ODBC-resource

The following two points are to be carried out for both variants:

  • Determine the paths of the configuration files of unixODBC:
$ odbcinst -j
unixODBC 2.3.4
DRIVERS............: /usr/local/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini

In the file found in "DRIVERS" (here "/usr/local/etc/odbcinst.ini") add the drivers with file name and path (e.g. {postgreSQLDriver}= PSQL):

# Setup from the unixODBC package
Description     = PostgreSQL
Driver          = /usr/local/lib/psqlodbcw.so
UsageCount      = 1
WARNING: For older PostgreSQL versions (<= 8.3) the following driver can be used:
Driver =  /usr/local/lib/psqlodbc.so

The following point is only necessary for a connection using ODBC-resource.

  • In the file found in "SYSTEM DATA SOURCES" (here "/usr/local/etc/odbc.ini") add the following entry:
Description             = PSQL
Driver                  = {postgreSQLDriver}
Trace                   = No
TraceFile               =
Database                = {limbasdb}
Servername              = localhost
Username                = {limbasuser}
Password                = {limbasuserPW}
Port                    = 5432
Protocol                = 6.4
ReadOnly                = No
RowVersioning           = No
ShowSystemTables        = No
ShowOidColumn           = No
FakeOidIndex            = No
ConnSettings            =
Note: It is important to use the original PostgreSQL ODBC driver (psqlodbcw.so) of the package "postgresql-odbc" and not the enclosed driver of unixODBC!!

PHP Configuration

The PHP configuration has to be adapted in "/usr/local/etc/php.ini". If there is no php.ini file, the php-development.ini must be copied and renamed. First, the following general settings should be set:

  • short_open_tag = On
  • register_globals = Off
  • error_reporting = E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR

The following settings should also be added Security:

  • magic_quotes_gpc = off
  • file_uploads = On
  • upload_max_filesize = 10M
  • post_max_size = 16M
  • memory_limit = 128M
  • max_input_vars = 10000

If PHP 5.4 or higher is not available, the following entry should be used instead of magic_quotes_gpc:

  • magic_quotes = Off

Apache HTTP Server Setup

The root directory of the Apache server and Apache users as well as their group must be known for the LIMBAS installation. These can be found in the "/usr/local/etc/apache24/httpd.conf" file:

  • The root directory of the Apache server can be determined from the "DocumentRoot" entry (by default "/usr/local/www/apache24/data").
  • The Apache user and his group can be determined from the "User" and "Group" entries ("www" by default).

For the .htaccess files used in the LIMBAS directories to be interpreted by the Apache server, add the following entry:

<Directory "{DocumentRoot}/openlimbas/dependent">
      AllowOverride All

If the file "/usr/local/etc/apache24/Includes/php5.conf" does not exist, it must be specified with the following content::

<IfModule mod_php5.c>
   AddType application/x-httpd-php .php
   AddType application/x-httpd-php-source .phps
   DirectoryIndex index.php

Start the Apache HTTP Server:

$ /usr/local/etc/rc.d/apache24 onestart

For problems with newer Apache versions (from 2.4) the activation of the access_compat-module can contribute to the solution. If this does not help, in every .htaccess-file

Order allow,deny
Allow from all

has to be changed to

Require all granted

LIMBAS Installation

$ wget http://sourceforge.net/projects/limbas/files/limbas%20source%20package/2.x/openlimbas_2.9.11.1161.tar.gz/download
  • Save the download file (here "openlimbas_2.9.11.1161.tar.gz") in {DocumentRoot} and extract it there:
$ tar xzfv openlimbas_2.9.11.1161.tar.gz openlimbas
When extracting, the directory "<DocumentRoot>/openlimbas" is created with the following subdirectories:
  • limbas_src: Contains the LIMBAS source files, which will be overwritten in the case of an update, while individual settings won't be deleted.
  • independent: Contains external applications which are used by LIMBAS. An update of these applications that is decoupled with LIMBAS is possible though not recommended, because the compatibility is only tested with the versions shipped by LIMBAS.
  • public: Contains for example a SOAP application. The files in this directory are optional and not required by LIMBAS.
  • dependent: Is the main working directory, which also stores individual settings. Die directories and files from limbas_src point to this directory as symbolic links.
  • If the files and directories from "{DocumentRoot}/openlimbas/limbas_src" are copied into "{DocumentRoot}/openlimbas/dependent" instead of being symbolic links (on some systems there might be problems with extracting symbolic links), then proceed as shown in Known Solutions:
Note: LIMBAS needs write-access to "./openlimbas/dependent" and all its sub directories that individual settings can be saved. To grant access rights, simply set the apache user as owner (in this case "www"). $ chown -R www:www openlimbas/dependent
  • If the client browser runs on a different host, ensure that the firewall configuration grants access from this client to the LIMBAS host.
  • The LIMBAS database structure can now be created using a browser. To do this, the LIMBAS installation script must be called with the following URL:
  • In the installation mask, the parameters of the created PostgreSQL database instance must now be entered. Depending on the way LIMBAS connects to the database, these differ:
    • Connection with direct ODBC driver access
      • Database Vendor: PostgreSQL
      • Database Host: localhost
      • Database Name: {limbasDB} (see Setup Database)
      • Database User: {limbasuser} (see Setup Database)
      • Database Password: {limbasuserPW} (see Setup Database)
      • Database Scheme: public
      • SQL Driver (unixODBC): {postgreSQLDriver} (see Configure ODBC)
    • Connection with ODBC-resource
      • Database Vendor: PostgreSQL
      • Database Host: localhost
      • Database Name: {limbasOdbcResourceName} (see Configure ODBC)
      • Database User: (no entry required)
      • Database Password: (no entry required)
      • Database Scheme: public
      • SQL Driver (unixODBC): (no entry required)
The Web Interface tries to automatically enter all the paths correctly. If this does not happen or the fields remains empty, the php.ini should be rechecked.
  • When clicking on "check", LIMBAS checks if all required functions are available. The installation can only proceed, if the minimum requirements are satisfied. This is indicated by the green and yellow check marks. If this is the case, you can select the desired installation:
    • demo.tar.gz: The database will contain user data for demonstration purposes of LIMBAS.
    • clean.tar.gz: The database does not contain user data.
  • When clicking on "install", the installation will start. The progress of the installation is shown by the green progress bar.
  • User "root": The installation script copies the database settings into the file "{DocumentRoot}/openlimbas/dependent/inc/include_db.lib". If this file is changed, then it won't anymore be possible for LIMBAS to access the database. In order to prevent unintended manipulations or corruptions, all write access rights should be removed from this file.
chmod 444 {DocumentRoot}/openlimbas/dependent/inc/include_db.lib
  • After a successfull installation, LIMBAS can be started by clicking on the link "test installation" or from the following URL:
Right after opening the URL, authentication will be requested. Use the following credentials for the user which is setup by default with all administration rights:
  • Username: admin
  • Password: limbas