==============================
Installing on an online system
==============================

These instructions are for normal Linux installations on machines
that have access to the internet.

NOTE: If the destination server is an air gapped system or
otherwise does not have access to the internet, see
:doc:`air-gap`.

.. contents::
   :local:
   :depth: 1


Before you start
================

Your server must meet the requirements for hardware, software,
security and network. Please review and verify that you have met
all :doc:`system requirements <requirements>` before beginning
your installation.

Your support representative provides you with a download URL for
the Anaconda Repository installer. Make sure you have the
download URL.

.. include:: common.rst
   :start-after: S_HEADING_MONGO
   :end-before: E_HEADING_MONGO


In a terminal window, create the ``yum`` repo file as the root user::

    RPM_CDN="https://820451f3d8380952ce65-
    4cc6343b423784e82fd202bb87cf87cf.ssl.cf1.rackcdn.com"
    curl -O $RPM_CDN/mongodb-org-tools-2.6.8-1.x86_64.rpm
    curl -O $RPM_CDN/mongodb-org-shell-2.6.8-1.x86_64.rpm
    curl -O $RPM_CDN/mongodb-org-server-2.6.8-1.x86_64.rpm
    curl -O $RPM_CDN/mongodb-org-mongos-2.6.8-1.x86_64.rpm
    curl -O $RPM_CDN/mongodb-org-2.6.8-1.x86_64.rpm

NOTE: Ubuntu users use ``apt-get`` instead of ``yum``.

.. include:: common.rst
   :start-after: S_MONGO_INSTALL
   :end-before: E_MONGO_INSTALL

.. begin 2. Repository admin account

.. include:: common.rst
   :start-after: S_AER_ADMIN_ACT
   :end-before: E_AER_ADMIN_ACT

.. begin 3. Install Repository section

.. include:: common.rst
   :start-after: S_HEADING_INSTALL
   :end-before: E_HEADING_INSTALL


.. _linux-installer:

Download the installer
-----------------------

Download the Repository installer from the download URL provided by your
support representative::

  curl "$INSTALLER_URL" > anaconda_repository.sh


Install Repository, following the prompts in the installation routine::

  bash anaconda_repository.sh

.. include:: common.rst
   :start-after: S_AER_INSTALL
   :end-before: E_AER_INSTALL

.. Sections 4, 5, 6, 7, 8

.. include:: common.rst
   :start-after: S_AER_SECTIONS_45678
   :end-before: E_AER_SECTIONS_45678

.. Section 9

.. include:: common.rst
   :start-after: S_HEADING_MIRROR_CONDA
   :end-before: E_HEADING_MIRROR_CONDA

.. begin code to mirror installers

Define the URL for miniconda installers::

  URL="https://repo.continuum.io/miniconda/"

.. include:: common.rst
   :start-after: S_GET_MINICONDA
   :end-before: E_GET_MINICONDA

Define the URL for Anaconda installers::

  URL="https://repo.continuum.io/archive/"

.. include:: common.rst
   :start-after: S_GET_ANACONDA
   :end-before: E_GET_ANACONDA


.. Section 10

.. include:: common.rst
   :start-after: S_HEADING_MIRROR_CHANNELS
   :end-before: E_HEADING_MIRROR_CHANNELS

Mirror the Anaconda channel from Anaconda Cloud::

  anaconda-server-sync-conda

NOTE: Due to the size of the Cloud repository and depending on the
available internet bandwidth, the mirroring process can take hours.

:doc:`config/mirrors/mirror-anaconda-repository` contains
documentation and advanced ``yaml`` configuration for mirroring
other channels.
