You are on page 1of 14

Installing TEX Live 2008, 2009 or 2010

from DVD: Personal Notes


By kalwisti

Updated 28 Nov. 2010

Contents
1 Pre-Installation 2
1.1 Learn Your Optical Drive’s Designation . . . . . . . . . . . . . 2
1.2 Unmount the DVD and Create a New Mount Point . . . . . . . 3

2 Installation 3
2.1 Using the Installer’s Text Mode . . . . . . . . . . . . . . . . . 4
2.2 Alternate Method:
Using the GUI Version of the TL Installer . . . . . . . . . . . . 4
2.3 Duration of Installation . . . . . . . . . . . . . . . . . . . . . 5
2.3.1 TL 2009 . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3.2 TL 2010 . . . . . . . . . . . . . . . . . . . . . . . . . . 6

3 Finishing the Installation 6

4 Post-Installation Configuration 8
4.1 Setting the PATH Variable . . . . . . . . . . . . . . . . . . . . . 8
4.1.1 A Few More Words about the PATH . . . . . . . . . . . 9
4.2 Font Configuration for XeTeX . . . . . . . . . . . . . . . . . . 10

5 Testing the Installation 12


5.1 Environment Variables in General . . . . . . . . . . . . . . . . 12

6 More on bash 12

1
Installing TEX Live from DVD: Notes

List of Figures
1 The TL Installer’s GUI mode. . . . . . . . . . . . . . . . . . . . 5

Abstract
These are notes I made during my attempt(s) to install TEX Live
(TL) from a DVD which I burned, using a TL .iso file downloaded
from a CTAN mirror on the Internet. I installed TL on three different
Linux systems:
• PCLinuxOS 2010 Phoenix Edition (Xfce 4.6.1 desktop)
• CentOS 5.5 (GNOME 2.16.0 desktop)
• Fedora 14 Xfce Spin (Xfce 4.6.2)
Disclaimer: Although there may be a few errors or inaccuracies
here, this procedure worked for me and it should be almost identical
on other Linux distributions, as TL’s installer takes a distro-neutral,
“plain vanilla” approach. The revised edition of this document has ad-
ditional tips which I received from helpful members of the LATEX Com-
munity Forum.1
The instructions are not 100% complete, so I recommend that you
read the TL documentation available on TUG’s website in conjunction
with this document.

1 Pre-Installation
Clean up any previous TeX installations by completely removing them. By
default, this would be in these two directories:

rm -rf /usr/local/texlive/2008
rm -rf ~/.texlive2008

If you try to run the installation script from the DVD as-is, you will get a
“Permission denied” error message.2 By default, many distros mount DVDs
with the noexec option, which prohibits executing binaries from the DVD.
So the first step is to mount the DVD without the noexec option, i.e., with
an -o exec option.
Comment: You will notice that almost all the installation steps are done
via the CLI (Command Line Interface) rather than a GUI (Graphical User
1
http://www.latex-community.org/forum/index.php
2
Permission denied at tlpkg/TeXLive/TLUtils.pm line 1045.

2
Installing TEX Live from DVD: Notes

Interface). Don’t worry . . . I have included the necessary commands and


if you type them carefully, you will not harm your system. In the case of
the TL DVD, the CLI is faster and it allows the installer to be distro-neutral.
Whereas in Distro X an operation may appear on a particular menu with
a particular interface, while in Distro Y the same operation appears on a
different menu, the CLI commands work identically in both distros.

1.1 Learn Your Optical Drive’s Designation


Before becoming root (/) user and unmounting the DVD, type the mount
command from a Terminal / Konsole to see the DVD’s name and your optical
drive’s designation. The example below is from my CentOS 5.5 setup:

[david@dhcppc2 ~]$ mount


/dev/sda8 on / type ext3 (rw)
[ . . .]
/dev/sda9 on /home type ext3 (rw)
[ . . .]
/dev/hda on /media/TeXLive2009 type iso9660 (ro,noexec,nosuid,nodev,uid=500)

Notice that in the final line, the optical drive is designated as /dev/hda.
(PCLinuxOS and Fedora, on the other hand, refer to this same Samsung
CD/DVD drive as /dev/sr0).

