Vous êtes sur la page 1sur 12

Installing TEX Live 2012 on SolusOS 1.

2: Personal Notes
By kalwisti Updated 1 Jan. 2013

Contents
1 Pre-Installation 1.1 Download a TEX Live 2012 ISO . . . . . . . . . . . . . . . . . . . . 1.2 Clean Up Previous TEX Installations . . . . . . . . . . . . . . . . . 1.3 Create a New Mount Point for the .iso File . . . . . . . . . . . . Installation 2.1 Duration of Installation . . . . . . . . . . . . . . . . . . . . . . . . Finishing the Installation Post-Installation Conguration 4.1 Seing the PATH Variable . . . . . . . . . . . . . . . . . . . . . . . 4.2 Editing Your MANPATH . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Font Conguration for XTEX . . . . . . . . . . . . . . . . . . . . . Testing the Installation Delete Your TL 2012 ISO More on bash
Abstract ese are notes I made during my aempt to install TEX Live (hereaer abbreviated TL) 2012, using a TL .iso le downloaded from a CTAN mirror on the Internet. I installed TL on SolusOS 1.2 Eveline (with a Gnome 2.30.2 desktop environment).

2 2 2 3 4 5 5 7 7 9 10 11 11 11

2 3 4

5 6 7

Installing T X Live 2012 on SolusOS 1.2 E


is alternative method uses an .iso le which you download to your /home folder, and will then install directlywithout the need for burning it to a DVD. Disclaimer: Although there may be a few errors or inaccuracies here, this procedure worked for me and it should work equally well for you. You will see that TLs installer adopts a distro-neutral, plain vanilla approach. e instructions are not 100% complete, so I recommend that you read the TL documentation available on TUGs website in conjunction with this document.

1 Pre-Installation
1.1 Download a TEX Live 2012 ISO
Download a TL .iso image. Visit http://www.tug.org/texlive/acquire. html for a list of the various ways you can get the soware. A list of CTAN mirrors is available here: http://ctan.org/mirrors Verify its md5sum and sha256sum to ensure that the download is not corrupted. Note: e ISO is a very large leapprox. 2 GB in sizeso be prepared that the download will take a while if you have a non-broadband Internet connection.

1.2 Clean Up Previous TEX Installations


e SolusOS repositories include TL 2009. If you installed this version from the repos, you should remove it prior to installing TL 2012. e easiest method of removing TL 2009 is to use the Synaptic Package Manager. Clean up any previous TEX installations by completely removing them. By default, this would probably be in these two directories: rm -rf /usr/local/texlive/2009 rm -rf ~/.texlive2009
Karl Berry, ed., e TEX Live Guide: TEX Live 2012, June 2012. https://www.tug.org/ texlive/doc/texlive-en/texlive-en.html

Installing T X Live 2012 on SolusOS 1.2 E

You will notice that almost all the installation steps are done via the CLI (Command Line Interface) rather than a GUI (Graphical User Interface). Dont worry I have included the necessary commands and if you type them carefully, you will not harm your system.

1.3 Create a New Mount Point for the .iso File


We will rst create a mount point for the TL 2012 .iso le. It helps to visualize the mount point as a clothes hanger, and the le (our .iso le) as the clothesif you need to hang up your clothes, you need a hanger. Now you can follow these steps: Open up a Terminal within your regular user account, issue the command su and type roots password to acquire root user privileges: david@solusos ~ $ su Password: [ Type your password here ] solusos david # Note: at pound sign (#) as the command prompt is your verication that you are logged in as the root user. Create a temporary mount point for the .iso: solusos ~ # mkdir /mnt/iso Navigate to the directory where your TL .iso le is located. In my case, I saved it to a directory named TeX Live 2012 within my /home folder. Type: solusos ~ # cd /home/david/"TeX Live 2012"
anks to user HacK_MiNDeD for this analogy. For more information, see his article How to Mount ISOs on Linux Using Terminal, 6 Apr. 2011. http://www.hackerslane.com/2011/ how-to-mount-isos-on-linux-using-terminal/

Installing T X Live 2012 on SolusOS 1.2 E Note: You need to surround the directory name with quotation marks in order to let the bash shell know that the interword spaces are part of the directory name. On my system, the TL ISO was named texlive2012-20120701.iso. e output of the ls (list) command below illustrates that: solusos TeX Live 2012 # ls texlive2012-20120701.iso Point to the TL .iso and tell Linux to mount it to our newly created mount point: solusos TeX Live 2012 # mount -o loop texlive2012-20120701.iso /mnt/iso A gloss of this command is: mount [option flag] [set up loop device] [source] [target directory] loop: A loop device is a pseudo-device that makes a le accessible as a block device. Loop devices are oen used for CD ISO images and oppy disc images. Mounting a le containing a lesystem via such a loop mount makes the les within that lesystem accessible. You will not be able to mount the ISO without the loop function. ese preliminary steps will allow us to run the TL install script shortly.

