2.0/ProcessMaker OpenSUSE Installation

From ProcessMaker
Jump to: navigation, search

Contents

Follow these instructions to install ProcessMaker 2.0 on top of a LAMP (Linux, Apache, MySQL, PHP) stack in OpenSUSE 11.2 or later. If using an older version of OpenSUSE, MySQL will have to be upgraded to at least version 5.1.6. In order to install ProcessMaker 1.8 or earlier, see these instructions.

ProcessMaker Installation

In order to have ProcessMaker installed correctly follow the steps listed below.

Requirements

To check the requirements visit this page.

Recommendations

  • If you want to increase ProcessMaker performance please check this configuration

Step 1: Install MySQL, PHP, Apache

If the LAMP stack isn't already installed, open a shell by going to Applications > Accessories > Terminal. At the command line, enter: Login with administrative powers (or as root if its password was set):

sudo -s  or  su    
   Enter password

Install Apache, MySQL, PHP and all its necessary libraries:

yast2 –i apache2 php5 php5-mysql apache2-mod_php5 mysql mysql-client mysql-community-server \
   php5-soap php5-mbstring php5-gd php5-mcrypt php5-ldap php5-curl php5-xml php5-soap php5-cli

Set MySQL to automatically start as a service at bootup and turn on the service:

chkconfig --add mysql
rcmysql start

Then, set up a secure installation of mysql, by setting a root password and removing the "test" database:

mysql_secure_installation

Set Apache to automatically start as a service at bootup and turn on the service:

chkconfig --add apache2 
rcapache2 start

Make sure that the apache2 and mysql services will start on bootup. They should be listed as "on" for the runlevel on which your installation of OpenSuSE runs, which is generally level 5:

# chkconfig -l | grep -E "apache2|mysql" 
apache2                   0:off  1:off  2:off  3:on   4:off  5:on   6:off
mysql                     0:off  1:off  2:on   3:on   4:off  5:on   6:off

Check that Apache and PHP are working correctly, by adding an index.php file:

vi /srv/www/htdocs/index.php

Put this code in the file and save it:

<?php phpinfo(); ?>

Then, open a web browser on the server and enter the address:

http://localhost

Information about PHP should appear in the browser window, indicating that PHP is working correctly:

Phpinfo.png

Install PhpMyAdmin

In addition, phpMyAdmin can be installed to easily view the MySQL databases used by ProcessMaker inside a web browser.

Step 2: Configuring PHP Settings

PHP's configuration file - php.ini - it needs to be configured in order to accept some ProcessMaker requirements.

Open the php.ini file, with a text editor; it will be located at:

/etc/php5/apache2/php.ini

Configuring settings

Each ProcessMaker session needs a minimum of 128MB RAM to run properly, so set the memory_limit to 128M or greater:

memory_limit = 128M

In order to upload Input Documents, upgrade ProcessMaker and add plugins and languages, file_uploads need to be enabled:

file_uploads = On

ProcessMaker needs to use PHP's short opening tags:

short_open_tag = On

If planning on uploading large files, as Input Documents while running processes, the max_post_size and upload_max_filesize should be increased to more than the default. For instance, if planning on uploading files as large as 16MB, then:

post_max_size = 24M 
upload_max_filesize = 24M

Load Modules

Make sure that the following modules are loaded in PHP: mbstring, gd, soap, curl, ldap, xml, mysql, mcrypt

The modules can be verified by issuing the following command from the command line:

php -m

or with the function phpinfo() in a web page.

It will be installed with the following command:

yast2 –i apache2 php5 php5-mysql apache2-mod_php5 mysql mysql-client mysql-community-server \
 php5-soap php5-mbstring php5-gd php5-mcrypt php5-ldap php5-curl php5-xml php5-soap php5-cli

Note: Some Apache and MySql libraries will also be installed running the code mentioned above.

After changing the PHP configuration, restart the Apache service (or reboot the machine).

Additional Configuration

Generating more than 300 rows on an Output Document

On php 5.3.9 version it was included the max_input_vars variable, setting up or creating this variable will allow you to generate more than 300 rows on an Output Document.

To check this configuration read this documentation.

Uploading large Input Documents

