centos7.0安装processmaker2.5.1

1.安装mariadb或者mysql.centos7自带mariadb

2.安装apache。由于本人是用tarball安装的php,系统自带的apache在编译php时apxs2找不到。所以自己装了一个apache

3.安装php,本人使用tarball安装,不清楚yum安装。

安装processmaker正式开始

关闭SELINUX

vim /etc/selinux/config
SELINUX = disabled

重启服务器

配置php

vi /etc/php.ini

由于本机php是自己安装的 配置文件不在这里。所以本机是 vi /usr/loal/php/etc/php.ini

由于processmaker至少需要128RAM才能运行 所以需要

memory_limit = 128M

请确保

file_uploads = On
short_open_tag = On

如果要上传大附件,如上传最大为24M的附件

post_max_size = 24M 
upload_max_filesize = 24M

下载processmaker

wget hhttp://cznic.dl.sourceforge.net/project/processmaker/ProcessMaker/2.5/2.5.1/processmaker-2.5.1.tar.gz

tar -C /opt -xzvf processmaker-2.5.1.tar.gz 

设置文件权限

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

如果版本>=2.5.0

cd /opt/processmaker/gulliver
chmod -R 770 js thirdparty/html2ps_pdf/cache

Mysql || MariaDB配置

为root用户设置密码

执行命令 mysql_secure_installation

创建供processmaker用的数据库账户

mysql -u root – p

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

Apache配置

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

由于本机的apache是手动安装 所以应该为

cp /opt/processmaker/etc/pmos.conf /usr/local/apache/conf/extra/pmos.conf

vim /etc/httpd/conf.d/pmos.conf

修改它来适配本机环境。

  # 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
       
       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>

如果apache版本为2.4 如centos7

则将

Allow from all

改为

Require all granted

例如,如果ProcessMaker运行在ip为 192.168.1.00 DNS为 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">
    ...

例如,如果ProcessMaker安装在目录 /user/fred 且服务器的ip 是动态的,端口为8080

 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">
    ...

编辑 httpd.conf 确保

LoadModule expires_module modules/mod_expires.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so

如果apache版本为2.4
保证

LoadModule filter_module modules/mod_filter.so

或者删除

AddOutputFilterByType DEFLATE text/html

在httpd.conf的最后一行加入

Include "/usr/local/apache/conf/extra/pmos.conf"

修改
User deamon
Group deamon

User apache
Group apache

汉化ProcessMaker

使用管理员账号登陆系统。在管理→设定→语言中点击安装 上传中文语言包。

修改默认登陆语言

在管理→设定→系统 中选择默认语言为中文。

修改

/opt/processmaker/workflow/engine/xmlform/login/sysLoginNoWS.xml

在javascript开始行下方插入

getField('USER_LANG').value = "zh-CN";