2 Installation
All commands below were issued by / (root) rather than a normal user. Follow these steps: # cd /mnt/iso
-o loop e TL 2012 .iso le. e mount point we just created. How to: Mount an ISO image under Linux, NixCra, 11 Dec. 2008. http://www.cyberciti. biz/tips/how-to-mount-iso-image-under-linux.html.

Installing T X Live 2012 on SolusOS 1.2 E Run the ls command to show you the TL ISOs contents: solusos iso # ls archive install-tl-advanced.bat README release-texlive.txt tl-tray-menu.exe autorun.inf install-tl.bat readme-html.dir source index.html LICENSE.CTAN readme-txt.dir texlive-doc install-tl LICENSE.TL README.usergroups tlpkg 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, then p, to change the default paper size (if you are a North American who uses leer-size paper rather than A4). Type the leer r to return to the main menu. Type the leer i (for i(nstall)) to begin the installation.

2.1 Duration of Installation


e script will install packages in alphabetical order, beginning with 12many and a0poster, and ending with zwgetfdate and zwpagelayout. On my hardware, the TL 2012 installation process took approximately 5 minutes.

3 Finishing the Installation


As the install script nishes, you will see several screens of Terminal output: [... output truncated ...] pre-generating all format files (fmtutil-sys --all), be patient...done running package-specific postactions finished with package-specific postactions See
AMD Athlon II X2 240 (Regor) 2.8 GHz, with 4 GB of RAM.

Installing T X Live 2012 on SolusOS 1.2 E /usr/local/texlive/2012/index.html for links to documentation. The TeX Live web site contains updates and corrections: http://tug.org/texlive. 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 user groups is on the web at http://tug.org/usergroups.html.

Add /usr/local/texlive/2012/texmf/doc/man to MANPATH, if not dynamically determined. Add /usr/local/texlive/2012/texmf/doc/info to INFOPATH. Most importantly, add /usr/local/texlive/2012/bin/i386-linux to your PATH for current and future sessions. Welcome to TeX Live! Logfile: /usr/local/texlive/2012/install-tl.log Type the cd (change directory) command to free up the directory where you have been working: # cd You should now unmount the TL ISO: # umount /mnt/iso N.B.: e command is umount (unmount without the rst leer n). Next, remove the temporary mount point you created at the beginning of the installation process. solusos ~ # rmdir /mnt/iso solusos ~ # cd /mnt solusos mnt # ls cgroups (e subsequent cd and ls commands illustrate that the /mnt/iso directory was successfully deleted).

Installing T X Live 2012 on SolusOS 1.2 E

4 Post-Installation Configuration
4.1 Seing the PATH Variable
I confess my ignorance concerning the subtleties of the $PATH environment variable. e relationship between the bash shell prole les and the PATH seings is a confusing area for me. By default, SolusOS does not appear to have any of the following familiar les which I am accustomed to seeing in other Linux distros: /.bash_profile /.bash_login /.profile /.bashrc erefore I thought the most appropriate le to edit was /etc/profile, which bash reads and executes rst. is le provides global seings which will aect all users on the system. For TL 2012, add these lines to your /etc/profile le. Make sure to add this information below the rst stanza, rather than at the end of the le. If you add it at the end, your $PATH will not be updated properly. PATH=/usr/local/texlive/2012/bin/i386-linux:$PATH; export PATH MANPATH=/usr/local/texlive/2012/texmf/doc/man:$MANPATH; export MANPATH INFOPATH=/usr/local/texlive/2012/texmf/doc/info:$INFOPATH; export INFOPATH Use your favorite text editor to make this change; close the le once it has been saved. When you nish, your /etc/profile le should look like this: # /etc/profile: system-wide .profile file for the Bourne shell (sh(1)) # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
For further info, see Stefaan Lippens, Bash: about .bashrc, .bash_prole, .prole, /etc/prole, etc/bash.bashrc and others, 3 Oct. 2005. http://stefaanlippens.net/bashrc_and_others. As reference material, I added Section 7 on which les run when the bash shell starts.

Installing T X Live 2012 on SolusOS 1.2 E if [ "`id -u`" -eq 0 ]; then PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" else PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" fi export PATH PATH=/usr/local/texlive/2012/bin/i386-linux:$PATH; export PATH MANPATH=/usr/local/texlive/2012/texmf/doc/man:$MANPATH; export MANPATH INFOPATH=/usr/local/texlive/2012/texmf/doc/info:$INFOPATH; export INFOPATH if [ "$PS1" ]; then if [ "$BASH" ]; then # The file bash.bashrc already sets the default PS1. # PS1='\h:\w\$ ' if [ -f /etc/bash.bashrc ]; then . /etc/bash.bashrc fi else if [ "`id -u`" -eq 0 ]; then PS1='# ' else PS1='$ ' fi fi fi # The default umask is now handled by pam_umask. # See pam_umask(8) and /etc/login.defs. if [ -d /etc/profile.d ]; then for i in /etc/profile.d/*.sh; do if [ -r $i ]; then . $i fi done unset i fi

