3

Background

Looking to install ConTeXt on CentOS 6, without an Internet connection.

Problem

The CentOS 6 server does not have Internet access, but can receive files from a computer on the same local area network.

Related

There are a number of related issues, inluding:

However, these questions do not address the offline nature specifically for the latest version of ConTeXt available at http://standalone.contextgarden.net/setup/linux-64/.

Question

Given a machine running Windows (or Cygwin on top of Windows, or Linux, even, as the instructions can likely port), how would you download and install an offline version of ConTeXt on a server running CentOS 6 for all users?

The following steps will not work, but serve as an example of what I'd like to accomplish:

  1. On Windows, open Cygwin.
  2. Type:
    mkdir $HOME/context
    cd $HOME/context
    curl --recursive http://standalone.contextgarden.net/setup/linux-64/ .
  3. On Windows, open WinSCP (or file transfer program).
  4. Connect to CentOS server.
  5. Transfer entire linux-64 directory.
  6. Disconnect WinSCP.
  7. On Windows, open Putty (or other remote shell access program).
  8. Connect and login to CentOS server.
  9. Change to root user.
  10. Type:
    mkdir /opt/context
    cd /opt/context
    cp -R /home/user/linux-64  .
    cd linux-64
    ./first-setup.sh
    
  11. Optionally, disconnect from the server.

At this point, ConTeXt would be installed on CentOS 6 and all users can create PDFs from .tex files.

3
  • 1
    Just install ConTeXt on another Cent OS 6 machine, compress the entire /opt/context, transfer, done. ConTeXt does not rely on any files outside its tree. Jan 2, 2018 at 23:32
  • Then use a virtual machine, e.g. Docker. Jan 3, 2018 at 0:11
  • 1
    I uploaded the tree I generated from my answer here (link valid 14 days, SHA1 6e092fc6b66de7f4f2bbdd1b6c56dbc5abca1b1b). However, I urge you to not trust me and rather build the tree yourself using the instructions below. Jan 3, 2018 at 1:22

1 Answer 1

5

Overview

Since ConTeXt does not rely on any files outside its tree, one solution follows:

  1. Install ConTeXt on another Cent OS 6 machine.
  2. Archive /opt/context.
  3. Transfer the archive to the offline machine.
  4. Delete and then regenerate the cache.

Install ConTeXt via Docker

These instructions describe how to install offline using Docker. If Docker is not available, use another virtualization solution (such as VirtualBox).

  1. Download and install Docker. See also:
  2. Make a new directory (I chose /tmp/centos) and change into it.

    mkdir -p /tmp/centos
    cd /tmp/centos
    
  3. Fire up the Docker CentOS 6 container and mount the current directory to /opt/context. The -it switch (short for --interactive --tty) drops you into an interactive session.

    sudo docker run -v `pwd`:/opt/context -it centos:6 /bin/bash
    

    You now have a shell inside the container.

    1. To be able to download the necessary files and install ConTeXt, install rsync and wget.

      yum install -y rsync wget
      
    2. Install ConTeXt.

      cd /opt/context
      wget http://minimals.contextgarden.net/setup/first-setup.sh
      sh ./first-setup.sh --modules=all
      
    3. Log out of the container.

      exit
      
  4. You should now have a ConTeXt installation in the working directory. Compress it.

    tar -czvf /tmp/ctx-centos6.tar.gz .
    
  5. Transfer.

  6. Create target directory and extract.

    mkdir /opt/context
    tar -xzvf ctx-centos6.tar.gz -C /opt/context
    
  7. Use ConTeXt.

    . /opt/context/tex/setuptex
    

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .