Specifying Environment Variables
Explains how to set environment variables on a client node.
About this task
env.sh
file in /usr/local/mapr-loopbacknfs/conf
.
You cannot simply copy the env.sh
file from a server node in the
cluster because the MAPR_HOME setting would be different.Complete the following steps to specify environment variables:
Procedure
-
On a server node in the HPE
Ezmeral Data Fabric cluster, locate the
env.sh
andenv_override.sh
files in the/opt/mapr/conf
directory. If theenv_override.sh
file is not present, use theenv.sh
file. For more information about these files, see About env_override.sh. -
Retrieve the MAPR_SUBNETS and JAVA_HOME settings from the server files and
clone them to
/usr/local/mapr-loopbacknfs/conf/env.sh
on the client node. -
(Optional) Set the
NFS_LOOPBACK_HONOUR_SUBNETS
environment variable to avoid re-registration whenever there is a change in any network interface. The value can be:true
to consider theMAPR_SUBNETS
while registering with CLDB. If set totrue
, re-registration does not happen when there is a change in any network interface.false
to ignore theMAPR_SUBNETS
. If set tofalse
, re-registration happens when there is a change in any network interface.
For example:# export NFS_LOOPBACK_HONOUR_SUBNETS=true # export MAPR_SUBNETS=10.10.104.0/24 # env | grep SUBNET NFS_LOOPBACK_HONOUR_SUBNETS=true MAPR_SUBNETS=10.10.105.0/24,10.10.104.0/24
-
Change the
JAVA_HOME
setting to point to the location where Java is installed on the client. -
Add the following lines to the client node
env.sh
file:export MAPR_HOME=/usr/local/mapr-loopbacknfs export MAPR_TICKETFILE_LOCATION=<MAPR user ticket path>
NOTE To allow impersonation, set the value forMAPR_TICKETFILE_LOCATION
to the path to themapr
user ticket. -
Save and close the
env.sh
file. - Restart the loopbacknfs service for the changes to take effect.