To persist ENVs, just put the commands in one of three config files mentioned before, as these files will be executed when ever you access a shell.
Please check the template written by Stefaan Lippens, especially the .profile
part.
$PATH
and $LD_LIBRARY_PATH
are the most important for compiling models.
Please check these two tutorials in detail: PATH_tutorial and LD_LIBRARY_PATH_tutorial.