If planning on uploading large Input Documents while running processes, check this documentation


Step 3: Downloading and Extracting ProcessMaker

Go to http://sourceforge.net/projects/processmaker/files and download the latest version of ProcessMaker. The versions are numbered according to the pattern MAJOR.MINOR-REVISION, such as 2.0.45. Beta versions will have the word "beta" appended to the version number.

InstallSourceForgePage.png

After the download has finished, decompress the tarball in the directory where ProcessMaker will be installed. ProcessMaker can be installed in any directory which is not publicly accessible to the internet (so do NOT install it in /var/www), but it is generally installed in /opt, since it is not an optional program which doesn't come from the standard repositories:

tar -C /opt -xzvf processmaker-2.X-X.tar.gz 

Verify that ProcessMaker was correctly decompressed:

ls /opt/processmaker

The processmaker directory should contain the following contents:

gulliver     processmaker      rbac        shared
LICENSE.txt  processmaker.bat  README.txt  workflow

Set file permissions

Then, issue the following commands as the "root" user so that ProcessMaker can access the necessary files when run by the Apache server:

cd /opt/processmaker
chmod -R 770 shared
cd /opt/processmaker/workflow/engine/
chmod -R 770 /opt/processmaker/workflow/public_html
chmod -R 770 config content/languages plugins xmlform js/labels
chown -R wwwrun:www /opt/processmaker

Step 4: MySQL Configuration

The MySQL "root" user should already have all the necessary privileges to setup the ProcessMaker databases. If planning on using a MySQL user other than "root" to set up the ProcessMaker databases, grant a MySQL user superuser privileges to create and update databases.

Login to MySQL:

mysql -u root -p 

Enter the root password for MySQL.

Once in MySQL, give the user which will be running ProcessMaker superuser privileges to create create and modify MySQL databases:

mysql> grant all on *.* to 'USER'@'localhost' identified by 'PASSWORD' with grant option;

