Installing LaTeX on Web Hosts

To enable LatexRender to typeset math equations in your WordPress blogs or phpBB forums, it requires TeX/LaTeX installed in your web host environment. If your web host provider have already installed such a package, skip this article. Here, I am trying to describe the teTeX installation on HostMonster.

HostMonster does not provide LaTeX packages. However, they allow me to install it on my home directory via the remote access (SSH). The disk space 200 GB provided by HostMonster is enough which is required about 400 MB by teTeX.

Download

You need to download the files tetex-src.tar.gz and tetex-texmf.tar.gz. The primary download sources are

To install

$ mkdir -p /home/user/local/teTeX/share/texmf /home/user/local/teTeX/share/texmf-dist
$ gzip -dc tetex-texmf.tar.gz \
      | (umask 0; cd /home/user/local/teTeX/share/texmf-dist; tar xvf -)
$ gzip -dc tetex-src.tar.gz | tar xvf -
$ cd tetex-src-3.0   # replace 3.0 with the current release number
$ ./configure --prefix=/home/user/local/teTeX >configure.log 2>&1
$ make world >world.log 2>&1
$ make all install

Set up PATH

$ PATH=/home/user/local/teTeX/bin/i686-pc-linux-gnu:$PATH; export PATH
or
$ setenv PATH home/user/local/teTeX/bin/i686-pc-linux-gnu:$PATH

Note: replace i686-pc-linux-gnu by your actual platform directory

Share this:
  • Digg
  • del.icio.us
  • Facebook
  • StumbleUpon
  • Google
  • Live
  • YahooMyWeb
  • Reddit
  • Technorati

Other Topics

10 Responses to “Installing LaTeX on Web Hosts”

  1. I would like to try it but I need the 400 mb’s on my home server. Its a very old computer, hehe.d

  2. I’m looking for this for so long. Actually I want to have latex support on my wordpress blog. Will try it soon and will bug you if have any problem

  3. If you want to publish LaTeX equation in WordPress blog without installing any software, please try jsTeXrender:

    http://yourequations.com/

  4. while following your method, when i did “make world” its exiting after giving this error.

    /usr/X11R6/lib/libXt.so when searching for -lXt
    /usr/bin/ld: skipping incompatible /usr/X11R6/lib/libXt.a when searching for -lXt
    /usr/bin/ld: cannot find -lXt
    collect2: ld returned 1 exit status

    I assume our hostmonster account should generally have same packages installed. help appreciated

  5. [...] sure that it would fetch me anything useful). So when I search (latex on hostmonster), voila the first result was exactly what I needed. Now I’m eager to try installing latex(/tetex) on my web hosting [...]

  6. Hi Burad,

    I rechecked it. I found that I have the same errors. I think they change some software package. However, you can compile teTeX on your local computer and then upload it to HM. Finally you can run

    texconfig

    to set environment in HM.

  7. [...] (Some times yahoo is better), I followed the steps on how to install latex/tetex on my web host from here (You can also get the Installation steps from QuickInstall file in source code or access the same [...]

  8. thanks for your help..actually the steps you have mentioned worked for 32 bit machines and ours are 64 bit configs.
    So you need to change ./configure step to make it work for 64 bit.

    CC=”gcc ${BUILD64}” CXX=”g++ ${BUILD64}” USE_ARCH=64 \
    ./configure –prefix=/home/username/local/teTeX/ \
    –enable-shared \
    –without-texinfo \
    –with-x=no \
    –with-system-ncurses \
    –with-system-zlib &&
    [ -f texk/libtool ] && sed -i “/sys_lib_search_path_spec=/s:/lib:&64:g” texk/libtool;

    After this i followed the rest of steps as mentioned..and its working :)

  9. Also will compiling on my local machine and uploading binaries on hostmonster. I doubt it wont work as both machine are having seperate config.

  10. @burad

    I think there will be no problems. I also succeed installing texlive on HM. I will write about this soon when I have free time.

    Thanks for your contribution anyway.

Leave a Reply