Full Stack Python

# Operating Systems

An operating system runs on the server or virtual server and controls access to computing resources. The only recommended operating system for production Python web stack deployments is Linux. There are several Linux distributions commonly used for running production servers. Ubuntu Long Term Support (LTS) releases, Red Hat Enterprise Linux, and CentOS are all viable options.

Side note: Mac OS X is fine for development activities. Windows and Mac OS X are not appropriate for most test and production deployments unless there is a specific reason why you must use them in lieu of Linux.

## Ubuntu

Ubuntu is a Linux distribution packaged by the Canonical Ltd company. Ubuntu uses the Debian distribution as a base for packages, including the aptitude package manager. For desktop versions of Ubuntu, GNOME (until the 11.04 release) or Unity (11.10 through current) is added to the distribution to provide a user interface.

Ubuntu Long Term Support (LTS) releases are the recommended versions to use for deployments. LTS versions receive five years of post-release updates from Canonical. Every two years, Canonical creates a new LTS release, which allows for an easy upgrade path as well as flexibility in skipping every other LTS release if necessary. As of February 2014, 12.04 Precise Pangolin is the latest Ubuntu LTS release.

### Ubuntu Python Packages

There are several Aptitude packages found on Linux servers running a Python stack. These include

- python-dev for header files and static library for Python
- python-virtualenv for creating and managing Python virtual environments (virtualenvs)

## Red Hat and CentOS

Red Hat Enterprise Linux (RHEL) and Community ENTerprise Operating System (CentOS) are the same distribution. The only difference between the two (other than the name) is that CentOS is an open source, liberally licensed free derivative of RHEL.

RHEL and CentOS use a different package manager and command-line interface from Debian-based Linux distributions: RPM Package Manager (RPM) and the Yellowdog Updater, Modified (YUM). RPM has a specific .rpm file format to handle the packaging and installation of libraries and applications. YUM provides a command-line interface for interacting with the RPM system.

## Operating System Resources

Choosing a Linux Distribution

First 5 Minutes on a Server

Securing an Ubuntu Server Securing Ubuntu

Securing a Linux Server

quick NIX secure script for securing Linux distributions.

Next read the web servers section.