4. Set Up a Shared Directory
A shared directory in a cluster is a shared folder where attachments are stored. In a cluster environment, this folder must be shared with write permissions. A folder is shared on NAS (network-attached storage) or similar devices, and then it can be accessed by the users working with Zephyr running on cluster nodes.
To set up a shared directory, do the following:
On Windows:
Create a shared folder with read and write access on NAS.
On all Zephyr nodes, open the Zephyr folder\tomcat\webapps\flex\WEB-INF\classes\jdbc.properties file, find the following line:
ZEPHYR_DATA = Zephyr folder/zephyrdataand replace the Zephyr folder part with the IP address of your NAS. For example:
ZEPHYR_DATA= //192.168.11.141/zephyrdataNow, you can use your shared folder.
On Linux:
Install the NFS (Network File System) server and client on CentOS 7.
On the server side:
Install the required NFS packages by running the following command:
yum install nfs-utilsCreate the Zephyrdata directory and allow access to it:
chmod -R 777 /homeZephyrdataImportant
If you installed Zephyr as a non-root user, install the NFS server and client as a root user and create the Zephyrdata directory as a non-root user.
Start the following services and add them to the Boot Menu:
systemctl enable rpcbindsystemctl enable nfs-serversystemctl enable nfs-locksystemctl enable nfs-idmapsystemctl start rpcbindsystemctl start nfs-serversystemctl start nfs-locksystemctl start nfs-idmapOpen exports for editing –
sudo gedit /etc/exports– and type the following:
/home/zephyrdata 192.168.0.101(rw,sync,no_root_squash,no_all_squash)/home/zephyrdata 192.168.0.102(rw,sync,no_root_squash,no_all_squash)Important
192.168.0.101 and 192.168.102 are the IP addresses of the clients.
Start the NFS service by running the following command:
systemctl restart nfs-serverAdd the NFS service override in the CentOS 7.0 firewall-cmd public zone service:
firewall-cmd --permanent --zone=public --add-service=nfsfirewall-cmd –reloadThe NFS server is ready to work.
On the client side (on each Zephyr node):
Install the required NFS packages by running the following command:
yum install nfs-utilsStart the following services and add them to the Boot Menu:
systemctl enable nfs-idmapsystemctl enable nfs-idmapsystemctl enable rpcbindsystemctl enable nfs-serversystemctl enable nfs-locksystemctl enable nfs-idmapsystemctl start rpcbindsystemctl start nfs-serversystemctl start nfs-locksystemctl start nfs-idmapMount the NFS share on the client machine by running the command below:
mount -t nfs 192.168.0.100:/home/zephyrdata/<zephyrlocation>/zephyrdataImportant
192.168.0.100 is the IP address of the server.
Change the ZEPHYR_DATA path to the mounted path for all the nodes in the Zephyr folder\tomcat\webapps\flex\WEB-INF\classes\jdbc.propeties file.
For example:
ZEPHYR_DATA = <zephyrlocation>/zephyrdataYou are connected to the NFS share. Now you can crosscheck it by running the following command:
df -kh