TeXLive 2009 Install On FreeBSD¶
- TeXLive 2009 Install On FreeBSD
- Preparation
- System requirements
- Download TeXLive's source
- Download and mount ISO file
- Building
- Options for ./configure
- Build with gmake
- Configure TeX system
- Global configuration
- Local configuration
- File database. Test
- Update as root
- Update as normal user
- Test your installation
- Final notes
TeXLive2009 doesnot support FreeBSD so we have to build it from source and install TeXLive to global system tree so that all users on the system can use it. The build is architect-dependent because we dont' want to redistribute the result.
The directory structure during/after installation is as below
/home/texlive2009: TeXLive will be installed here/home/texlive2009-dist: the mount point for TeXLive 2009 iso file, described in the Section "Download and Mount iso file"/home/pi/projects/texlive2009: the working directory (contains TeXLive source)/home/pi/.texlive2009/: local TeXLive files
(My username is pi. You may replace pi by any username on your system.)
Preparation¶
System requirements¶
bashshell (sorry, I haven't learnt/bin/shyet)gccgmake(yes, you must use gmake)libpng(optional)libgd(optional)libicu(optional)
Please refer to FreeBD documents to install those packages.
Download TeXLive's source¶
TeXLive's document says that you can download the source file using rsync (this allows you to get an update version). But you can always download faster by using source URL as below.
1 $ cd /home/pi/projects/texlive2009
2 $ wget ftp://tug.org/historic/systems/texlive/2009/texlive-20091107-source.tar.xz
3 $ tar xfvz ./texlive-20091107-source.tar.xz
4 $ # you would get the directory ./texlive-20091107-source
Download and mount ISO file¶
You're going to download a huge file from CTAN server. Please patient and (if possible) read the instructions at http://tug.org/texlive/acquire-iso.html.
In this guide, I suggest you to use the URL http://mirror.ctan.org/systems/texlive/Images/. After entering this site you will be redirected to a nearest mirror. For example, my nearest CTAN link is from Hong Kong. Let's download it by wget
1 $ cd /home/pi/projects/texlive2009@
2 $ wget ftp://ftp.comp.hkbu.edu.hk/pub/TeX/CTAN/systems/texlive/Images/texlive2009-20091107.iso.xz
3 $ # The above file's size is about 1.4GB. You will have to wait for quite long time
4 $ # Now you should download md5 file and test if your download is alright
5 $ wget ftp://ftp.comp.hkbu.edu.hk/pub/TeX/CTAN/systems/texlive/Images/texlive2009-20091107.iso.xz.md5
6 $ # Test your downloaded files now
7 $ md5 ./texlive2009-20091107.iso.xz
8 $ # if the result is as same as the contents of the file ./texlive2009-20091107.iso.xz.md5
9 $ # you can go to the next step to extract the iso file (file's size is about 2.4GB)
10 $ tar xfvz texlive2009-20091107.iso.xz
11 $ #
12 $ # now you need the wheel group, or root permission to mount the iso file.
13 $ # Let's switch to root shell
14 $ su
15 $ mdconfig -t vnode -f /home/pi/projects/texlive2009/texlive2009-20091107.iso -a -u 10
16 $ # You would have the device /dev/md10. You may choose any free number
17 $ # ("free" means that /dev/md10 is unused)
18 $ # You will also create the directory /home/texlive2009-dist/ for iso mounting
19 $ mkdir /home/texlive2009-dist/
20 $ mount -t cd9660 /dev/md10 /home/texlive2009-dist
21 $ # you need to add some commands to your boot scripts so that the ISO file will
22 $ # be mounted each time your system is boot up.
23 $ # The best way is to put your script in /usr/local/etc/rc.d/
Building¶
Options for ./configure¶
To get a full list of options for ./configure, please try ./configure --help
1 $ cd /home/pi/projects/texlive2009/texlive-20091107-source
2 $ ./configure --help
After many try-and-errors I finally found a suitable configuration for my system. My file is attached to this wiki (ICY_CONF). Please download that file and edit +instead o+f copying my description which is too messy for ./configure.
- DONOT copy and paste the contents below without any modification.
- There is a script
Buildin TeXLive source directory. But it may cause troubles.
1 TL_MAKE=gmake # you have to use gmake to build TeXLive
2 TL_CONFIGURE_ARGS=
3 --with-tex-banner="ICY 2009" # your banner which is normally "TeXLive 2009"
4 --prefix="/home/texlive2009/" # the root directory. this is where you install TeXLive to
5 --enable-shared # the binaries are shareable, or architect-dependent.
6 # If you want to redistribute your build, use --disable-shared
7 --disable-largefile # Do you need to typeset some large files?
8 --disable-native-texlive-build # Please read document in ./configure --help
9 --with-system-icu # Use this if you have `icu` package installed
10 --with-system-libpng # Use this if you have `png` package installed
11 --with-system-gd # Use this if you have `gd` package installed
12 # Note that you can not use --with-system-* if you --disable-shared
13 --with-libpng-libdir="/usr/local/lib/"
14 --with-icu-libdir="/usr/local/lib/"
15 --with-gd-libdir="/usr/local/lib/"
16 --with-icu-includes="/usr/local/include/"
17 --with-gd-includes="/usr/local/include/"
18 --with-libpng-includes="/usr/local/include/libpng/"
19 --without-x # delete this line if you want to use some X tools from TeXLive
20 --without-mf-x-toolkit
21 --enable-web2c # Without this you will not get any tex compilers
22 --disable-web-progs # web-programs is rarely used...
23 --disable-cjkutils # I should never use CJK documents
24 --disable-dvisvgm # I disable this because it causes problem on my system
25 --disable-dependency-tracking # faster build -- I believe that :(
26 --disable-tpic2pdftex --disable-dviljk --disable-musixflx --disable-tex4htk
27 --disable-vlna --disable-xindy --disable-detex --disable-devnag --enable-tex
28 --disable-dvi2tty --disable-dvipng --disable-bibtexu --disable-afm2pl --enable-etex
29 --disable-dtl --disable-seetexk --disable-dvipos --disable-debug --enable-xetex
30 --disable-gsftopk --disable-timing --disable-lcdf-typetools --disable-pdfopen
31 --disable-debug --disable-lacheck --disable-aleph --disable-dvisvgm --enable-pdftex
Build with gmake¶
1 $ bash # you are running in Bash
2 $ cd /home/pi/projects/texlive2009
3 $ cd ./texlive-20091107-source
4 $ source /path/to/ICY_CONF
5 $ eval ./configure $TL_CONFIGURE_ARGS # we use bash + eval
6 $ gmake # gmake, not make
7 $ gmake world # install it
During the build process (after you type gmake), you may encounter the problem with icu library. (Though you have specify --with-system-icu .) If that is the case please switch to icu directory then build icu separately
1 $ cd ./libs/icu/icu-build
2 $ gmake
3 $ cd ../../../ # now you're in ./texlive-20091107-source
4 $ gmake # continue to build TeXLive
5 $ gmake world # install to /home/texlive2009/
Configure TeX system¶
Global configuration¶
Create a file named /home/texlive2009/texmf.cnf whose contents are below. This file is very important. It's almost similiar to the file /home/texlive2009/texmf/web2c/texmf.cnf but it will loaded lastly. If you want to know the means of the variables in texmf.cnf please read /home/texlive2009/texmf/web2c/texmf.cnf (which is very comprehensive though it is very messy and hard-to-read)
1 TEXLIVE = /home/texlive2009
2 TEXMFMAIN = $TEXLIVE/texmf
3 TEXMFLOCAL = $TEXLIVE/texmf-local
4 TEXMFSYSVAR = $TEXLIVE/texmf-var
5 TEXMFSYSCONFIG = $TEXLIVE/texmf-config
6 TEXLIVEDIST = /home/texlive2009-dist
7 TEXMFDIST = {!!$TEXMFMAIN,!!$TEXLIVE/texmf-dist,!!$TEXLIVEDIST/texmf,!!$TEXLIVEDIST/texmf-dist}
8 TEXMFCNF = {$TEXMFDIST,$TEXMFSYSCONFIG}{,/{-local,}/web2c}
9 TEXMF = {$TEXMFCONFIG,$TEXMFVAR,$TEXMFHOME,!!$TEXMFSYSCONFIG,!!$TEXMFSYSVAR,!!$TEXMFLOCAL,$TEXMFDIST}
Local configuration¶
As a normal user in the system, your TeX configuration files are stored in $HOME/.texlive2009/. If you want to add some fonts' maps, please use the file /home/texlive2009-dist/texmf/web2c/updmap.cfg. Because that file is unwritable, you should copy it to the directory $HOME/.texlive2009/texmf/web2c/updmap.cfg then add your own map-lines.
File database. Test¶
Update as root¶
1 $ texhash /home/texlive2009
2 $ texhash /home/texlive2009-dist # note: this directory is unwritable. See Final Notes
Update as normal user¶
1 $ updmap
2 $ texhash /home/pi/.texlive2009
Test your installation¶
The last line must be seen otherwise your installation failed.
1 $ kpsewhich -a updmap.cfg
2 /home/pi/.texlive2009/texmf-config/web2c/updmap.cfg
3 /home/texlive2009-dist/texmf/web2c/updmap.cfg
Final notes¶
As mentioned in the previous steps, /home/texlive2009-dist is unwritable so you can't run texhash for that directory. In fact, I tricked the TeXLive 2009 as below
- mount TeXLive 2009 iso file to the directory
/home/texlive2009-original - copy all files, except for the binary files, in
/home/texlive2009-original/to/home/texlive2009-small. Herebinary filesstands for any files in thebindirectory (you won't find FreeBSD in such./binso you have to read this document) - run
texhashfor/home/texlive2009-small - create new ISO file from
/home/texlive2009-small - now I have 1.7GB instead of 2.4GB
- use new iso instead of orignal iso file