===================
Online Installation
===================

This section is for installations on machines that have access to the internet.

Note: Before proceeding, ensure the 
:doc:`installation requirements <requirements>` are met. Your support 
representative will provide you with a download URL for the Anaconda Repository 
installer. Make sure you have the download URL.

.. include:: install-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:: install-common.rst
   :start-after: S_MONGO_INSTALL
   :end-before: E_MONGO_INSTALL

.. begin 2. Anaconda Repository admin account

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

.. begin 3. Install Anaconda Repository section

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

Download installer
-------------------

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

    curl "$INSTALLER_URL" > anaconda_repository.sh


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

    bash anaconda_repository.sh

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

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

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

.. Section 9

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

.. begin code to mirror installers

Define URL for miniconda installers::

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

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

Define URL for anaconda installers::

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

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


.. Section 10

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

Mirror the anaconda channel from Anaconda Cloud Repository::

    anaconda-server-sync-conda

Note: Due to the size of the Anaconda Cloud repo and depending on the available 
Internet bandwidth, the mirror process can take hours.

:doc:`Mirror anaconda repository <mirrors-anaconda-repository>` contains 
documentation and advanced yaml config for mirroring other channels.
