Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
sudo apt-get install portmap nfs-kernel-server 

创建共享目录并设置权限

Code Block
sudo mkdir -p / export / wflow  wflow
sudo chown nobody:nogroupnobody:nogroup / export / wflow wflow

配置NFS导出共享目录,编辑/ etc / exports将目录导出到本地192.168.1.0子网中

Code Block
sudo vim / etc / exports 

/etc/ exports中exports应包含以下内容:

Code Block
/ export / wflow 192.168.1.0/255.255.255.0(rw0(rw,no_subtree_check,async) check,async)

导出共享并重新启动NFS服务

Code Block
sudo exportfs -ra  sudo服务nfsra
sudo service nfs-kernel-server重启server restart

 

将共享目录挂载到应用程序服务器中

在应用程序服务器中,安装NFS客户端

...

Code Block
sudo mkdir -p / opt / joget / shared / wflow  wflow
sudo chmod 777 / opt / joget / shared / wflow 

安装共享目录。

Code Block
sudo mount -t nfs wflow:wflow:/ export / wflow / opt / joget / shared / wflow 

测试读写权限以确认目录共享是否有效。

Code Block
echo test123 test123>> /opt/joget/shared/wflow/test.txt

...

安装MySQL(https://help.ubuntu.com/14.04/serverguide/mysql.html

Code Block
sudo apt-get安装mysqlget install mysql-server 

创建一个名为jwedb的应用程序服务器可访问的数据库

...

运行以下MySQL命令来创建一个空白数据库

Code Block
创建数据库jwedb;  放弃create database jwedb;
quit

使用Joget数据库模式填充新创建的数据库

Code Block
mysql -uroot jwedb < /path/to/jwdb-mysql.sql

配置数据库权限

...

运行以下MySQL命令来授予用户joget和密码joget的权限

Code Block
将jwedb。*的所有权限授予grant all privileges on jwdb.* to 'joget'标识的@'joget'@'%';  冲洗特权;  放弃%' identified by 'joget';
flush privileges;
quit

配置MySQL以侦听来自远程主机的数据库连接。用你最喜欢的编辑器编辑my.cnf文件

...

Code Block
#bind-address = 127.0.0.1 

重新启动MySQL

Code Block
sudo服务mysql重启sudo service mysql restart

在应用程序服务器中,测试到数据库服务器database_host的远程连接 

...

Code Block
sudo mkdir -p / opt / joget /  
sudo tar xvfz apache-tomcat-8.0.20.tar.gz / opt / joget /

启动每个应用服务器

Code Block
sudo cd /opt/joget/apache-tomcat-8.0.20  20
sudo ./bin/catalina.sh启动sh start

打开Web浏览器并访问每个服务器以确认http:http:// server:8080 server:8080/jw

 

 

配置应用服务器会话复制

通过编辑apache-tomcat-8.0.20 / conf / server.xml配置Tomcat进行集群。 jvmRoute =“node01” 添加Engine标记并取消注释Cluster标记。

Code Block
<引擎名称=“Catalina”defaultHost =“localhost”jvmRoute =“node01”>  <Engine name="Catalina" defaultHost="localhost" jvmRoute="node01">
<Cluster className =“org"org.apache.catalina.ha.tcp.SimpleTcpCluster”SimpleTcpCluster"/> 

配置本地域IP。验证本地服务器名称解析为IP而不是127.0.1.1。假设服务器名称为server1,IP为192.168.1.10,请编辑/ etc / hosts并设置:

...

Code Block
sudo cd /opt/joget/apache-tomcat-8.0.20  20
sudo ./bin/catalina.sh停止 sh stop
sudo ./bin/catalina.sh启动sh start

验证应用程序服务器之间的会话复制。apache-tomcat-8.0.20 / logs中catalina.out日志文件应显示类似于:

Code Block
INFO:启动本地主机上的集群管理器#/ jw  2016年1月17日上午11INFO: Starting clustering manager at localhost#/jw
Jan 17, 2016 11:21:32 AM org.apache.catalina.ha.session.DeltaManager getAllClusterSessions  INFO:ManagergetAllClusterSessions
INFO: Manager [localhost#localhost#/ jw],从org, requesting session state from org.apache.catalina.tribes.membership.MemberImpl [tcp:tcp:// {127, 0, 0, 1}:4001,:4001,{127, 0, 0, 1 },4001,alive,4001, alive=55733886, 55733886,securePort securePort=-1, -1,UDPUDP Port = -1,id1, id= { - 57 118 -98 -98 110 -38 64 -68 -74 -25 -29 101 46 103 5 -48 }, payload= {},命令, command= {},域, domain= {},]。如果在60秒内没有收到会话状态,此操作将超时。  2016年1月17日上午11, ]. This operation will timeout if no session state has been received within 60 seconds.
Jan 17, 2016 11:21:32 AM org.apache.catalina.ha.session.DeltaManager waitForSendAllSessions  INFO:ManagerwaitForSendAllSessions
INFO: Manager [localhost#localhost#/ jw]; 会话状态发送时间为1/16 session state send at 1/17/16 11:21上午104毫秒收到。21 AM received in 104 ms.

有关Tomcat集群的更多信息,请参阅 http://tomcat.apache.org/tomcat-8.0-doc/cluster-howto.html

...

Code Block
sudo apt-get install apache2 

安装代理和平衡器模块

Code Block
sudo a2enmod headers a2enmod头文件proxyproxy proxy_balancer proxy_http 

...

Code Block
NameVirtualHost *  
<VirtualHost *>  DocumentRoot“/ var / www / jwsite”   ServerName localhost >
    DocumentRoot "/var/www/jwsite"
    ServerName localhost
    ServerAdmin support@mycompany.com com
    DirectoryIndex index.html index.htm
   <代理平衡器://集群>    <Proxy balancer://cluster>
        BalancerMember http:http:// server1:8080 route = node01 server1:8080 route=node01
        BalancerMember http:// server2:8080 route = node02  命令否认,允许  全部允许  </代理>   ProxyPreserveHost打开 http://server2:8080 route=node02
        Order deny,allow
        Allow from all
    </Proxy>
    ProxyPreserveHost On
    ProxyPass /jw jw平衡器:balancer:// cluster / jw stickysession=JSESSIONID
  = JSESSIONID  ProxyPassReverse /jw jw平衡器:balancer:// cluster / jw  jw
</虚拟主机>VirtualHost>

启用新的站点并重新启动Apache

Code Block
sudo a2ensite jwsite  sudo服务apache2重新加载jwsite
sudo service apache2 reload



部署和配置Joget工作流LEE

如前面2.2 Joget集群配置中所述部署和配置Joget Workflow LEE 

...