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/zephyrdata
and replace the Zephyr folder part with the IP address of your NAS. For example:
ZEPHYR_DATA= //192.168.11.141/zephyrdata
Now, 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-utils
Create the Zephyrdata directory and allow access to it:
chmod -R 777 /homeZephyrdata
Important
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 rpcbind
systemctl enable nfs-server
systemctl enable nfs-lock
systemctl enable nfs-idmap
systemctl start rpcbind
systemctl start nfs-server
systemctl start nfs-lock
systemctl start nfs-idmap
Open 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-server
Add the NFS service override in the CentOS 7.0 firewall-cmd public zone service:
firewall-cmd --permanent --zone=public --add-service=nfs
firewall-cmd –reload
The 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-utils
Start the following services and add them to the Boot Menu:
systemctl enable nfs-idmap
systemctl enable nfs-idmap
systemctl enable rpcbind
systemctl enable nfs-server
systemctl enable nfs-lock
systemctl enable nfs-idmap
systemctl start rpcbind
systemctl start nfs-server
systemctl start nfs-lock
systemctl start nfs-idmap
Mount the NFS share on the client machine by running the command below:
mount -t nfs 192.168.0.100:/home/zephyrdata
/<zephyrlocation>/zephyrdata
Important
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>/zephyrdata
You are connected to the NFS share. Now you can crosscheck it by running the following command:
df -kh