Installing T X Live 2012 on SolusOS 1.2 E A change like this does not take eect immediately, so log out of your account, completely reboot your system and log back in. Conrm that your $PATH has been updated by typing this command: david@solusos ~ $ echo $PATH /usr/local/texlive/2012/bin/i386-linux:/usr/local/bin:/usr/bin:/bin: /usr/local/games:/usr/games Finally, issue the texhash command: solusos david # /usr/local/texlive/2012/bin/i386-linux/texhash texhash: Updating /usr/local/texlive/2012/texmf/ls-R... texhash: Updating /usr/local/texlive/2012/texmf-config/ls-R... texhash: Updating /usr/local/texlive/2012/texmf-dist/ls-R... texhash: Updating /usr/local/texlive/2012/../texmf-local/ls-R... texhash: Updating /usr/local/texlive/2012/texmf-var/ls-R... texhash: Done. Note: You must call texhash with its full path, as shown above. If you just type texhash, the system will return a command not found error message.

4.2 Editing Your MANPATH


We should also edit the MANPATH environment variable. is contains a colonseparated list of directories in which the man command searches for the man pages. Historically, in both UNIX and Linux, the way system documentation is accessed is via the man command. Manual pages are a descriptive help system that sometimes contains procedural help (How do I ?) and sometimes the reason the command itself was created (the goal of the program). Use your favorite text editor to open the /etc/manpath.config le: # gedit /etc/manpath.config Find the section labelled # set up PATH to MANPATH mapping. At the end of this section, add the following line:
Short for manual pages. Norman Robinson, Reading Man Pages, 2003. http://linuxcommand.org/reading_man_ pages.php

Installing T X Live 2012 on SolusOS 1.2 E MANPATH_MAP /usr/local/texlive/2010/bin/i386-linux 2010/texmf/doc/man Log out and reboot your PC for the changes to take eect. /usr/local/texlive/

4.3 Font Configuration for XTEX


When tested according to the TL Web documentation, I received an error message saying Invalid fontname Latin Modern Roman/ICU ... So I had to congure my system so that XTEX could nd the fonts shipped with TEX Live. is is accomplished by conguring the texlive-fontconfig.conf le. In TL 2012, this le lives within the directory: /usr/local/texlive/2012/texmf-var/fonts/conf/ As root user, you will be copying this le to the /etc/fonts/conf.d/ directory and simultaneously renaming the le 12-texlive.conf. # cd /usr/local/texlive/2012/texmf-var/fonts/conf/ # ls conf texlive-fontconfig.conf # cp texlive-fontconfig.conf /etc/fonts/conf.d/12-texlive.conf Now you must run the fc-cache -fv command: # fc-cache -fv It returns the following results: [... output truncated ...] /usr/local/texlive/2012/texmf-dist/fonts/type1/wadalab/mr2j: caching, new cache contents: 23 fonts, 0 dirs /usr/local/texlive/2012/texmf-dist/fonts/type1/wadalab/mrj: caching, new cache contents: 34 fonts, 0 dirs /var/cache/fontconfig: cleaning cache directory /root/.fontconfig: not cleaning non-existent cache directory fc-cache: succeeded
is information is courtesy of Milind Padalkar, Installing TEX Live 2010 in Ubuntu 10.04, 10.10 and 11.04, 4 May 2011. http://ubunlatex.blogspot.com/2012/02/ installing-texlive-2010-in-ubuntu-1004.html

10

Installing T X Live 2012 on SolusOS 1.2 E If we test the XTEX font conguration now (from our regular user account), it should pass and produce a PDF le: david@solusos ~ $ xetex opentype-info.tex This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012) restricted \write18 enabled. entering extended mode (/usr/local/texlive/2012/texmf-dist/tex/xetex/xetexfontinfo/opentype-info.tex [1] ) Output written on opentype-info.pdf (1 page). Transcript written on opentype-info.log.

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 pdflatex sample2e.tex evince sample2e.pdf

6 Delete Your TL 2012 ISO


Congratulations! Now that you have successfully installed TL 2012, you can delete the downloaded .iso le to free up disk space: solusos david # rm -Rf "TeX Live 2012" solusos david # cd /home/david solusos david # ls bash_info_solusos.txt Downloads NVIDIA-Linux-x86-304.64.run Templates Desktop Dropbox Pictures Videos Documents Music Public

7 More on bash
e brief information below was copied from Agustn Velascos How Linux Works (ver. 0.6.0, 1 June 2000), hosted by the Computer Documentation Project :
http://tinyurl.com/37ga9g6

11

Installing T X Live 2012 on SolusOS 1.2 E Files run when bash starts When bash starts it runs script les in the following order if the les exist and if the shell is a login shell (called by the login program): 1. e /etc/profile script le. 2. e .bash_profile script in the users 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 les is run. e one run is the rst one of the list found: (a) $HOME/.bash_profile (b) $HOME/.bash_login (c) $HOME/.profile 3. When bash exits the le called .bash_logout in the users home directory is run.

Good Luck and Happy TEXing in 2013!

A Typeset with XTEX using the LTEX macro package and the hyperref package. e Linux Libertine typeface was designed by Phillip H. Poll.

12

Vous aimerez peut-être aussi