Before starting to build TeX Live, set up your PATH so
that the system can properly find the files. If you set up your login
scripts as recommended in The Bash Shell Startup Files, update
the needed paths by creating the
texlive.sh
script. The programs are always
installed in an <ARCH>-linux subdirectory and on 32-bit x86 this is
always i386-linux. For x86_64 and i?86 we can generate this as $TEXARCH:
If upgrading from a previous year's version, you should manually
edit texlive.sh
to ensure that the version for
the year you wish to use is the only TeX present (some people need to
keep multiple years available to ensure there are no regressions in
their documents).
Now, create the texlive.sh script as the root
user:
TEXARCH=$(uname -m | sed -e 's/i.86/i386/' -e 's/$/-linux/')
cat > /etc/profile.d/texlive.sh << EOF
# Begin texlive setup
TEXLIVE_PREFIX=/opt/texlive/2023
export TEXLIVE_PREFIX
pathappend \$TEXLIVE_PREFIX/texmf-dist/doc/man MANPATH
pathappend \$TEXLIVE_PREFIX/texmf-dist/doc/info INFOPATH
pathappend \$TEXLIVE_PREFIX/bin/$TEXARCH
# End texlive setup
EOF
unset TEXARCH
The standard MANPATH and INFOPATH path are specified above to ensure they are included. If they are already set in the boot script procedure, the pathappend function will ensure duplicates are removed, so including them here will do no harm.
The backslashes before the dollar signs in the script above are to facilitate a copy/paste operation. The backslashes should not appear in the actual script.
The new paths can be immediately activated by running:
source /etc/profile
The shared libraries will be installed into a texlive directory.
As the root
user, add it to
your /etc/ld.so.conf
:
cat >> /etc/ld.so.conf << EOF
# Begin texlive addition
$TEXLIVE_PREFIX/lib
# End texlive addition
EOF
You should now proceed either to install-tl-unx for a binary installation of texlive, or to texlive-20230313 to begin installing from source.