I have a .sh file that locally sets some environment variables in my shell source my_env.sh.
.sh
source my_env.sh
#!/bin/sh echo \"Setting up local env
export your variables in the "/etc/profile".
NOTE: This will make it global for each shell sessions for any user. If you wish to set this variable for every session for a specific user, set it in that user's "~/.profile".