-OpenSUSE

Aus Limbas Wiki

Wechseln zu: Navigation, Suche
Diese Seite ist eine übersetzte Version der Seite -OpenSUSE und die Übersetzung ist zu 100 % abgeschlossen sowie aktuell.

<-- backt to 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 Hints

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:
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_php5
  • php5
  • php5-gd
  • php5-iconv
  • php5-imap
  • php5-ldap
  • php5-ctype
  • php5-mbstring
  • php5-odbc
  • php5-soap
  • php5-zlib
  • postgresql
  • postgresql-server
  • psqlODBC
  • unixODBC
  • ImageMagick
  • htmldoc
  • ghostscript
  • ttf2pt1
  • wget
  • zip
  • unzip
  • exiftool
$ zypper in apache2 apache2-mod_php5 php5 php5-gd php5-iconv php5-imap php5-ldap php5-ctype php5-mbstring\
php5-odbc php5-soap php5-zlib postgresql postgresql-server psqlODBC unixODBC\
ImageMagick ghostscript ttf2pt1 wget zip unzip exiftool

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

Database

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 corresponding directory content "/var/lib/pgsql/data" has to be deleted.

(Warning: Already existing databases are deleted).

  • Create new Database Cluster without Localization:
$ su - postgres # initdb --local=C -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 check its 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' OWNER <limbasuser> template template0;
CREATE DATABASE

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.1
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/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:
  1. Setup from the unixODBC package
[<postgreSQLDriver>]
Driver          = /usr/lib/psqlodbcw.so
Setup           = /usr/lib/libodbcpsqlS.so
Driver64        = /usr/lib64/psqlodbcw.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 in the file found in "SYSTEM DATA SOURCES" (here "/etc/unixODBC/odbc.ini"):
[<limbasOdbcResourceName>]
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 must be adapted in /etc/php5/apache2/php.ini. 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

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://<LIMBAS Host IP-Adresse>/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 <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:
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