<commit_before>---
layout: post
title: Installing Python without Internet or Root
---

# Versions

This was tested using the following versions

 * Red Hat Enterprise Linux Server release 7.1
 * Python 2.7.10
 * zlib 1.2.8
 * openssl 1.0.0s
 * setuptools 18.6.1
 * pip 7.1.2

# Downlaod Packages

 * [Python](https://www.python.org/downloads/source/)
 * [zlib](http://www.zlib.net/)
 * [openssl](https://www.openssl.org/source/)
 * [setuptools](https://pypi.python.org/pypi/setuptools#code-of-conduct)
 * [pip](https://pypi.python.org/pypi/pip#downloads)

Transfer the software to the offline server

{% highlight shell %}

cd Downloads
scp * user@offline-server

{% endhighlight %}

# Setup the offline server

 * Update the path
 * Create the directory structure

```bash
echo "export PATH=\$HOME/.local/bin:\$PATH" >> $HOME/.bashrc
export PATH=$HOME/.local/bin:$PATH

mkdir $HOME/.local
mkdir -p $HOME/packages/python
mkdir -p $HOME/.config/pip/
```

# Compile software

## openssl<commit_msg>Update 2015-12-03-offline-python.md<commit_after>---
layout: post
title: Installing Python without Internet or Root
---

# Versions

This was tested using the following versions

 * Red Hat Enterprise Linux Server release 7.1
 * Python 2.7.10
 * zlib 1.2.8
 * openssl 1.0.0s
 * setuptools 18.6.1
 * pip 7.1.2

# Downlaod Packages

 * [Python](https://www.python.org/downloads/source/)
 * [zlib](http://www.zlib.net/)
 * [openssl](https://www.openssl.org/source/)
 * [setuptools](https://pypi.python.org/pypi/setuptools#code-of-conduct)
 * [pip](https://pypi.python.org/pypi/pip#downloads)

Transfer the software to the offline server

```bash
cd Downloads
scp * user@offline-server
```

# Setup the offline server

 * Update the path
 * Create the directory structure

```bash
echo "export PATH=\$HOME/.local/bin:\$PATH" >> $HOME/.bashrc
export PATH=$HOME/.local/bin:$PATH

mkdir $HOME/.local
mkdir -p $HOME/packages/python
mkdir -p $HOME/.config/pip/
```

# Compile software

## openssl
{'fraction_non_alphanumeric': 0.15582450832072617, 'fraction_numerical': 0.02319717599596571, 'mean_word_length': 3.769230769230769, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 8, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4421714', 'n_tokens_mistral': 754, 'n_tokens_neox': 673, 'n_words': 168}