============================================
Install/Update/Uninstall Anaconda Repository
============================================

.. raw:: html

    <p>Full support is included with your purchase of Anaconda Repository.
    If you have any questions during installation, please contact your sales representative
    or <a class="reference external" href="http://continuum.io/support">Priority Support team</a>.</p>
    <div class="section" id="quick-links">
    <h2>Quick links<a class="headerlink" href="#quick-links" title="Permalink to this headline">¶</a></h2>
    <ul class="simple">
    <li><a class="reference internal" href="#install-anaconda-repository">Install Anaconda Repository</a></li>
    <li><a class="reference internal" href="#update-anaconda-repository">Update Anaconda Repository</a></li>
    <li><a class="reference internal" href="#uninstall-anaconda-repository">Uninstall Anaconda Repository</a></li>
    <li><a class="reference internal" href="reference.html"><span class="doc">Configuration reference</span></a></li>
    </ul>
    </div>
    <div class="section" id="install-anaconda-repository">
    <h2>Install Anaconda Repository<a class="headerlink" href="#install-anaconda-repository" title="Permalink to this headline">¶</a></h2>
    <p>Your server must meet the requirements for hardware, software, security, and network.
    Please review and verify all your <a class="reference internal" href="requirements.html"><span class="doc">Anaconda Repository requirements</span></a>
    before beginning your installation.</p>
    </div>
    <div class="section" id="install-summary">
    <h2>Install summary<a class="headerlink" href="#install-summary" title="Permalink to this headline">¶</a></h2>
    <ol class="arabic simple">
    <li>Install MongoDB 2.6</li>
    <li>Create the Anaconda Repository administrator account</li>
    <li>Install Miniconda</li>
    <li>Use Miniconda to download and install Anaconda Repository enterprise packages</li>
    <li>Configure Anaconda Repository</li>
    <li>Start and log on to Anaconda Repository</li>
    <li>Set up automatic restart on reboot, fail or error</li>
    <li>Client configuration</li>
    <li>Install Anaconda Repository license</li>
    <li>(Optional) Mirror installers for Anaconda and Miniconda</li>
    <li>(Optional) Adjust IPTables to accept requests on port 80</li>
    <li>Mirror Anaconda Cloud</li>
    </ol>
    </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>In a terminal window, create the yum repo file as the root user:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>RPM_CDN=&quot;https://820451f3d8380952ce65-4cc6343b423784e82fd202bb87cf87cf.ssl.cf1.rackcdn.com&quot;
    curl -O $RPM_CDN/nginx-1.6.2-1.el6.ngx.x86_64.rpm
    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
    </pre></div>
    </div>
    <p>NOTE: Ubuntu users use apt-get instead of yum.</p>
    <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="n">service</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><span class="n">sudo</span> <span class="n">service</span> <span class="n">mongod</span>
    <span class="n">Usage</span><span class="p">:</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">COMMAND</span>
    </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">mongod</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">mongod</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="configure-mongodb-authentication">
    <h3>Configure MongoDB authentication<a class="headerlink" href="#configure-mongodb-authentication" title="Permalink to this headline">¶</a></h3>
    <p>By default, MongoDB does not require a username or password to access or modify the database. We
    recommend enabling and configuring mandatory authentication.</p>
    <p>To do so, open a MongoDB shell:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">mongo</span>
    </pre></div>
    </div>
    <p>Anaconda Repository requires read/write access to the databases <code class="docutils literal"><span class="pre">binstar</span></code> and <code class="docutils literal"><span class="pre">binstar_mq</span></code>.
    Enter the following commands into the MongoDB shell to create an administrative user and a service user:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">use</span> <span class="n">admin</span>
    </pre></div>
    </div>
    <p>Create an administrative user to manage database users:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">db</span><span class="o">.</span><span class="n">createUser</span><span class="p">({</span><span class="n">user</span><span class="p">:</span><span class="s1">&#39;siteUserAdmin&#39;</span><span class="p">,</span> <span class="n">pwd</span><span class="p">:</span> <span class="s1">&#39;&lt;secure password #1&gt;&#39;</span><span class="p">,</span> <span class="n">roles</span><span class="p">:[</span><span class="s1">&#39;userAdminAnyDatabase&#39;</span><span class="p">]})</span>
    </pre></div>
    </div>
    <p>Authorize as that user to verify the password:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">db</span><span class="o">.</span><span class="n">auth</span><span class="p">(</span><span class="s1">&#39;siteUserAdmin&#39;</span><span class="p">,</span> <span class="s1">&#39;&lt;secure password #1&gt;&#39;</span><span class="p">)</span>
    </pre></div>
    </div>
    <p>Create a service user for Anaconda Repository:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">db</span><span class="o">.</span><span class="n">createUser</span><span class="p">({</span><span class="n">user</span><span class="p">:</span><span class="s1">&#39;anaconda&#39;</span><span class="p">,</span> <span class="n">pwd</span><span class="p">:</span> <span class="s1">&#39;&lt;secure password #2&gt;&#39;</span><span class="p">,</span> <span class="n">roles</span><span class="p">:[{</span><span class="n">db</span><span class="p">:</span><span class="s1">&#39;binstar&#39;</span><span class="p">,</span> <span class="n">role</span><span class="p">:</span><span class="s1">&#39;readWrite&#39;</span><span class="p">},</span> <span class="p">{</span><span class="n">db</span><span class="p">:</span><span class="s1">&#39;binstar_mq&#39;</span><span class="p">,</span> <span class="n">role</span><span class="p">:</span> <span class="s1">&#39;readWrite&#39;</span><span class="p">}]})</span>
    </pre></div>
    </div>
    <p>Enable mandatory authentication in MongoDB and restart for the
    configuration to take effect. If you are using the legacy MongoDB configuration format,
    add the <a class="reference external" href="https://docs.mongodb.com/v2.4/reference/configuration-options/#auth">auth</a>
    key to <code class="docutils literal"><span class="pre">/etc/mongod.conf</span></code>:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">auth</span><span class="o">=</span><span class="n">true</span>
    </pre></div>
    </div>
    <p>Otherwise, if you are using the current MongoDB configuration format, add the
    <a class="reference external" href="https://docs.mongodb.com/v2.6/reference/configuration-options/#security.authorization">security.authorization</a>
    key to <code class="docutils literal"><span class="pre">/etc/mongod.conf</span></code>:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">security</span><span class="p">:</span>
        <span class="n">authorization</span><span class="p">:</span> <span class="n">enabled</span>
    </pre></div>
    </div>
    <p>Finally, restart MongoDB to reload the configuration:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">service</span> <span class="n">mongod</span> <span class="n">restart</span>
    </pre></div>
    </div>
    <p>For additional information about MongoDB authentication and authorization see
    <a class="reference external" href="https://docs.mongodb.com/v2.6/core/authentication/">https://docs.mongodb.com/v2.6/core/authentication/</a> and
    <a class="reference external" href="https://docs.mongodb.com/v2.6/core/authorization/">https://docs.mongodb.com/v2.6/core/authorization/</a></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>Anaconda Repository was formerly known as Binstar. In a terminal window, create a new user account for Anaconda Repository named binstar, 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">binstar</span>
    </pre></div>
    </div>
    <p>The binstar 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 the following three Anaconda Repository directories:</p>
    <p>Anaconda Repository config 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">etc</span><span class="o">/</span><span class="n">binstar</span>
    </pre></div>
    </div>
    <p>Anaconda Repository logging 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">var</span><span class="o">/</span><span class="n">log</span><span class="o">/</span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span>
    </pre></div>
    </div>
    <p>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>Asssign the binstar user ownership of these directories:</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">binstar</span><span class="p">:</span><span class="n">binstar</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">binstar</span>
    <span class="n">sudo</span> <span class="n">chown</span> <span class="o">-</span><span class="n">R</span> <span class="n">binstar</span><span class="p">:</span><span class="n">binstar</span> <span class="o">/</span><span class="n">var</span><span class="o">/</span><span class="n">log</span><span class="o">/</span><span class="n">anaconda</span><span class="o">-</span><span class="n">server</span>
    <span class="n">sudo</span> <span class="n">chown</span> <span class="o">-</span><span class="n">R</span> <span class="n">binstar</span><span class="p">:</span><span class="n">binstar</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>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">binstar</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="install-miniconda">
    <h2>3. Install Miniconda<a class="headerlink" href="#install-miniconda" title="Permalink to this headline">¶</a></h2>
    <p>Miniconda gives us access to Python and the &#8216;conda&#8217; command to install Anaconda Repository.</p>
    <p>Download and install Miniconda, following the prompts in the installation routine:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">curl</span> <span class="s1">&#39;http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh&#39;</span> <span class="o">&gt;</span> <span class="n">Miniconda</span><span class="o">.</span><span class="n">sh</span>
    </pre></div>
    </div>
    <p>Run the Miniconda.sh script:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bash</span> <span class="n">Miniconda</span><span class="o">.</span><span class="n">sh</span>
    </pre></div>
    </div>
    <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">Miniconda</span> <span class="mf">3.16</span><span class="o">.</span><span class="mi">0</span> <span class="p">(</span><span class="n">by</span> <span class="n">Continuum</span> <span class="n">Analytics</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">Miniconda</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">binstar</span><span class="o">/</span><span class="n">miniconda2</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">binstar</span><span class="o">/</span><span class="n">miniconda2</span><span class="p">]</span> <span class="o">&gt;&gt;&gt;</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">binstar</span><span class="o">/</span><span class="n">miniconda2</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">10</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">10</span> <span class="p">::</span> <span class="n">Continuum</span> <span class="n">Analytics</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 binstar user&#8217;s path (prepending /home/binstar/miniconda2)
    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 Miniconda install location to PATH in your /home/binstar/.bashrc ? [yes|no]
    </pre></div>
    </div>
    <p>Type &#8220;yes&#8221; and press ENTER.</p>
    <p>For the new path changes to take effect, exit and restart your terminal session, or source your .bashrc, or start a new bash shell:</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>
    <p>OR:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">bash</span>
    </pre></div>
    </div>
    <p>Update conda:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">update</span> <span class="n">conda</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="download-and-install-anaconda-repository-enterprise-packages">
    <span id="install-ae-pkgs"></span><h2>4. Download and install Anaconda Repository enterprise packages<a class="headerlink" href="#download-and-install-anaconda-repository-enterprise-packages" title="Permalink to this headline">¶</a></h2>
    <p>Now you can use conda to install the Anaconda Repository Command Line Interface (CLI) client, which is named anaconda-client.</p>
    <p>First install anaconda-client, the CLI for Anaconda Repository:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">install</span> <span class="n">anaconda</span><span class="o">-</span><span class="n">client</span>
    </pre></div>
    </div>
    <p>Next install the Anaconda Repository channel from Anaconda Cloud. Use the &#8220;conda config&#8221; command to edit the binstar user&#8217;s ~/.condarc file to include the token-locked <a class="reference external" href="https://anaconda.org">https://anaconda.org</a> channel provided to you by Continuum:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span>export TOKEN=&quot;your Anaconda Cloud token&quot;
    conda config --add channels https://conda.anaconda.org/t/$TOKEN/binstar/
    conda config --add channels https://conda.anaconda.org/t/$TOKEN/anaconda-server/
    </pre></div>
    </div>
    <p>NOTE: If you have a subscription BUT do not have a license, contact <a class="reference external" href="http://continuum.io/support">support</a> to receive that license. Otherwise contact <a class="reference external" href="https://www.continuum.io/contact-us">sales</a> to acquire it.</p>
    <p>NOTE: Replace &#8220;your Anaconda Cloud token&#8221; with your Continuum support token that you received from Continuum Support. This adds the correct channels to conda by updating the /home/binstar/.condarc file.</p>
    <p>Finally install the Anaconda Repository Enterprise Package binstar-server via conda:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">install</span> <span class="n">binstar</span><span class="o">-</span><span class="n">server</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="configure-anaconda-repository">
    <h2>5. 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>
    </li>
    </ol>
    <p>NOTE: The location for file storage can be any location owned by the binstar user that you created in Step 4.</p>
    <ol class="loweralpha" start="2">
    <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">anaconda</span><span class="p">:</span><span class="o">&lt;</span><span class="n">secure</span> <span class="n">password</span> <span class="c1">#2&gt;@localhost</span>
    </pre></div>
    </div>
    </li>
    </ol>
    <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>
    <ol class="loweralpha" start="3">
    <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>
    </li>
    </ol>
    <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>
    <ol class="loweralpha" start="4">
    <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>
    </li>
    </ol>
    <p>NOTE: When upgrading Anaconda Repository for each future version, you will first install the new version, 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>again, and 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 may be read in any order.</p>
    </div>
    <div class="section" id="start-and-log-on-to-anaconda-server">
    <h2>6. Start and log on to Anaconda server<a class="headerlink" href="#start-and-log-on-to-anaconda-server" title="Permalink to this headline">¶</a></h2>
    <p>Now you are ready to start Anaconda Repository and then log on using your browser.</p>
    <ol class="loweralpha">
    <li><p class="first">Start the new Anaconda Repository on the Anaconda Repository port:</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">port</span> <span class="mi">8080</span>
    </pre></div>
    </div>
    </li>
    <li><p class="first">Open your browser and log onto Anaconda Repository by visiting <a class="reference external" href="http://your.anaconda.server:8080/">http://your.anaconda.server:8080/</a> using the superuser account you created in step 5 above.</p>
    </li>
    <li><p class="first">If you are using LDAP or Kerberos authentication, modify your user &#8220;jsmith&#8221; to be a superuser:</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>
    </div>
    <div class="section" id="set-up-automatic-restart-on-reboot-fail-or-error">
    <h2>7. 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>
    </li>
    <li><p class="first">Then create the following entry in the binstar user’s crontab:</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">binstar</span><span class="o">/</span><span class="n">miniconda2</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">supervisord</span>
    </pre></div>
    </div>
    </li>
    </ol>
    <p>This will generate the /home/binstar/miniconda2/etc/supervisord.conf file.</p>
    <ol class="loweralpha" start="3">
    <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>
    </li>
    </ol>
    <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>
    <span class="n">binstar</span><span class="o">-</span><span class="n">worker</span> <span class="n">RUNNING</span>   <span class="n">pid</span> <span class="mi">2784</span><span class="p">,</span> <span class="n">uptime</span> <span class="mi">1</span><span class="p">:</span><span class="mi">45</span><span class="p">:</span><span class="mi">56</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="client-configuration">
    <h2>8. 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>9.  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 <a class="reference external" href="http://your.anaconda.server:8080">http://your.anaconda.server:8080</a>. Follow the onscreen instructions to upload the license file that you received in an email from your sales representative.</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 5 above.</p>
    <p>TIP: You can view the current license information and upload a new license file by visiting the URL <a class="reference external" href="http://your.anaconda.server:8080/admin/license">http://your.anaconda.server:8080/admin/license</a>.</p>
    <p>Alternate license install: Copy the license file directly into the /home/binstar/.continuum directory.</p>
    </div>
    <div class="section" id="optional-mirror-installers-for-anaconda-and-miniconda">
    <h2>10. (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/binstar/miniconda2/lib/python2.7/site-packages/binstar/static/extras.  This is required for Anaconda Cluster integration.  To serve up the latest Miniconda installers for each platform, download them and copy them to the extras directory:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span># miniconda installers
    mkdir -p /tmp/extras
    pushd /tmp/extras
    URL=&quot;https://repo.continuum.io/miniconda/&quot;
    versions=&quot;Miniconda3-latest-Linux-x86_64.sh Miniconda3-latest-MacOSX-x86_64.sh Miniconda3-latest-Windows-x86.exe Miniconda3-latest-Windows-x86_64.exe Miniconda-latest-Linux-x86_64.sh Miniconda-latest-MacOSX-x86_64.sh Miniconda-latest-Windows-x86.exe Miniconda-latest-Windows-x86_64.exe
    &quot;
    for installer in $versions
    do
        curl -O $URL$installer
    done

    # anaconda installers
    URL=&quot;https://repo.continuum.io/archive/&quot;
    versions=&quot;Anaconda3-2.4.1-Linux-x86_64.sh Anaconda3-2.4.1-MacOSX-x86_64.pkg Anaconda3-2.4.1-MacOSX-x86_64.sh Anaconda3-2.4.1-Windows-x86.exe Anaconda3-2.4.1-Windows-x86_64.exe Anaconda2-2.4.1-Linux-x86_64.sh Anaconda2-2.4.1-MacOSX-x86_64.pkg Anaconda2-2.4.1-MacOSX-x86_64.sh Anaconda2-2.4.1-Windows-x86.exe Anaconda2-2.4.1-Windows-x86_64.exe&quot;
    for installer in $versions
    do
        curl -O $URL$installer
    done

    # Move installers into static directory
    popd
    cp -a /tmp/extras /home/binstar/miniconda2/lib/python2.7/site-packages/binstar/static
    </pre></div>
    </div>
    <p>Users can download the installers by using curl:</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">//&lt;</span><span class="n">your</span> <span class="n">server</span><span class="o">&gt;</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>
    </div>
    <div class="section" id="optional-adjust-iptables-to-accept-requests-on-port-80">
    <h2>11. (Optional) Adjust IPTables to accept requests on port 80<a class="headerlink" href="#optional-adjust-iptables-to-accept-requests-on-port-80" title="Permalink to this headline">¶</a></h2>
    <p>Enable clients to access an Anaconda Repository on standard ports by configuring the server to redirect traffic received on standard HTTP port 80 to the standard Anaconda Repository HTTP port 8080.</p>
    <p>NOTE: These commands assume the default state of IPTables which is &#8220;on&#8221; and allowing inbound SSH access on port 22. This is the factory default state for CentOS 6.7. If this default has been changed you can reset it as follows:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">iptables</span> <span class="o">-</span><span class="n">L</span>
    </pre></div>
    </div>
    <p>CAUTION: Mistakes with IPTables rules can render a remote machine inaccessible.</p>
    <ol class="loweralpha">
    <li><p class="first">Allow inbound access to tcp port 80:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">iptables</span> <span class="o">-</span><span class="n">I</span> <span class="n">INPUT</span> <span class="o">-</span><span class="n">i</span> <span class="n">eth0</span> <span class="o">-</span><span class="n">p</span> <span class="n">tcp</span> <span class="o">--</span><span class="n">dport</span> <span class="mi">80</span> <span class="o">-</span><span class="n">m</span> <span class="n">comment</span> <span class="o">--</span><span class="n">comment</span> <span class="s2">&quot;# Anaconda Server #&quot;</span> <span class="o">-</span><span class="n">j</span> <span class="n">ACCEPT</span>
    </pre></div>
    </div>
    </li>
    <li><p class="first">Allow inbound access to tcp port 8080:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">iptables</span> <span class="o">-</span><span class="n">I</span> <span class="n">INPUT</span> <span class="o">-</span><span class="n">i</span> <span class="n">eth0</span> <span class="o">-</span><span class="n">p</span> <span class="n">tcp</span> <span class="o">--</span><span class="n">dport</span> <span class="mi">8080</span> <span class="o">-</span><span class="n">m</span> <span class="n">comment</span> <span class="o">--</span><span class="n">comment</span> <span class="s2">&quot;# Anaconda Server #&quot;</span> <span class="o">-</span><span class="n">j</span> <span class="n">ACCEPT</span>
    </pre></div>
    </div>
    </li>
    <li><p class="first">Redirect inbound requests to port 80 to port 8080:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">iptables</span> <span class="o">-</span><span class="n">A</span> <span class="n">PREROUTING</span> <span class="o">-</span><span class="n">t</span> <span class="n">nat</span> <span class="o">-</span><span class="n">i</span> <span class="n">eth0</span> <span class="o">-</span><span class="n">p</span> <span class="n">tcp</span> <span class="o">--</span><span class="n">dport</span> <span class="mi">80</span> <span class="o">-</span><span class="n">m</span> <span class="n">comment</span> <span class="o">--</span><span class="n">comment</span> <span class="s2">&quot;# Anaconda Server #&quot;</span> <span class="o">-</span><span class="n">j</span> <span class="n">REDIRECT</span> <span class="o">--</span><span class="n">to</span><span class="o">-</span><span class="n">port</span> <span class="mi">8080</span>
    </pre></div>
    </div>
    </li>
    <li><p class="first">Display the current iptables rules:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">iptables</span> <span class="o">-</span><span class="n">L</span> <span class="o">-</span><span class="n">n</span>
    <span class="n">Chain</span> <span class="n">INPUT</span> <span class="p">(</span><span class="n">policy</span> <span class="n">ACCEPT</span><span class="p">)</span>
    <span class="n">target</span>     <span class="n">prot</span> <span class="n">opt</span> <span class="n">source</span>               <span class="n">destination</span>
    <span class="n">ACCEPT</span>     <span class="n">tcp</span>  <span class="o">--</span>  <span class="mf">0.0</span><span class="o">.</span><span class="mf">0.0</span><span class="o">/</span><span class="mi">0</span>            <span class="mf">0.0</span><span class="o">.</span><span class="mf">0.0</span><span class="o">/</span><span class="mi">0</span>           <span class="n">tcp</span> <span class="n">dpt</span><span class="p">:</span><span class="mi">8080</span> <span class="o">/*</span> <span class="c1"># Anaconda Server # */</span>
    <span class="n">ACCEPT</span>     <span class="n">tcp</span>  <span class="o">--</span>  <span class="mf">0.0</span><span class="o">.</span><span class="mf">0.0</span><span class="o">/</span><span class="mi">0</span>            <span class="mf">0.0</span><span class="o">.</span><span class="mf">0.0</span><span class="o">/</span><span class="mi">0</span>           <span class="n">tcp</span> <span class="n">dpt</span><span class="p">:</span><span class="mi">80</span> <span class="o">/*</span> <span class="c1"># Anaconda Server # */</span>
    <span class="n">ACCEPT</span>     <span class="nb">all</span>  <span class="o">--</span>  <span class="mf">0.0</span><span class="o">.</span><span class="mf">0.0</span><span class="o">/</span><span class="mi">0</span>            <span class="mf">0.0</span><span class="o">.</span><span class="mf">0.0</span><span class="o">/</span><span class="mi">0</span>           <span class="n">state</span> <span class="n">RELATED</span><span class="p">,</span><span class="n">ESTABLISHED</span>
    <span class="n">ACCEPT</span>     <span class="n">icmp</span> <span class="o">--</span>  <span class="mf">0.0</span><span class="o">.</span><span class="mf">0.0</span><span class="o">/</span><span class="mi">0</span>            <span class="mf">0.0</span><span class="o">.</span><span class="mf">0.0</span><span class="o">/</span><span class="mi">0</span>
    <span class="n">ACCEPT</span>     <span class="nb">all</span>  <span class="o">--</span>  <span class="mf">0.0</span><span class="o">.</span><span class="mf">0.0</span><span class="o">/</span><span class="mi">0</span>            <span class="mf">0.0</span><span class="o">.</span><span class="mf">0.0</span><span class="o">/</span><span class="mi">0</span>
    <span class="n">ACCEPT</span>     <span class="n">tcp</span>  <span class="o">--</span>  <span class="mf">0.0</span><span class="o">.</span><span class="mf">0.0</span><span class="o">/</span><span class="mi">0</span>            <span class="mf">0.0</span><span class="o">.</span><span class="mf">0.0</span><span class="o">/</span><span class="mi">0</span>           <span class="n">state</span> <span class="n">NEW</span> <span class="n">tcp</span> <span class="n">dpt</span><span class="p">:</span><span class="mi">22</span>
    <span class="n">REJECT</span>     <span class="nb">all</span>  <span class="o">--</span>  <span class="mf">0.0</span><span class="o">.</span><span class="mf">0.0</span><span class="o">/</span><span class="mi">0</span>            <span class="mf">0.0</span><span class="o">.</span><span class="mf">0.0</span><span class="o">/</span><span class="mi">0</span>           <span class="n">reject</span><span class="o">-</span><span class="k">with</span> <span class="n">icmp</span><span class="o">-</span><span class="n">host</span><span class="o">-</span><span class="n">prohibited</span>

    <span class="n">Chain</span> <span class="n">FORWARD</span> <span class="p">(</span><span class="n">policy</span> <span class="n">ACCEPT</span><span class="p">)</span>
    <span class="n">target</span>     <span class="n">prot</span> <span class="n">opt</span> <span class="n">source</span>               <span class="n">destination</span>
    <span class="n">REJECT</span>     <span class="nb">all</span>  <span class="o">--</span>  <span class="mf">0.0</span><span class="o">.</span><span class="mf">0.0</span><span class="o">/</span><span class="mi">0</span>            <span class="mf">0.0</span><span class="o">.</span><span class="mf">0.0</span><span class="o">/</span><span class="mi">0</span>           <span class="n">reject</span><span class="o">-</span><span class="k">with</span> <span class="n">icmp</span><span class="o">-</span><span class="n">host</span><span class="o">-</span><span class="n">prohibited</span>

    <span class="n">Chain</span> <span class="n">OUTPUT</span> <span class="p">(</span><span class="n">policy</span> <span class="n">ACCEPT</span><span class="p">)</span>
    <span class="n">target</span>     <span class="n">prot</span> <span class="n">opt</span> <span class="n">source</span>               <span class="n">destination</span>
    </pre></div>
    </div>
    </li>
    </ol>
    <p>NOTE: the PREROUTING (nat) IPTables chain is not displayed by default. To show it, use:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">iptables</span> <span class="o">-</span><span class="n">L</span> <span class="o">-</span><span class="n">n</span> <span class="o">-</span><span class="n">t</span> <span class="n">nat</span>
    <span class="n">Chain</span> <span class="n">PREROUTING</span> <span class="p">(</span><span class="n">policy</span> <span class="n">ACCEPT</span><span class="p">)</span>
    <span class="n">target</span>     <span class="n">prot</span> <span class="n">opt</span> <span class="n">source</span>               <span class="n">destination</span>
    <span class="n">REDIRECT</span>   <span class="n">tcp</span>  <span class="o">--</span>  <span class="mf">0.0</span><span class="o">.</span><span class="mf">0.0</span><span class="o">/</span><span class="mi">0</span>            <span class="mf">0.0</span><span class="o">.</span><span class="mf">0.0</span><span class="o">/</span><span class="mi">0</span>           <span class="n">tcp</span> <span class="n">dpt</span><span class="p">:</span><span class="mi">80</span> <span class="o">/*</span> <span class="c1"># Anaconda Server # */ redir ports 8080</span>

    <span class="n">Chain</span> <span class="n">POSTROUTING</span> <span class="p">(</span><span class="n">policy</span> <span class="n">ACCEPT</span><span class="p">)</span>
    <span class="n">target</span>     <span class="n">prot</span> <span class="n">opt</span> <span class="n">source</span>               <span class="n">destination</span>

    <span class="n">Chain</span> <span class="n">OUTPUT</span> <span class="p">(</span><span class="n">policy</span> <span class="n">ACCEPT</span><span class="p">)</span>
    <span class="n">target</span>     <span class="n">prot</span> <span class="n">opt</span> <span class="n">source</span>               <span class="n">destination</span>
    </pre></div>
    </div>
    <ol class="loweralpha" start="5">
    <li><p class="first">Save the running iptables configuration to /etc/sysconfig/iptables:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">service</span> <span class="n">iptables</span> <span class="n">save</span>
    </pre></div>
    </div>
    </li>
    </ol>
    </div>
    <div class="section" id="mirror-anaconda-cloud">
    <h2>12. Mirror Anaconda Cloud<a class="headerlink" href="#mirror-anaconda-cloud" title="Permalink to this headline">¶</a></h2>
    <p>Packages can be mirrored from Anaconda Cloud to the local Anaconda Repository via one of two methods: direct download, or via USB drive provided by Continuum Analytics. This document describes the direct download method. Separate instructions are included with a USB drive.</p>
    <p>Install the CAS-Mirror package, which is required to create the mirror:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">install</span> <span class="n">cas</span><span class="o">-</span><span class="n">mirror</span>
    </pre></div>
    </div>
    <p>Mirror the Anaconda Cloud 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">sync</span><span class="o">-</span><span class="n">conda</span>
    </pre></div>
    </div>
    <p>This command will mirror the anaconda.org repository to the /opt/anaconda-server/package-storage directory.</p>
    <p>NOTE: Due to the size of the Anaconda Cloud repo and depending on the available Internet bandwidth, the mirror process can take hours.</p>
    </div>
    <div class="section" id="update-anaconda-repository">
    <span id="repo-update"></span><h2>Update Anaconda Repository<a class="headerlink" href="#update-anaconda-repository" title="Permalink to this headline">¶</a></h2>
    <p>IMPORTANT: You must have a tested backup of your installation before starting the update process.</p>
    <p>Administrators can update to the latest Anaconda Repository release via the following commands:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">update</span> <span class="n">binstar</span><span class="o">-</span><span class="n">server</span> <span class="n">binstar</span><span class="o">-</span><span class="n">static</span> <span class="n">anaconda</span><span class="o">-</span><span class="n">client</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>
    <span class="n">supervisorctl</span> <span class="n">stop</span> <span class="nb">all</span>
    <span class="n">supervisorctl</span> <span class="n">reload</span>
    <span class="n">supervisorctl</span> <span class="n">start</span> <span class="nb">all</span>
    </pre></div>
    </div>
    <p>Please contact your Priority Support provider or sales person if you have any questions or
    problems regarding the update.</p>
    </div>
    <div class="section" id="uninstall-anaconda-repository">
    <h2>Uninstall Anaconda Repository<a class="headerlink" href="#uninstall-anaconda-repository" title="Permalink to this headline">¶</a></h2>
    <p>Before deleting you may want to make a backup for security reasons.
    Refer to this site for suggestions on mongo backups: <a class="reference external" href="https://docs.mongodb.org/manual/reference/program/mongodump/">https://docs.mongodb.org/manual/reference/program/mongodump/</a></p>
    <p>To delete Anaconda Repository, do the following:</p>
    <ol class="arabic">
    <li><p class="first">Check the file storage path by running the following command:</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">get</span> <span class="n">fs_storage_root</span>
    </pre></div>
    </div>
    </li>
    <li><p class="first">We recommend that you remove miniconda: <code class="docutils literal"><span class="pre">rm</span> <span class="pre">-rf</span> <span class="pre">/home/binstar/miniconda2</span></code></p>
    <p>If you choose not to remove miniconda, remove the following conda packages:</p>
    <ul class="simple">
    <li>binstar-server</li>
    <li>cas-mirror</li>
    <li>cas-installer</li>
    </ul>
    </li>
    <li><p class="first">Delete the appropriate MongoDB database.</p>
    </li>
    <li><p class="first">Delete the contents of /etc/binstar: <code class="docutils literal"><span class="pre">rm</span> <span class="pre">-rf</span> <span class="pre">/etc/binstar</span></code></p>
    </li>
    <li><p class="first">Delete the contents of the Anaconda Repository file storage path.</p>
    </li>
    </ol>
    </div>
    <div class="section" id="for-additional-help">
    <h2>For additional help<a class="headerlink" href="#for-additional-help" title="Permalink to this headline">¶</a></h2>
    <p>Your organization receives <a class="reference external" href="http://continuum.io/support">priority support</a> with your purchase of Anaconda Repository. Please email support at the email address given to you by your sales representative.</p>
    </div>
    <div class="section" id="advanced-topics">
    <h2>Advanced topics<a class="headerlink" href="#advanced-topics" title="Permalink to this headline">¶</a></h2>
    <div class="toctree-wrapper compound">
    <ul>
    <li class="toctree-l1"><a class="reference internal" href="advanced.html">Advanced Installation Options</a></li>
    <li class="toctree-l1"><a class="reference internal" href="troubleshoot.html">Troubleshooting your Anaconda repository installation</a></li>
    <li class="toctree-l1"><a class="reference internal" href="maintenance.html">Maintenance and configuration concerns</a></li>
    <li class="toctree-l1"><a class="reference internal" href="user-administration.html">User administration</a></li>
    <li class="toctree-l1"><a class="reference internal" href="configuration.html">Client configuration</a></li>
    <li class="toctree-l1"><a class="reference internal" href="mirrors.html">Adding a PyPI or Anaconda Mirror</a></li>
    <li class="toctree-l1"><a class="reference internal" href="recommended-workflow.html">Recommended Workflow</a></li>
    </ul>
    </div>
    <div class="toctree-wrapper compound">
    </div>
    </div>
    <div class="section" id="did-you-find-what-you-needed-on-this-page">
    <h2>Did you find what you needed on this page?<a class="headerlink" href="#did-you-find-what-you-needed-on-this-page" title="Permalink to this headline">¶</a></h2>
    <p>Please <a class="reference external" href="https://github.com/Anaconda-Platform/support/issues">let us know</a>.</p>
    </div>

.. toctree::
    :hidden:

    advanced
    troubleshoot
    maintenance
    user-administration
    requirements
    configuration
