-OpenSUSE

From Limbas Wiki

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

Main Page


For this instruction, a basic OpenSUSE installation is required. This description refers to a 32 bit system.

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 Tints

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:
First the entry SELINUX = disabled can be added in the file /etc/sysconfig/selinux. This can also help to solve connection problems during the LIMBAS installation. After this, the virtual machine must be restarted. The firewall should now be disabled or customized as follows:

$ /etc/init.d/iptables save
$ service iptables stop
$ chkconfig iptables off

alternativ:

$ chkconfig SuSEfirewall2_init off
$ rcSuSEfirewall2 stop

Lastly, you should ensure that the OpenSSH server has already been installed and started.

$ zypper in openssh-server
$ zypper in openssh (alternative)
$ 'rcsshd start

Package Selection

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

  • apache2
  • apache2-mod_php7
  • php7
  • php7-gd
  • php7-iconv
  • php7-imap
  • php7-ldap
  • php7-ctype
  • php7-mbstring
  • php7-odbc | php7-pdo
  • php7-pgsql | php7-mysql
  • php7-soap
  • php7-zlib
  • postgresql
  • postgresql-server
  • psqlODBC
  • unixODBC
  • ImageMagick
  • htmldoc
  • ghostscript
  • wget
  • zip
  • unzip
  • exiftool
  • poppler-tools
 $ zypper in apache2 apache2-mod_php7 php7 php7-gd php7-iconv php7-imap php7-ldap php7-ctype php7-mbstring\
php7-pdo php7-pgsql php7-soap php7-zlib postgresql postgresql-server psqlODBC unixODBC\
ImageMagick ghostscript wget zip unzip exiftool poppler-tools

