To set up your environment to be able to run on most machines which have the complete LaTeX2E package installed with the AMS fonts and style files, you typically have to do nothing, that is the installation should be configured correctly. If you find that the setup is not correct there are several alternatives.
One is to verify that your TEXINPUTS path is correctly set. When processing your document, you must also choose between TeX, LaTeX, AMS-TeX and AMS-LaTeX. This will depend on the document and your needs, but if the document is written in TeX, it must be processed in TeX, for example.
Much of the local support for producing documents are written in LaTeX or AMS-LaTeX. The advantage of using LaTeX or AMS-LaTeX is that there are many higher level commands to define common environments and document styles, such as articles and , books while the drawback is that there is less flexibility than in TeX or AMS-TeX.
The TeX, LaTeX, AMSTeX and AMSLaTeX packages are found in /usr/share/texmf.
To set the TEXINPUTS variable to work with this distribution, go to your .profile, .zprofile or .cshrc in your home directory, and edit the file to include the directories which are to be searched by TeX or LaTeX when loading the input files requested by the options you have specified in your document. Typically these are quite extensive. For example, you can add any of the directories in the path /usr/lib/texmf/tex/latex and /usr/lib/tex/tex/tex and /usr/lib/tex/amstex/macros to your shells TEXINPUTS variable description.
To set the environment variable to the values desired depends on which shell you are running. In the Korn or Z shell, you would add to your .zprofile or .profile, the line containing TEXINPUTS variable.
String each directory you want LaTeX and TeX to search with a colon delimited list. Note the presence of the period in the TEXINPUTS line indicating the current working directory is to be searched first.
When you have made all the changes to the .profile, .zprofile or
.cshrc file, then you must activate it by doing:
. .profile
. .zprofile
source .cshrc