Replace USER with the name of your MySQL user and PASSWORD with the password for that user. (If that user doesn't already exist, he/she will be automatically created with the above grant command. If you are running ProcessMaker on a different server than your MySQL server, then replace localhost with the domain name or IP address of the server where ProcessMaker is located.

Exit MySQL:

mysql> exit;

MySQL Configuration Issues

Setting the root Password

If MySQL doesn't have a root password, set one for better security:

mysqladmin -u root password PASSWORD

If you have forgotten the root password, see these instructions to reset it.

Starting as a Service

When logging into MySQL, if the following error message appears:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Then, MySQL needs to be started as a service:

service mysqld start

If MySQL was installed from its Red Hat/CentOS package, it should automatically start as a service on bootup. If not, then use use chkconfig to add it as a service:

 chkconfig --levels 345 mysqld on

Increasing the thread stack size

According to the Mysql manual, the default thread stack is 128K, which sometimes is not enough to execute long queries e.g., long joins. If the thread stack is too small, the following Thread stack overrun (MySQL ERROR 1436) may occur:

ERROR 1436 (HY000) at line 5992: Thread stack overrun: 8384 bytes used  of a 131072 byte stack,
and 128000 bytes needed. Use 'mysqld -O  thread_stack=#' to specify a bigger stack.

If this problem is encountered, edit the MySql configuration file /etc/mysql/my.cnf and increase the size of the thread_stack setting in the following line:

# The stack size of each thread (default: 192K)
thread_stack = 512K

Then, restart the MySql service for the change to take effect:

 /etc/init.d/mysqld restart

Modifying my.cnf file

To avoid problems running triggers o mysql edit my.conf file located at:

/etc/my.cnf

And follow the instructions detailed on this documentation

Step 5: Apache Configuration

Edit the ProcessMaker configuration file to fit your environment:

 vi /opt/processmaker/etc/pmos.conf

Replace your_ip_address and your_processmaker_domain with the IP address and domain name used by your ProcessMaker server:

  # Please change the ip address with your server ip address and
  # the ServerName with you own subdomains.
  NameVirtualHost your_ip_address
  #processmaker virtual host
  <VirtualHost your_ip_address >
    ServerName "your_processmaker_domain"
    DocumentRoot /opt/processmaker/workflow/public_html
    DirectoryIndex index.html index.php
    <Directory  "/opt/processmaker/workflow/public_html">
       AddDefaultCharset UTF-8
       AllowOverRide none
       Options FollowSymlinks
       Order allow,deny
       Allow from all
       RewriteEngine on
       RewriteRule ^.*/(.*)$ sysGeneric.php [NC,L]
       ExpiresActive On
       ExpiresDefault "access plus 1 day"
       ExpiresByType image/gif "access plus 1 day"
       ExpiresByType image/png "access plus 1 day"
       ExpiresByType image/jpg "access plus 1 day"
       ExpiresByType text/css "access plus 1 day"
       ExpiresByType text/javascript "access plus 1 day"
       AddOutputFilterByType DEFLATE text/html
    </Directory>
  </VirtualHost>

Replace your_ip_address with the IP number or domain name of the server running ProcessMaker. If only planning on running and accessing ProcessMaker on your local machine, then use the IP address "127.0.0.1". If using ProcessMaker on a machine whose IP address might change (such as a machine whose IP address is assigned with DHCP), then use "*", which represents any IP address. If not using the standard port 80, then it is necessary to also specify the port number.

If your DNS or /etc/hosts has a defined domain for ProcessMaker, then use that domain for your_processmaker_domain. Otherwise, use the same IP address for your_processmaker_domain as was used for your_ip_address.

For example, if running ProcessMaker on a server at address 192.168.1.100 with a DNS at 123.456.7.89:

  NameVirtualHost 192.168.1.100
  #processmaker virtual host
  <VirtualHost 192.168.1.100 >
    ServerName "123.456.7.89"
    DocumentRoot /opt/processmaker/workflow/public_html
    DirectoryIndex index.html index.php
    <Directory  "/opt/processmaker/workflow/public_html">
    ...

For example, if ProcessMaker is installed in the /user/fred directory on your local machine at port 8080 with an dynamic IP assigned by DHCP:

  NameVirtualHost *:8080
  #processmaker virtual host
  <VirtualHost *:8080 >
    ServerName "*"
    DocumentRoot /user/fred/processmaker/workflow/public_html
    DirectoryIndex index.html index.php
    <Directory  "/user/fred/processmaker/workflow/public_html">
    ...

Note: It is also possible to define the virtual host for ProcessMaker directly in the Apache configuration by inserting the above VirtualHost definition in the file /etc/apache2/apache2.conf.

After editing pmos.conf, add it to Apache's list of sites which are available for serving:

cp /opt/processmaker/etc/pmos.conf /etc/apache2/conf.d/pmos.conf

ProcessMaker needs to use the expires, rewrite, deflate and vhost_alias modules in the Apache 2 web server. All these modules are included in openSUSE's apache2 package, but only expires is enabled by default.

To enable the other Apache modules from the graphical interface, open the YaST2 Control Center and go to ' System > /etc/sysconfig Editor > Network > WWW > Apache2 > APACHE_MODULES. Make sure that expires is in the list of modules and add: rewrite deflate vhost_alias

To enable the other Apache modules from the command line:

vi /etc/sysconfig/apache2

Search for the APACHE_MODULES variable and edit its list of modules to include expires, rewrite, deflate and vhost_alias. For example:

APACHE_MODULES="actions alias auth_basic authn_file authz_host authz_groupfile authz_default authz_user autoindex 
cgi dir env expires include log_config mime negotiation setenvif ssl userdir php5 deflate vhost_alias rewrite"

After adding the web site pmos.conf and enabling modules, it is necessary to restart the Apache web server:

rcapache2 restart

Apache Configuration Issues

Non-standard Port

If running ProcessMaker off a port other than the default port 80, then add the following line to the file /etc/apache2/listen.conf:

Listen <IP-ADDRESS>:<PORT>

For instance, if running ProcessMaker from the local machine at port 8080:

Listen 127.0.0.1:8080

Or simply:

Listen 8080

Note: If Apache is using the default port 80, then configure other programs (like Skype) to not use port 80. Check whether a program is currently listening on port 80 with the command:

netstat -tanp 

To configure Skype to stop listening on port 80, press CTRL+O or go to Tools > Options. Under the Advanced section of the "Options" dialog box, go to the "Connection" section and enter an alternative port for Use port [ ] for incoming connections.

No VirtualHosts Warning

If you see one of the following messages when reloading or restarting Apache:

[warn] NameVirtualHost 12.34.56.78:80 has no VirtualHosts
[warn] NameVirtualHost *:0 has no VirtualHosts
[warn] NameVirtualHost *:80 has no VirtualHosts

Then, comment out or delete the following lines in the file /etc/apache2/listen.conf:

NameVirtualHost 12.34.56.78:80
NameVirtualHost *:80
NameVirtualHost *

Step 6: Setting up ProcessMaker

Open a web browser and enter the IP address (and port number if not using the default port 80) where ProcessMaker is installed. For instance, if ProcessMaker is installed at the address 192.168.10.100, then go to: http://192.168.10.100
If using ProcessMaker which is installed locally on port 8080, go to: http://127.0.0.1:8080

To complete the installation check this documentation

Step 7: Additional Configuration

Additional aspects of ProcessMaker may need to be configured. See the Configuration section of the wiki. Most installations of ProcessMaker need to configure the following:

Setting the Time Zone

In ProcessMaker version 2.0.29 and later, the default time zone for the ProcessMaker server is set in the env.ini configuration file. If using a previous version of ProcessMaker, see Default Time Zone.

Configuring Email

If planning on sending out email notifications or enabling users to recover forgotten passwords, then see Email - Settings to configure ProcessMaker to use an email server.

Execution of cron.php

If planning on using email notifications, events or the case scheduler, then the server running ProcessMaker has to be configured to periodically execute the cron.php file. See Executing cron.php.

Configuring ProcessMaker to use SSL/TLS

If your organization needs greater security to protect sensitive data being passed between web clients and the ProcessMaker server, it may be a good idea to set up a SSL or TLS connection which can be accessed through the https protocol (rather than the standard http protocol).

For more information check this documentation

Increasing ProcessMaker Performance

Follow the steps below to increase ProcessMaker performance:

1. Use apache normally.

2. If zip compression on virtual host configuration is enabled, be sure that mod_deflate is enable on the httpd.conf file. But it is usually enabled by default as the line showed above:

LoadModule deflate_module modules/mod_deflate.so

3. Finally add this lines on pmos.conf file on the Virtual Host:

 <IfModule mod_deflate.c>
SetOutputFilter DEFLATE
<IfModule mod_setenvif.c>
# Netscape 4.x has some problems
BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48, the above regex won’t work. You can use the following
# workaround (comment the above line and uncomment the below line) to get the desired effect:
# BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
# Don’t compress already-compressed files
SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI .(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI .(?:avi|mov|mp3|mp4|rm|flv|swf|mp?g)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI .pdf$ no-gzip dont-vary
</IfModule>
<IfModule mod_headers.c>
# Make sure proxies don’t deliver the wrong content
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>

Errors during Installation

If an error occurs during the installation, check the installation log file:
     <INSTALL-DIRECTORY>/shared/log/install_log.log
It will generally be found at:
     /opt/processmaker/shared/log/install_log.log

Depending on the errors found in the installation log file, check the following files:
The Apache configuration file:
     /etc/apache2/apache2.conf
The ProcessMaker web site configuration file for Apache:
     /etc/apache2/conf.d/pmos.conf
The PHP configuration file:
     /etc/php5/apache2/php.ini
The MySQL configuration file:
     /etc/my.cnf
The ProcessMaker configuration file where components are installed:
     <INSTALL-DIRECTORY>/workflow/engine/config/paths_installed.php
The ProcessMaker configuration file for database connections:
     <INSTALL-DIRECTORY>/shared/sites/workflow/db.php
The ProcessMaker redirection to login screen:
     <INSTALL-DIRECTORY>/processmaker/workflow/public_html/index.html

If the following error appears at the login screen:

ErrorIDNotWorkspace.png

This error indicates that the installer was unable to access the MySQL databases to install the translations. Make sure that the MySQL port (which is 3306 by default) isn't blocked by a firewall and MySQL is configured to accept connections from the server running processmaker. If that doesn't work, then ask for help on the forum.pt

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox
In other languages
Share This