LIMBAS needs "htmldoc" in the version 1.9.x or later, the standard version 1.8.x from the packages is not sufficient. Therefore a download of the sources (http://www.htmldoc.org/software.php) and manual translation / installation is to be carried out.

Setup Database

See Quickinstall

PostgreSQL

From Version 2.0.22 onwards, LIMBAS supports UTF8. If UTF8 is not required, ISO encoding is recommended. 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.

  • Stop Database Server
$ /etc/init.d/postgresql stop (bzw. rcpostgresql stop)
  • If a database cluster already exists, the following step can be skipped.
  • Create new Database Cluster:
$ su - postgres
 # initdb -D /var/lib/pgsql/data
The files that belong to this database system will belong to the user "postgres".
The server process must also belong to this user.
The database cluster will be initialized with locale C.
The default database encoding has accordingly been set to SQL_ASCII.
The default text search configuration will be set to "english".
fixing permissions on existing directory /var/lib/pgsql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 32MB
creating configuration files ... ok
creating template1 database in /var/lib/pgsql/data/base/1 ... ok
initializing pg_authid ... ok
initializing dependencies ... ok
creating system views ... ok
loading system objects' descriptions ... ok
creating conversions ... ok
creating dictionaries ... ok
setting privileges on built-in objects ... ok
creating information schema ... ok
vacuuming database template1 ... ok
copying template1 to template0 ... ok
copying template1 to postgres ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the -A option the
next time you run initdb.


Success. You can now start the database server using:
    postgres -D /var/lib/pgsql/data
or
    pg_ctl -D /var/lib/pgsql/data -l logfile start


  1. exit
  • Clients are authenticated when trying to access a PostgreSQL database server. The client authentication can be configured in the files "data/pg_hba.conf" and "data/postgresql.conf". For a local installation these configuration files can be left unchanged. Otherwise for remote access, the authentication configuration should be adapted (see http://www.postgresql.org/docs/8.4/static/client-authentication.html).
  • Start the Database Server and, if necessary, check the status:
$ /etc/init.d/postgresql start (bzw. rcpostgresql start)
postgresql-Dienst starten: [ OK ]
$ /etc/init.d/postgresql status (bzw. rcpostgresql status)
 (PID  {pid}) is running...
  • Create Database (Possible encodings would be LATIN1 or SQL_ASCII or UTF8) and if necessary check for existence:
$ su - postgres
# psql
psql (9.5.1)
Enter »help« for help.

postgres=# create user {limbasuser} password '{limbasuserPW}';
CREATE ROLE

postgres=# create database {limbasDB} WITH ENCODING 'SQL_ASCII' OWNER {limbasuser};
CREATE DATABASE

postgres=#\q

# createlang plpgsql {limbasDB}
# psql -l

                                 List of Databases
   Name    | Owner | Encoding | Collation | Character Type | Access Rights
-----------+------------+-----------+--------------+-------------+-----------------------
{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}
Procedural Languages
  Name   | Familiar?
---------------------
 plpgsql | yes

UTF-8

If the database is created in UTF-8 encoding, the following statement can be used:

 postgres=# create database {limbasdb} WITH ENCODING 'UTF-8' LC_COLLATE 'C' LC_CTYPE 'C' OWNER {limbasuser} template template0;
CREATE DATABASE


Configure PDO

Limbas can connect to the database either via PDO or ODBC. PDO is only supported for PostgreSQL and MySQL. For other databases the ODBC interface can be used. Limbas can not use both database modules at the same time. If PDO is to be used, the odbc module must be deactivated or uninstalled.

The following packages are to be installed for the PD0 module:

  • php7-pdo
  • php7-pgsql | php7-mysql

Folgende Packete sind für für das PDO Modul nicht mehr notwendig und müssen deaktiviert sein:

  • php-odbc
$ zypper install php7-pdo php7-pgsql
$ zypper erase php7-odbc

The Limbas installation wizard automatically detects which module is to be used.


Configure ODBC

The database connection via ODBC is necessary if PostgreSQL or MYSQL are not used as a database or PDO is not available. Setting up ODBC is more time-consuming and involves not only installing the necessary packages, but also setting up UnixODB and the database ODBC driver.

The following packages are to be installed for the PDO module:

  • php7-odbc
  • unixODBC
  • psqlODBC | mariadb-connector-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.1
DRIVERS............: /etc/unixODBC/odbcinst.ini
SYSTEM DATA SOURCES: /etc/unixODBC/odbc.ini
USER DATA SOURCES..: /{user}/.odbc.ini

In the file found in "DRIVERS" (here "/etc/unixODBC/odbcinst.ini") add the drivers with file name and path:

[{postgreSQLDriver}]
Driver   = /usr/lib/psqlodbc.so (bei PostgreSQL Version >= 8.4)
Setup    = /usr/lib/libodbcpsqlS.so
Driver64 = /usr/lib64/psqlodbc.so
Setup64  = /usr/lib64/libodbcpsqlS.so
WARNING: For older PostgreSQL versions (<= 8.3) the following driver can be used:
[{postgreSQLDriver}]
Driver = /usr/lib/psqlodbcw.so
Setup = /usr/lib/libodbcpsqlS.so
...

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

  • Add the following entry to the configuration file "SYSTEM DATA SOURCES" (in this case "/etc/unixODBC/odbc.ini"):
[{limbasOdbcResourceName}]
Description             = PSQL
Driver                  = {postgreSQLDriver}
Trace                   = No
TraceFile               =
Database                = {limbasdb}
Servername              = localhost
Username                = 
Password                = 
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 is saved in the file /etc/php7/apache2/php.ini. The following general settings should be set here:

  • 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

Apache is not ready for use after package installation in OpenSUSE. The easiest way to configure is to use the graphical tool YAST. A guide for the basic installation of Apache under OpenSUSE can be found at the following link [1].

For the LIMBAS installation, the root directory of the Apache server and the Apache user and its group must be known. Those are defined in the file '/etc/apache2/httpd.conf', '/etc/apache2/default-server.conf' or 'uid.conf'.

  • The root directory of the Apache server can be determined from the "DocumentRoot" entry (by default "/srv/www/htdocs").
  • The Apache user and his group can be identified in the file from the "User" and "Group" entries (user "wwwrun" and group "www" by default).

In order to display all characters correctly, the following line must be deleted or canceled in the file "/etc/apache2/httpd.conf":

  1. AddDefaultCharset UTF-8 DELETE THIS LINE or COMMENT!!

For the .htaccess files used in the LIMBAS directories to be interpreted by the Apache server, add the following entry to "/etc/apache2/httpd.conf":

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

Start Apache HTTP Server:

$ /usr/sbin/rcapache2 restart

For problems with newer Apache versions (from 2.4) the activation of the access_compat-Module in /etc/sysconfig/apache2 (APACHE_MODULES="... access_compat ...") or over

$ a2enmod access

can contribute to the solution. If this does not help, 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
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 "wwwrun").
$ chown -R apache:apache 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:
http://{LimbasIP}/openlimbas/dependent/admin/install/
  • 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 /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:
http://localhost/openlimbas/dependent
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