===============================
Offline Installation (AER 2.32)
===============================

.. raw:: html

    <p>This section is for installations on machines that do not have access to the
    internet. The air gap archives contain installers, dependencies and packages to
    mirror.</p>
    <p>Note: Before proceeding, ensure the
    <a class="reference internal" href="requirements.html"><span class="doc">installation requirements</span></a> are met.</p>
    <div class="section" id="download-air-gap-archive">
    <span id="download-mirror-archive"></span><h2>Download air gap archive<a class="headerlink" href="#download-air-gap-archive" title="Permalink to this headline">¶</a></h2>
    <p>Download the installers archive and the appropriate mirrors archive for your
    needs. The <a class="reference internal" href="airgap-archive.html"><span class="doc">Air gap archive</span></a> page lists the archives and their contents.</p>
    <p>This document assumes the air gap media is available on the target server at
    <cite>$INSTALLER_PATH</cite>. For example:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>tar xf &lt;installer-archive&gt; -C /installer/
    export INSTALLER_PATH=/installer/anaconda-enterprise-`date +%Y-%m-%d`
    </pre></div>
    </div>
    <p>Also download and expand the archive of conda packages you plan to mirror.
    Documentation assumes packages are expanded to &#8216;$INSTALLER_PATH&#8217;:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>tar xf &lt;archive-of-pkgs-to-mirror&gt; -C /installer/
    export MIRRORS_ARCHIVE=/installer/repo-mirrors-`date +%Y-%m-%d`
    </pre></div>
    </div>
    </div>
    <div class="section" id="install-mongodb-2-6">
    <h2>1. Install MongoDB 2.6<a class="headerlink" href="#install-mongodb-2-6" title="Permalink to this headline">¶</a></h2>
    <p>Change directory to appropriate <cite>rpms*</cite> directory to find dependencies:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>cd $INSTALLER_PATH/rpms*x/
    </pre></div>
    </div>
    <div class="section" id="mongodb-for-redhat-and-centos-7">
    <h3>MongoDB for Redhat and CentOS 7<a class="headerlink" href="#mongodb-for-redhat-and-centos-7" title="Permalink to this headline">¶</a></h3>
    <p>Install MongoDB:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">yum</span> <span class="n">install</span> <span class="o">-</span><span class="n">y</span> <span class="n">mongodb</span><span class="o">-</span><span class="n">org</span><span class="o">*</span>
    </pre></div>
    </div>
    <p>Start MongoDB:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">systemctl</span> <span class="n">start</span> <span class="n">mongod</span>
    </pre></div>
    </div>
    <p>Verify that MongoDB is running:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>$ sudo systemctl status mongod
    mongodb (pid 17258) is running...
    </pre></div>
    </div>
    </div>
    <div class="section" id="mongodb-for-redhat-and-centos-6-7">
    <h3>MongoDB for Redhat and CentOS 6.7+<a class="headerlink" href="#mongodb-for-redhat-and-centos-6-7" title="Permalink to this headline">¶</a></h3>
    <p>Install MongoDB:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">yum</span> <span class="n">install</span> <span class="o">-</span><span class="n">y</span> <span class="n">mongodb</span><span class="o">-</span><span class="n">org</span><span class="o">*</span>
    </pre></div>
    </div>
    <p>Start MongoDB:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">init</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">mongod</span> <span class="n">start</span>
    </pre></div>
    </div>
    <p>Verify that MongoDB is running:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>$ sudo /etc/init.d/mongod status
    mongodb (pid 17258) is running...
    </pre></div>
    </div>
    </div>
    <div class="section" id="mongodb-for-ubuntu-12-04">
    <h3>MongoDB for Ubuntu 12.04+<a class="headerlink" href="#mongodb-for-ubuntu-12-04" title="Permalink to this headline">¶</a></h3>
    <p>Install MongoDB:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">key</span> <span class="n">adv</span> <span class="o">--</span><span class="n">keyserver</span> <span class="n">hkp</span><span class="p">:</span><span class="o">//</span><span class="n">keyserver</span><span class="o">.</span><span class="n">ubuntu</span><span class="o">.</span><span class="n">com</span><span class="p">:</span><span class="mi">80</span> <span class="o">--</span><span class="n">recv</span> <span class="mi">7</span><span class="n">F0CEB10</span>

    <span class="n">echo</span> <span class="s1">&#39;deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen&#39;</span> <span class="o">|</span> <span class="n">sudo</span> <span class="n">tee</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">apt</span><span class="o">/</span><span class="n">sources</span><span class="o">.</span><span class="n">list</span><span class="o">.</span><span class="n">d</span><span class="o">/</span><span class="n">mongodb</span><span class="o">.</span><span class="n">list</span>

    <span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">update</span>

    <span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="o">-</span><span class="n">y</span> <span class="n">mongodb</span><span class="o">-</span><span class="n">org</span><span class="o">=</span><span class="mf">2.6</span><span class="o">.</span><span class="mi">9</span> <span class="n">mongodb</span><span class="o">-</span><span class="n">org</span><span class="o">-</span><span class="n">server</span><span class="o">=</span><span class="mf">2.6</span><span class="o">.</span><span class="mi">9</span> <span class="n">mongodb</span><span class="o">-</span><span class="n">org</span><span class="o">-</span><span class="n">shell</span><span class="o">=</span><span class="mf">2.6</span><span class="o">.</span><span class="mi">9</span> <span class="n">mongodb</span><span class="o">-</span><span class="n">org</span><span class="o">-</span><span class="n">mongos</span><span class="o">=</span><span class="mf">2.6</span><span class="o">.</span><span class="mi">9</span> <span class="n">mongodb</span><span class="o">-</span><span class="n">org</span><span class="o">-</span><span class="n">tools</span><span class="o">=</span><span class="mf">2.6</span><span class="o">.</span><span class="mi">9</span>
    </pre></div>
    </div>
    <p>Start MongoDB:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">service</span> <span class="n">mongodb</span> <span class="n">start</span>
    </pre></div>
    </div>
    <p>You will receive verification that MongoDB is running:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">start</span><span class="p">:</span> <span class="n">Job</span> <span class="ow">is</span> <span class="n">already</span> <span class="n">running</span><span class="p">:</span> <span class="n">mongodb</span>
    </pre></div>
    </div>
    <p>Note: If you don&#8217;t specify a version like 2.6.9, apt-get will install the latest stable version, which is 3.x.</p>
    </div>
    <div class="section" id="additional-mongodb-resources">
    <h3>Additional MongoDB resources<a class="headerlink" href="#additional-mongodb-resources" title="Permalink to this headline">¶</a></h3>
    <p>For additional MongoDB installation information see <a class="reference external" href="https://docs.mongodb.org/manual/">https://docs.mongodb.org/manual/</a></p>
    </div>
    </div>
    <div class="section" id="create-the-anaconda-repository-administrator-account">
    <h2>2. Create the Anaconda Repository administrator account<a class="headerlink" href="#create-the-anaconda-repository-administrator-account" title="Permalink to this headline">¶</a></h2>
    <p>In a terminal window, create a new user account for Anaconda Repository named anaconda-server, and switch to this new account:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">useradd</span> <span class="o">-</span><span class="n">m</span> <span class="n">anaconda</span><span class="o">-</span><span class="n">server</span>
    </pre></div>
    </div>
    <p>The anaconda-server user is the default for installing Anaconda Repository. Any username can be used.</p>
    <p>NOTE: The use of the root user is discouraged.</p>
    <p>Create Anaconda Repository package storage directory:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">mkdir</span> <span class="o">-</span><span class="n">m</span> <span class="mi">0770</span> <span class="o">-</span><span class="n">p</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="o">/</span><span class="n">package</span><span class="o">-</span><span class="n">storage</span>
    </pre></div>
    </div>
    <p>Assign the anaconda-server user ownership of this directory:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">chown</span> <span class="o">-</span><span class="n">R</span> <span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="p">:</span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span>
    </pre></div>
    </div>
    <p>Switch to the Anaconda Repository administrator account:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">su</span> <span class="o">-</span> <span class="n">anaconda</span><span class="o">-</span><span class="n">server</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="install-anaconda-repository">
    <h2>3. Install Anaconda Repository<a class="headerlink" href="#install-anaconda-repository" title="Permalink to this headline">¶</a></h2>
    <p>Install Anaconda Repository, following the prompts in the installation routine:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>bash $INSTALLER_PATH/anaconda_repository-*-linux-64.sh
    </pre></div>
    </div>
    <p>Note: Path should have only one installer that is for the latest stable version
    of anaconda repository.</p>
    <p>Review and accept the license terms:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Welcome</span> <span class="n">to</span> <span class="n">Anaconda</span> <span class="n">Repository</span> <span class="mf">2.32</span> <span class="p">(</span><span class="n">by</span> <span class="n">Anaconda</span><span class="p">,</span> <span class="n">Inc</span><span class="o">.</span><span class="p">)</span>
    <span class="n">In</span> <span class="n">order</span> <span class="n">to</span> <span class="k">continue</span> <span class="n">the</span> <span class="n">installation</span> <span class="n">process</span><span class="p">,</span> <span class="n">please</span> <span class="n">review</span> <span class="n">the</span> <span class="n">license</span> <span class="n">agreement</span><span class="o">.</span>
    <span class="n">Please</span><span class="p">,</span> <span class="n">press</span> <span class="n">ENTER</span> <span class="n">to</span> <span class="k">continue</span><span class="o">.</span>
    </pre></div>
    </div>
    <p>Once you have reviewed the license terms, approve them:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>Do you approve the license terms? [yes|no] yes
    </pre></div>
    </div>
    <p>Accept the default location or specify an alternative:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda_repository</span> <span class="n">will</span> <span class="n">now</span> <span class="n">be</span> <span class="n">installed</span> <span class="n">into</span> <span class="n">this</span> <span class="n">location</span><span class="p">:</span>
    <span class="o">/</span><span class="n">home</span><span class="o">/</span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="o">/</span><span class="n">repo</span>  <span class="o">-</span><span class="n">Press</span> <span class="n">ENTER</span> <span class="n">to</span> <span class="n">confirm</span> <span class="n">the</span> <span class="n">location</span>
    <span class="o">-</span><span class="n">Press</span> <span class="n">CTRL</span><span class="o">-</span><span class="n">C</span> <span class="n">to</span> <span class="n">abort</span> <span class="n">the</span> <span class="n">installation</span>
    <span class="o">-</span><span class="n">Or</span> <span class="n">specify</span> <span class="n">a</span> <span class="n">different</span> <span class="n">location</span> <span class="n">below</span>
     <span class="p">[</span><span class="o">/</span><span class="n">home</span><span class="o">/</span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="o">/</span><span class="n">repo</span><span class="p">]</span> <span class="o">&gt;&gt;&gt;</span> <span class="o">/</span><span class="n">home</span><span class="o">/</span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="o">/</span><span class="n">repo</span><span class="s2">&quot; [Press ENTER]</span>
      <span class="n">PREFIX</span><span class="o">=/</span><span class="n">home</span><span class="o">/</span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="o">/</span><span class="n">repo</span>
      <span class="n">installing</span><span class="p">:</span> <span class="n">python</span><span class="o">-</span><span class="mf">2.7</span><span class="o">.</span><span class="mi">11</span><span class="o">-</span><span class="mi">0</span>
      <span class="o">...</span>
      <span class="n">Python</span> <span class="mf">2.7</span><span class="o">.</span><span class="mi">11</span> <span class="p">::</span> <span class="n">Anaconda</span><span class="p">,</span> <span class="n">Inc</span><span class="o">.</span>
      <span class="n">creating</span> <span class="n">default</span> <span class="n">environment</span><span class="o">...</span> <span class="n">installation</span> <span class="n">finished</span><span class="o">.</span>
    </pre></div>
    </div>
    <p>At the end of the installation routine, update the anaconda-server user&#8217;s path (prepending /home/anaconda-server/repo)
    by answering yes at the prompt to add the install location to your path:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>Do you wish the installer to prepend the anaconda_repository install location to PATH in your /home/anaconda-server/.bashrc ? [yes|no]
    </pre></div>
    </div>
    <p>Type &#8220;yes&#8221; and press ENTER.</p>
    <p>For the new path changes to take effect, source your .bashrc:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">source</span> <span class="o">~/.</span><span class="n">bashrc</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="configure-anaconda-repository">
    <h2>4. Configure Anaconda Repository<a class="headerlink" href="#configure-anaconda-repository" title="Permalink to this headline">¶</a></h2>
    <p>Now initialize the web server, choose the package storage location, and create the first user.</p>
    <ol class="loweralpha">
    <li><p class="first">Initialize the web server and indicate the filepath for the package storage location:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="o">-</span><span class="n">config</span> <span class="o">--</span><span class="n">init</span>
    <span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="o">-</span><span class="n">config</span> <span class="o">--</span><span class="nb">set</span> <span class="n">fs_storage_root</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="o">/</span><span class="n">package</span><span class="o">-</span><span class="n">storage</span>
    </pre></div>
    </div>
    <p>NOTE: The location for file storage can be any location owned by the anaconda-server user that you created in step 2.</p>
    </li>
    <li><p class="first">Configure the connection to your MongoDB database:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="o">-</span><span class="n">config</span> <span class="o">--</span><span class="nb">set</span> <span class="n">MONGO_URL</span> <span class="n">mongodb</span><span class="p">:</span><span class="o">//</span><span class="n">localhost</span>
    </pre></div>
    </div>
    <p>NOTE: You may also configure an external MongoDB database. See the <a class="reference internal" href="advanced.html#connect-to-existing-mongodb-db"><span class="std std-ref">advanced installation instructions</span></a> for details.</p>
    </li>
    <li><p class="first">If you are not using LDAP or Kerberos authentication, create an initial superuser account for Anaconda Repository:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="o">-</span><span class="n">create</span><span class="o">-</span><span class="n">user</span> <span class="o">--</span><span class="n">username</span> <span class="s2">&quot;superuser&quot;</span> <span class="o">--</span><span class="n">password</span> <span class="s2">&quot;yourpassword&quot;</span> <span class="o">--</span><span class="n">email</span> <span class="s2">&quot;your@email.com&quot;</span> <span class="o">--</span><span class="n">superuser</span>
    </pre></div>
    </div>
    <p>NOTE: Replace &#8220;superuser&#8221; with a username of your choice, &#8220;yourpassword&#8221; with a password of your choice, and &#8220;<a class="reference external" href="mailto:you&#37;&#52;&#48;youremail&#46;com">you<span>&#64;</span>youremail<span>&#46;</span>com</a>&#8221; with an email address where you wish to receive system email notifications.</p>
    <p>NOTE: To ensure the bash shell does not process any of the characters in this password, limit the password to lower case letters, upper case letters and numbers, with no punctuation. After setup the password can be changed with the web interface.</p>
    </li>
    <li><p class="first">Initialize the Anaconda Repository database:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="o">-</span><span class="n">db</span><span class="o">-</span><span class="n">setup</span> <span class="o">--</span><span class="n">execute</span>
    </pre></div>
    </div>
    <p>NOTE: The above command is also run when upgrading AE-Repo. Upgrade and then run:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="o">-</span><span class="n">db</span><span class="o">-</span><span class="n">setup</span> <span class="o">--</span><span class="n">execute</span>
    </pre></div>
    </div>
    <p>Then restart the server.</p>
    <p>NOTE: More configuration options can be controlled with one or more .yaml configuration files. Anaconda Repository reads configuration files from <code class="docutils literal"><span class="pre">/etc/anaconda-server/*.yaml</span></code>, then <code class="docutils literal"><span class="pre">$PREFIX/etc/anaconda-server/*.yaml</span></code>, then from the path specified in the environment variable <code class="docutils literal"><span class="pre">ANACONDA_SERVER_CONFIG</span></code> if it is set and the command line argument <code class="docutils literal"><span class="pre">--config-file</span></code> was not used, then from the path specified in the command line argument <code class="docutils literal"><span class="pre">--config-file</span></code> if it was used. All configuration is merged, and options from files read earlier are overwritten by files read later. If there are multiple files in the same directory, they are read in alphabetical order.</p>
    </li>
    </ol>
    </div>
    <div class="section" id="set-up-automatic-restart-on-reboot-fail-or-error">
    <h2>5. Set up automatic restart on reboot, fail or error<a class="headerlink" href="#set-up-automatic-restart-on-reboot-fail-or-error" title="Permalink to this headline">¶</a></h2>
    <ol class="loweralpha">
    <li><p class="first">Run the anaconda-server-install-supervisord-config.sh script to configure supervisord management of the Anaconda server and worker processes:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="o">-</span><span class="n">install</span><span class="o">-</span><span class="n">supervisord</span><span class="o">-</span><span class="n">config</span><span class="o">.</span><span class="n">sh</span>
    </pre></div>
    </div>
    <p>This will generate the /home/anaconda-server/repo/etc/supervisord.conf file and add a crontab rule to restart supervisor after each reboot.</p>
    <p>If an error message says that the user is disallowed from using cron and could not add the crontab rule, you can add it manually with sudo. Edit the crontab file:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">crontab</span> <span class="o">-</span><span class="n">e</span> <span class="o">-</span><span class="n">u</span> <span class="n">anaconda</span><span class="o">-</span><span class="n">server</span>
    </pre></div>
    </div>
    <p>When the file is open for editing, add this entry:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="nd">@reboot</span> <span class="o">/</span><span class="n">home</span><span class="o">/</span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="o">/</span><span class="n">repo</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">supervisord</span>
    </pre></div>
    </div>
    </li>
    <li><p class="first">Verify that the server is running with:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">supervisorctl</span> <span class="n">status</span>
    </pre></div>
    </div>
    <p>If installed correctly, you see:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">binstar</span><span class="o">-</span><span class="n">server</span> <span class="n">RUNNING</span>   <span class="n">pid</span> <span class="mi">10831</span><span class="p">,</span> <span class="n">uptime</span> <span class="mi">0</span><span class="p">:</span><span class="mi">00</span><span class="p">:</span><span class="mi">05</span>
    </pre></div>
    </div>
    </li>
    <li><p class="first">View log file at:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>$PREFIX/var/log/anaconda-server/application.log
    </pre></div>
    </div>
    </li>
    </ol>
    </div>
    <div class="section" id="start-and-log-on-to-anaconda-repository">
    <h2>6. Start and log on to Anaconda Repository<a class="headerlink" href="#start-and-log-on-to-anaconda-repository" title="Permalink to this headline">¶</a></h2>
    <ol class="loweralpha">
    <li><p class="first">Open your browser and log onto Anaconda Repository by visiting <code class="docutils literal"><span class="pre">http://your.anaconda.repository:8080/</span></code> using the superuser account you created in step 4 above.</p>
    <p>NOTE: Replace &#8220;your.anaconda.repository&#8221; with the IP address or domain name of your repository.</p>
    </li>
    <li><p class="first">If you are using LDAP or Kerberos authentication, modify your user account to be a superuser. For example, if your user account is &#8220;jsmith&#8221;:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="o">-</span><span class="n">admin</span> <span class="nb">set</span><span class="o">-</span><span class="n">superuser</span> <span class="s2">&quot;jsmith&quot;</span>
    </pre></div>
    </div>
    </li>
    </ol>
    <p>NOTE: See <a class="reference internal" href="troubleshoot.html"><span class="doc">Troubleshooting your Anaconda repository installation</span></a> if you have issues starting the repo server.</p>
    </div>
    <div class="section" id="client-configuration">
    <h2>7. Client configuration<a class="headerlink" href="#client-configuration" title="Permalink to this headline">¶</a></h2>
    <p>Follow the <a class="reference internal" href="configuration.html"><span class="doc">Client configuration</span></a> instructions so you can use one or more clients to communicate with the server.</p>
    </div>
    <div class="section" id="install-anaconda-repository-license-file">
    <h2>8.  Install Anaconda Repository License file<a class="headerlink" href="#install-anaconda-repository-license-file" title="Permalink to this headline">¶</a></h2>
    <p>In your browser, go to <code class="docutils literal"><span class="pre">http://your.anaconda.repository:8080</span></code>. Follow the onscreen instructions to upload the license file that you received in an email from your sales representative.</p>
    <p>NOTE: Replace &#8220;your.anaconda.repository&#8221; with the IP address or domain name of your repository.</p>
    <p>Contact your sales representative or support representative if you cannot find or have any questions about your license.</p>
    <p>After uploading the license file, you will see the login page. Log in using the superuser user and password that you created in step 4 above.</p>
    <p>TIP: You can view the current license information and upload a new license file by visiting the URL <code class="docutils literal"><span class="pre">http://your.anaconda.repository:8080/admin/license</span></code>. NOTE: Replace &#8220;your.anaconda.repository&#8221; with the IP address or domain name of your repository.</p>
    <p>Alternate license install: Copy the license file directly into the <code class="docutils literal"><span class="pre">/home/anaconda-server/.continuum</span></code> directory.</p>
    </div>
    <div class="section" id="optional-mirror-installers-for-anaconda-and-miniconda">
    <h2>9. (Optional) Mirror installers for Anaconda and Miniconda<a class="headerlink" href="#optional-mirror-installers-for-anaconda-and-miniconda" title="Permalink to this headline">¶</a></h2>
    <p>Miniconda and Anaconda installers can be served by Anaconda Repository via the static directory located at /home/anaconda-server/repo/opt/anaconda-server/installers. To serve up the latest Miniconda installers for each platform, download them and copy them to the extras directory. The following code snippets assume <cite>/tmp</cite> exists.</p>
    <p>Define URL for miniconda installers:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">URL</span><span class="o">=</span><span class="s2">&quot;file://$INSTALLER_PATH/conda/&quot;</span>
    </pre></div>
    </div>
    <p>Note: Air gap archive only contains the latest version of both Miniconda and
    Anaconda installers.</p>
    <p>The <cite>Miniconda*latest*.sh</cite> always point to the latest Miniconda installers. Either these can be mirrored or the ones with the latest version number can be mirrored. Define the list of installers to mirror:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>versions=&quot;Miniconda2-4.3.11-Linux-x86_64.sh
              Miniconda2-4.3.11-MacOSX-x86_64.sh
              Miniconda2-4.3.11-Windows-x86.exe
              Miniconda2-4.3.11-Windows-x86_64.exe
              Miniconda3-4.3.11-Linux-x86_64.sh
              Miniconda3-4.3.11-MacOSX-x86_64.sh
              Miniconda3-4.3.11-Windows-x86.exe
              Miniconda3-4.3.11-Windows-x86_64.exe&quot;

    # miniconda installers
    mkdir -p /tmp/extras
    pushd /tmp/extras

    for installer in $versions
    do
        curl -O $URL$installer
    done
    </pre></div>
    </div>
    <p>Download anaconda installers.</p>
    <p>Similarly, define the anaconda version to mirror. For instance, to mirror version <cite>4.3</cite>:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>versions=&quot;Anaconda3-4.3.1-Linux-x86_64.sh
              Anaconda3-4.3.1-MacOSX-x86_64.pkg
              Anaconda3-4.3.1-MacOSX-x86_64.sh
              Anaconda3-4.3.1-Windows-x86.exe
              Anaconda3-4.3.1-Windows-x86_64.exe
              Anaconda2-4.3.1-Linux-x86_64.sh
              Anaconda2-4.3.1-MacOSX-x86_64.pkg
              Anaconda2-4.3.1-MacOSX-x86_64.sh
              Anaconda2-4.3.1-Windows-x86.exe
              Anaconda2-4.3.1-Windows-x86_64.exe&quot;

    # miniconda installers
    mkdir -p /tmp/extras
    pushd /tmp/extras

    for installer in $versions
    do
        curl -O $URL$installer
    done
    </pre></div>
    </div>
    <p>Copy <cite>extras</cite> folder which contains all installers that will be mirrored in the repo:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># Move installers into static directory</span>
    <span class="n">popd</span>
    <span class="n">cp</span> <span class="o">-</span><span class="n">a</span> <span class="o">/</span><span class="n">tmp</span><span class="o">/</span><span class="n">extras</span> <span class="o">/</span><span class="n">home</span><span class="o">/</span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="o">/</span><span class="n">repo</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">python2</span><span class="o">.</span><span class="mi">7</span><span class="o">/</span><span class="n">site</span><span class="o">-</span><span class="n">packages</span><span class="o">/</span><span class="n">binstar</span><span class="o">/</span><span class="n">static</span>
    </pre></div>
    </div>
    <p>Users can download the installers using curl from following URL:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># Fill in server name, port, and specific installer for your platform</span>
    <span class="n">curl</span> <span class="o">-</span><span class="n">s</span> <span class="o">-</span><span class="n">O</span> <span class="n">http</span><span class="p">:</span><span class="o">//</span><span class="n">your</span><span class="o">.</span><span class="n">anaconda</span><span class="o">.</span><span class="n">repository</span><span class="p">:</span><span class="mi">8080</span><span class="o">/</span><span class="n">static</span><span class="o">/</span><span class="n">extras</span><span class="o">/</span><span class="n">Miniconda</span><span class="o">-</span><span class="n">latest</span><span class="o">-</span><span class="n">Linux</span><span class="o">-</span><span class="n">x86_64</span><span class="o">.</span><span class="n">sh</span>
    </pre></div>
    </div>
    <p>NOTE: Replace &#8220;your.anaconda.repository&#8221; with the IP address or domain name of your repository.</p>
    </div>
    <div class="section" id="mirror-anaconda-cloud">
    <h2>10. Mirror Anaconda Cloud<a class="headerlink" href="#mirror-anaconda-cloud" title="Permalink to this headline">¶</a></h2>
    <p>The final step is to mirror the packages from a subset of channels on Anaconda Cloud to the local Anaconda Repository.
    The channels to mirror are as follows:</p>
    <table border="1" class="docutils">
    <colgroup>
    <col width="25%" />
    <col width="75%" />
    </colgroup>
    <thead valign="bottom">
    <tr class="row-odd"><th class="head">Channel</th>
    <th class="head">Description</th>
    </tr>
    </thead>
    <tbody valign="top">
    <tr class="row-even"><td>anaconda</td>
    <td>Default anaconda channel containing all packages built and
    supported by Anaconda, Inc. Also contains custom packages.</td>
    </tr>
    <tr class="row-odd"><td>r</td>
    <td>If you would like conda packages for <cite>r</cite>, mirror this channel.
    It is typically done under an <cite>r</cite> account.</td>
    </tr>
    <tr class="row-even"><td><div class="first last line-block">
    <div class="line">wakari</div>
    <div class="line">anaconda-nb-extensions</div>
    </div>
    </td>
    <td>If the local Anaconda Repository will be used by Anaconda Enterprise Notebooks
    the recommended method is to mirror these channels under the <cite>wakari</cite> account.</td>
    </tr>
    <tr class="row-odd"><td>anaconda-adam</td>
    <td>Anaconda-adam is used to manage the environments on a cluster. If you plan to
    use anaconda-scale for cluster management, mirror the anaconda-adam packages.</td>
    </tr>
    <tr class="row-even"><td>msys2</td>
    <td>msys2 is required by quite a few windows packages. See <a class="reference external" href="http://www.msys2.org/">http://www.msys2.org/</a></td>
    </tr>
    </tbody>
    </table>
    <p>The packages will be mirrored to the package store defined by the &#8220;fs_storage_root&#8221; key as described in the section &#8220;Configure Anaconda Repository&#8221; above.</p>
    <div class="section" id="mirror-anaconda">
    <h3>Mirror Anaconda<a class="headerlink" href="#mirror-anaconda" title="Permalink to this headline">¶</a></h3>
    <p>Since we&#8217;re mirroring from a local filesystem, some additional configuration is
    necessary. The steps are the same for each channel:</p>
    <ol class="arabic simple">
    <li>Create a mirror config yaml typically stored in <cite>$PREFIX/etc/anaconda-server/mirror/</cite></li>
    <li><a class="reference internal" href="mirrors-sync-configuration.html"><span class="doc">Customize configuration</span></a>. An example is
    if you only need to mirror packages for a subset of platforms. By default,
    it mirrors all packages found in the channels: linux-64, osx-64, win-64,
    win-32, linux-32.</li>
    <li>Invoke the mirror command by pointing it to the config file</li>
    </ol>
    <p>Create config:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">echo</span> <span class="s2">&quot;channels:&quot;</span> <span class="o">&gt;</span> <span class="o">~/</span><span class="n">repo</span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="o">/</span><span class="n">mirror</span><span class="o">/</span><span class="n">conda</span><span class="o">.</span><span class="n">yaml</span>
    <span class="n">echo</span> <span class="s2">&quot;  - file://$MIRRORS_ARCHIVE/anaconda-suite/pkgs&quot;</span> <span class="o">&gt;&gt;</span> \
           <span class="o">~/</span><span class="n">repo</span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="o">/</span><span class="n">mirror</span><span class="o">/</span><span class="n">conda</span><span class="o">.</span><span class="n">yaml</span>
    </pre></div>
    </div>
    <p>Mirror the default anaconda packages:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="o">-</span><span class="n">sync</span><span class="o">-</span><span class="n">conda</span> <span class="o">--</span><span class="n">mirror</span><span class="o">-</span><span class="n">config</span> <span class="o">~/</span><span class="n">repo</span><span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span><span class="o">/</span><span class="n">mirror</span><span class="o">/</span><span class="n">conda</span><span class="o">.</span><span class="n">yaml</span>
    </pre></div>
    </div>
    <p><a class="reference internal" href="mirrors-anaconda-repository.html"><span class="doc">Mirror anaconda repository</span></a> contains
    documentation and advanced yaml config for mirroring other channels.</p>
    </div>
    </div>