1.2 Unmount the DVD and Create a New Mount Point


Now you can follow these steps:

• Open up a Terminal / Konsole within your regular user account, issue


the command su and type root’s password to acquire root user privi-
leges.

• Unmount the TEX Live (TL) DVD: # umount /media/TeXLive2009


N.B.: The command is umount (‘unmount’ without the first letter “n”).
That pound sign (#) as the command prompt is your verification that
you are logged in as the root user.

• Create a new mount point for the DVD: # mkdir /media/TL09

• Type: # mount -o exec /dev/hda /media/TL09


A gloss of this command is:

3
Installing TEX Live from DVD: Notes

mount [option flag]3 [permit execution of binaries]4 [source]5


[target directory]6

These preliminary steps will allow the TL install script to run.

2 Installation
In general, we will use the Quick Install instructions from TUG’s website as
a guideline:
http://www.tug.org/texlive/quickinstall.html
“TEX Live – Quick Install.”
The full-length guide (for TEX Live 2010) can be read here:
http://www.tug.org/texlive/doc/texlive-en/texlive-en.html
Berry, Karl, ed. “The TEX Live Guide: TEX Live 2010.” July 2010.
All commands below were issued by / (root) rather than a normal user.
Follow these steps:

• # cd /media/TL09

• Run the ls (list) command to show you the TL DVD’s contents:

[root@dhcppc2 TL09]# ls
autorun.inf install-tl.bat README.usergroups tlpkg
bin LICENSE.CTAN release-texlive.txt tl-portable
doc.html LICENSE.TL rr_moved tl-portable.bat
index.html README source
install-tl readme-html.dir texmf
install-tl-advanced.bat readme-txt.dir texmf-dist

2.1 Using the Installer’s Text Mode

If you want to use the TL Installer’s text mode, follow these instruc-
tions. If you prefer using a GUI, please note that the installer also has
a GUI mode, which is discussed in Subsection 2.2 below.
3
-o
4
exec
5
The optical drive.
6
The mount point we just created.

4
Installing TEX Live from DVD: Notes

• Now you are ready to run the installer script (install-tl). Type:
./install-tl
(Do not forget the initial period (.) before the forward slash).

• From the text menu, select the o command to change the default paper
size (if you are a North American who uses letter-size paper rather
than A4).

• If you wish to bypass the need for manually changing the PATH, as dis-
cussed in Section 4.1, you have the option here of selecting Create
symlinks in system directories. I have never tried this option
myself, but two members of the LATEX Community Forum noted that
it works and that it will auto-configure your PATH.7

• Type the letter i (for i(nstall)) to begin the installation.

2.2 Alternate Method:


Using the GUI Version of the TL Installer
The TL Installer also has a GUI mode, shown in Figure 1, which you may
find friendlier to use. However, before you can use the GUI, you must install
the perl-TK package from your distro’s repository.8
You can invoke the installer’s GUI mode with the following command:

$ perl install-tl -gui

2.3 Duration of Installation


There is a significant difference in installation time between TL 2009 and
TL 2010.

2.3.1 TL 2009
If you are installing TL 2009, please wait patiently. The installation process
will take ca. 55–60 minutes if you have a relatively fast CPU and optical
drive.
7
I would like to thank members frabjous and sommerfee for clarifying this.
8
This is the package name used in Fedora; your distro may have given it a slightly different
name.

5
Installing TEX Live from DVD: Notes

Figure 1: The TL Installer’s GUI mode.

6
Installing TEX Live from DVD: Notes

2.3.2 TL 2010
Changes have been made to the TL 2010 DVD. It is no longer “live,” i.e.,
you cannot run it directly from DVD any more. It was too large this year to
fit on a single DVD, so the TL developers switched to compressed packaging
(the same that is used for over-the-network installations). This allows for
a much faster installation, because there is much less I/O on a DVD drive.9
On my hardware, the TL 2010 installation process took approximately 10
minutes.
Whichever method you choose, the script will install packages in alpha-
betical order, beginning with 12many and ANUfinalexam, and ending with
zwgetfdate and zwpagelayout.
As the installation progresses, you will see output like this scrolling down
your Terminal screen:

Installing [0002/1946, time/total: 02:33:02/02:33:04]: ANUfinalexam [9k]

3 Finishing the Installation


As the install script finishes, you will see several screens of Terminal output:

Time used for installing the packages: 51:14

running mktexlsr /usr/local/texlive/2009/texmf-dist /usr/local/texlive/2009/texmf


mktexlsr: Updating /usr/local/texlive/2009/texmf-dist/ls-R...
mktexlsr: Updating /usr/local/texlive/2009/texmf/ls-R...
mktexlsr: Done.
writing fmtutil.cnf data to /usr/local/texlive/2009/texmf-var/web2c/fmtutil.cnf
writing updmap.cfg to /usr/local/texlive/2009/texmf-config/web2c/updmap.cfg
writing language.dat data to /usr/local/texlive/2009/texmf-var/tex/generic/config/lan
writing language.def data to /usr/local/texlive/2009/texmf-var/tex/generic/config/lan
running mktexlsr /usr/local/texlive/2009/texmf-var
mktexlsr: Updating /usr/local/texlive/2009/texmf-var/ls-R...
mktexlsr: Done.
running updmap-sys... done
re-running mktexlsr /usr/local/texlive/2009/texmf-var
mktexlsr: Updating /usr/local/texlive/2009/texmf-var/ls-R...
9
Thanks to Tomek, of the LATEX Community Forum, for this information. The discussion
thread can be found at http://tinyurl.com/2bngwkr

7
Installing TEX Live from DVD: Notes

mktexlsr: Done.
Setting default paper size to letter
/usr/local/texlive/2009/bin/i386-linux/tlmgr: setting paper size for context to lette
/usr/local/texlive/2009/bin/i386-linux/tlmgr: setting paper size for dvipdfm to lette
/usr/local/texlive/2009/bin/i386-linux/tlmgr: setting paper size for dvipdfmx to lett
/usr/local/texlive/2009/bin/i386-linux/tlmgr: setting paper size for dvips to letter.
/usr/local/texlive/2009/bin/i386-linux/tlmgr: setting paper size for pdftex to letter
/usr/local/texlive/2009/bin/i386-linux/tlmgr: setting paper size for xdvi to letter.
running mktexlsr ...
done running mktexlsr.
Regenerating all formats, this may take some time ...running fmtutil-sys --all ...
done running fmtutil-sys --all.
done
pre-generating all format files (fmtutil-sys --all), be patient...done
running package specific postactions
finished with package specific postactions

See
/usr/local/texlive/2009/index.html
for links to documentation. The TeX Live web site (http://tug.org/texlive/)
contains any updates and corrections.

TeX Live is a joint project of the TeX user groups around the world;
please consider supporting it by joining the group best for you. The
list of groups is available on the web at http://tug.org/usergroups.html.

Add /usr/local/texlive/2009/texmf/doc/man to MANPATH.


Add /usr/local/texlive/2009/texmf/doc/info to INFOPATH.
Most importantly, add /usr/local/texlive/2009/bin/i386-linux
to your PATH for current and future sessions.

Welcome to TeX Live!

Logfile: /usr/local/texlive/2009/install-tl.log

Unmount your TeX Live DVD and eject it from the optical drive:

You should now umount the TL DVD and eject it: # umount /dev/hda
Next, remove the directory you created at the beginning of the installa-
tion process.

8
Installing TEX Live from DVD: Notes

[root@dhcppc2 david]# cd /media


[root@dhcppc2 media]# ls
TL09
[root@dhcppc2 media]# rmdir TL09

Do not delete the /media directory, as it contains important system files


(hidden files which can be shown below using the -a option of the ls com-
mand). This directory is intended to be for removable media (such as USB
sticks, CD-ROMs, floppy diskettes, etc.).

[root@dhcppc2 david]# cd /media


[root@dhcppc2 media]# ls -a
. .. .hal-mtab .hal-mtab-lock

(The operating system made those files invisible by placing a . [period]


at the beginning of their names).

4 Post-Installation Configuration
4.1 Setting the PATH Variable
After the installation finishes, you must add the TEX Live binary directory to
your PATH, if you did not select the option to Create symlinks in system
directories when you began the installation process. (See Subsection 2.1
for details). For the bash shell, the file to edit might be $HOME/.profile (or
another file sourced by .profile, and the lines to add would look like this:

PATH=/usr/local/texlive/2008/bin/i386-linux:$PATH; export PATH


MANPATH=/usr/local/texlive/2008/texmf/doc/man:$MANPATH; export MANPATH
INFOPATH=/usr/local/texlive/2008/texmf/doc/info:$INFOPATH; export INFOPATH

Note: In CentOS 5.5, there was neither a .profile directory, nor a


.profile file in my /home directory. (The same holds true for PCLinuxOS
2010 Phoenix Ed. and for the Fedora 14 Xfce Spin).10 The closest thing I
found was the .bash profile file. I pasted these three lines at the very end
of this file—making no other changes—and saved it.
10
Debian 6 (Squeeze), however, uses a ~ /.profile file.

9
Installing TEX Live from DVD: Notes

4.1.1 A Few More Words about the PATH


I know very little about the relationship between the bash shell profile files
and the PATH settings. Although most Linux distros use bash as the de-
fault, there is variation in how the shell profile files are set up. So you will
need to see what your particular distribution does, and keep an eye on the
following11 :

• Add your PATH variable to ~ /.bash profile (if it exists) as your first
choice.

• If you have no ~ /.bash profile, then add your PATH to ~ /.bash login.

• If you have neither of the above files, look for ~ /.profile and add
your PATH there.

• Try the same three lines in your ~ /.bashrc if putting them in ~ /.profile
does not work.

As reference material, I added Section 6 on which files run when the


bash shell starts. My understanding is that, generally speaking, PATH set-
tings are added to the $HOME/.bash profile file, while user-specific aliases
and functions are added to $HOME/.bashrc. Your mileage may vary . . .

For TL 2009, add these lines to your .bash profile:

PATH=/usr/local/texlive/2009/bin/i386-linux:$PATH; export PATH


MANPATH=/usr/local/texlive/2009/texmf/doc/man:$MANPATH; export MANPATH
INFOPATH=/usr/local/texlive/2009/texmf/doc/info:$INFOPATH; export INFOPATH

For TL 2008, add:

PATH=/usr/local/texlive/2008/bin/i386-linux:$PATH; export PATH


MANPATH=/usr/local/texlive/2008/texmf/doc/man:$MANPATH; export MANPATH
INFOPATH=/usr/local/texlive/2008/texmf/doc/info:$INFOPATH; export INFOPATH

For TL 2010, add:

PATH=/usr/local/texlive/2010/bin/i386-linux:$PATH; export PATH


MANPATH=/usr/local/texlive/2010/texmf/doc/man:$MANPATH; export MANPATH
INFOPATH=/usr/local/texlive/2010/texmf/doc/info:$INFOPATH; export INFOPATH
11
Members frabjous and meho r of the LATEX Community Forum offered me these tips.

10
Installing TEX Live from DVD: Notes

You will make this change as a regular user (since .bash profile resides
in your /home directory). Use your favorite text editor to open the file, e.g.:

$ nano .bash_profile
$ gedit .bash_profile
$ vi .bash_profile
$ emacs .bash_profile

A change like this does not take effect immediately, so log out of your
account, completely reboot your system and log back in.
Finally, issue the command: # texhash
[root@dhcppc2 david]# texhash
texhash: Updating /usr/share/texmf/ls-R...
texhash: Updating /usr/share/texmf-config/ls-R...
texhash: Updating /usr/share/texmf-var/ls-R...
texhash: Updating /var/lib/texmf/ls-R...
texhash: Done.

4.2 Font Configuration for XeTeX


When tested according to the TL Web documentation, I got an error message
saying ‘‘Invalid fontname ‘Latin Modern Roman/ICU’ ... ’’ So I
needed to configure my system so that XeTEX could find the fonts shipped
with TEX Live.
This is accomplished by configuring the texlive-fontconfig.conf file.
In TL 2009, this file lives within the directory:
/usr/local/texlive/2009/texmf-var/fonts/conf/
In TL 2008, it is located here:
/usr/local/texlive/2008/texmf-var/fonts/conf/
As root user, you will be copying this file to the /etc/fonts/conf.d/
directory and simultaneously renaming the file 09-texlive.conf.

[root@dhcppc2 david]# cd /usr/local/texlive/2009/texmf-var/fonts/conf/


[root@dhcppc2 conf]# ls
conf texlive-fontconfig.conf
[root@dhcppc2 conf]# cp texlive-fontconfig.conf /etc/fonts/conf.d/09-texlive.conf

Now you must run the fc-cache-fv command:

11
Installing TEX Live from DVD: Notes

[root@dhcppc2 conf]# fc-cache -fv

It returns the following results:

/usr/share/fonts: caching, 0 fonts, 6 dirs


/usr/share/fonts/bitmap-fonts: caching, 31 fonts, 0 dirs
/usr/share/fonts/bitstream-vera: caching, 10 fonts, 0 dirs
/usr/share/fonts/default: caching, 0 fonts, 2 dirs
/usr/share/fonts/default/Type1: caching, 35 fonts, 0 dirs
[... output truncated ...]
/usr/local/texlive/2009/texmf-dist/fonts/type1/wadalab/mrj: caching, 34 fonts, 0 dirs
/var/cache/fontconfig: cleaning cache directory
/root/.fontconfig: not cleaning unwritable cache directory
fc-cache: succeeded

If we test the XeTeX font configuration now (from our regular user ac-
count), it should pass and produce a PDF file:

[david@dhcppc2 ~]$ xetex opentype-info.tex

This is XeTeX, Version 3.1415926-2.2-0.9995.2 (TeX Live 2009)


entering extended mode
(/usr/local/texlive/2009/texmf-dist/tex/xetex/xetexfontinfo/opentype-info.tex
[1] )
Output written on opentype-info.pdf (1 page).
Transcript written on opentype-info.log.

According to the TL online documentation, if you do not have sufficient


privileges to carry out the steps above, you can instead do the following to
make the TEX Live fonts available to you as an individual XeTEX user:

1. Copy the texlive-fontconfig.conf file to ~


/.fonts.conf, where ~ is
your home directory.

2. Run fc-cache -fv.

Note: The technique above did not work for me—XeTeX continued to
complain about “Invalid fontname”—therefore I resorted to becoming root
and using the steps outlined at the beginning of Subsection 4.2.

12
Installing TEX Live from DVD: Notes

5 Testing the Installation


All the tests suggested in the TL online guide passed. Some sample tests are:

$ tex --version
$ latex sample2e.tex
$ xdvi sample2e.dvi (or, $ evince sample2e.dvi) (or, $ acroread sample2e.dvi)
$ pdflatex sample2e.tex
$ xpdf sample2e.pdf (or, $ evince sample2e.pdf) (or, $ okular sample2e.pdf)

5.1 Environment Variables in General


Note: This is for reference only. My TL 2009 stuff is located at

/usr/local/texlive
/usr/local/texlive/2009
/usr/local/texlive/2009/texmf

Compare with the TL 2007 installation in PCLinuxOS 2010 KDE (which


was installed from the official repositories, not from a TL DVD): Most things
are located at

/usr/share/texmf
/usr/share/texmf-texlive

6 More on bash
The brief information below was copied from Agustı́n Velasco’s “How Linux
Works” (ver. 0.6.0, 1 June 2000), hosted by the Computer Documentation
Project12 :

Files run when bash starts

When bash starts it runs script files in the following order if the files
exist and if the shell is a login shell (called by the login program):

1. The /etc/profile script file.


12
http://tinyurl.com/37ga9g6

13
Installing TEX Live from DVD: Notes

2. The .bash profile script in the user’s home directory referred to as


$HOME/.bash profile or ~ /.bash profile. If it is missing $HOME/.bash login
is run. If both .bash profile and .bash login are missing $HOME/.profile
is run. Only one of these files is run. The one run is the first one of the
list found:

(a) $HOME/.bash profile


(b) $HOME/.bash login
(c) $HOME/.profile

3. When bash exits the file called .bash logout in the user’s home di-
rectory is run.

Good Luck and Happy TEXing!

14

You might also like