Install AEN Server (AEN 4.1.2)
==============================

.. raw:: html

    <p>The AEN Server is the administrative front-end to the Anaconda Enterprise Notebooks.
    This is where users login to the system, where user accounts are stored, and
    where admins can manage the system.</p>
    <p>These procedures assume you have already met all installation requirements
    in <a class="reference internal" href="install-prep.html"><span class="doc">Installation preparation</span></a>.</p>
    <div class="section" id="aen-server-preparation-prerequisites">
    <h2>AEN Server preparation prerequisites<a class="headerlink" href="#aen-server-preparation-prerequisites" title="Permalink to this headline">¶</a></h2>
    <div class="section" id="install-bzip2-package">
    <h3>Install bzip2 package<a class="headerlink" href="#install-bzip2-package" title="Permalink to this headline">¶</a></h3>
    <p>Make sure you have the <code class="docutils literal"><span class="pre">bzip2</span></code> package installed. If not, you can install it with:</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="n">bzip2</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="download-prerequisite-rpms">
    <h3>Download prerequisite RPMs<a class="headerlink" href="#download-prerequisite-rpms" title="Permalink to this headline">¶</a></h3>
    <p>Which Red Hat Package Management (RPM) installer files you will need depends on
    which version of CentOS or Red Hat you&#8217;re using.</p>
    <p>To install AEN on a <strong>CentOS/Red Hat 6</strong> server:</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
    curl -O $RPM_CDN/elasticsearch-1.7.2.noarch.rpm
    curl -O $RPM_CDN/jre-8u65-linux-x64.rpm
    </pre></div>
    </div>
    <p>To install AEN on a <strong>CentOS/Red Hat 7</strong> server:</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.10.2-1.el7.ngx.x86_64.rpm
    curl -O $RPM_CDN/mongodb-org-tools-2.6.12-1.x86_64.rpm
    curl -O $RPM_CDN/mongodb-org-shell-2.6.12-1.x86_64.rpm
    curl -O $RPM_CDN/mongodb-org-server-2.6.12-1.x86_64.rpm
    curl -O $RPM_CDN/mongodb-org-mongos-2.6.12-1.x86_64.rpm
    curl -O $RPM_CDN/mongodb-org-2.6.12-1.x86_64.rpm
    curl -O $RPM_CDN/elasticsearch-1.7.6.noarch.rpm
    curl -O $RPM_CDN/jre-8u112-linux-x64.rpm
    </pre></div>
    </div>
    </div>
    <div class="section" id="install-prerequisite-rpms">
    <h3>Install prerequisite RPMs<a class="headerlink" href="#install-prerequisite-rpms" title="Permalink to this headline">¶</a></h3>
    <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="o">*.</span><span class="n">rpm</span>
    <span class="n">sudo</span> <span class="n">service</span> <span class="n">mongod</span> <span class="n">start</span>
    <span class="n">sudo</span> <span class="n">chkconfig</span> <span class="o">--</span><span class="n">add</span> <span class="n">elasticsearch</span>
    </pre></div>
    </div>
    </div>
    </div>
    <div class="section" id="run-the-aen-server-installer">
    <h2>Run the AEN Server installer<a class="headerlink" href="#run-the-aen-server-installer" title="Permalink to this headline">¶</a></h2>
    <div class="section" id="set-variables-and-change-permissions">
    <h3>Set variables and change permissions<a class="headerlink" href="#set-variables-and-change-permissions" title="Permalink to this headline">¶</a></h3>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">export</span> <span class="n">AEN_SERVER</span><span class="o">=&lt;</span><span class="n">FQDN</span> <span class="n">HOSTNAME</span> <span class="n">OR</span> <span class="n">IP</span> <span class="n">ADDRESS</span><span class="o">&gt;</span> <span class="c1"># Use the real FQDN</span>
    <span class="n">chmod</span> <span class="n">a</span><span class="o">+</span><span class="n">x</span> <span class="n">aen</span><span class="o">-*.</span><span class="n">sh</span>                 <span class="c1"># Set installer to be executable</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="run-aen-server-installer">
    <h3>Run AEN Server installer<a class="headerlink" href="#run-aen-server-installer" title="Permalink to this headline">¶</a></h3>
    <div class="highlight-default"><div class="highlight"><pre><span></span>sudo -E ./aen-server-4.1.2-Linux-x86_64.sh -w $AEN_SERVER
    &lt;license text&gt;
    ...
    ...

    PREFIX=/opt/wakari/wakari-server
    Logging to /tmp/wakari_server.log
    Checking server name
    Ready for pre-install steps
    Installing miniconda
    ...
    ...
    Checking server name
    Loading config from /opt/wakari/wakari-server/etc/wakari/config.json
    Loading config from /opt/wakari/wakari-server/etc/wakari/wk-server-config.json


    ===================================

    Created password &#39;&lt;RANDOM_PASSWORD&gt;&#39; for user &#39;aen_admin&#39;

    ===================================


    Starting Wakari daemons...
    installation finished.
    </pre></div>
    </div>
    <p>As part of the installation script, the installer creates the
    administrator account (<code class="docutils literal"><span class="pre">AEN_SRVC_ACCT</span></code> user, also known as user <code class="docutils literal"><span class="pre">wakari</span></code>)
    and assigns it a password. <strong>Record this password</strong> to use in the following steps.
    It is also available in the installation log file found at
    <code class="docutils literal"><span class="pre">/tmp/wakari_server.log</span></code>. This password can be changed in the
    admin interface.</p>
    </div>
    <div class="section" id="start-nginx-and-elasticsearch">
    <h3>Start NGINX and ElasticSearch<a class="headerlink" href="#start-nginx-and-elasticsearch" title="Permalink to this headline">¶</a></h3>
    <p>When SELinux is enabled, <code class="docutils literal"><span class="pre">httpd_can_network_connect</span></code> is disabled by default,
    which prevents NGINX from connecting to Gunicorn. If you have SELinux enabled,
    run this command to correct these permissions and allow connections between
    NGINX and Gunicorn:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">setsebool</span> <span class="n">httpd_can_network_connect</span> <span class="mi">1</span> <span class="o">-</span><span class="n">P</span>
    </pre></div>
    </div>
    <p>Start <code class="docutils literal"><span class="pre">NGINX</span></code> and ElasticSearch to read the new config files:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">service</span> <span class="n">nginx</span> <span class="n">start</span>
    <span class="n">sudo</span> <span class="n">service</span> <span class="n">elasticsearch</span> <span class="n">start</span>
    </pre></div>
    </div>
    <p>TIP: If the AEN web page shows an <code class="docutils literal"><span class="pre">NGINX</span> <span class="pre">404</span></code> error, restart <code class="docutils literal"><span class="pre">NGINX</span></code>:</p>
    <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">nginx</span> <span class="o">-</span><span class="n">s</span> <span class="n">stop</span>
    <span class="n">sudo</span> <span class="n">nginx</span>
    </pre></div>
    </div>
    </div>
    <div class="section" id="test-the-aen-server-install">
    <h3>Test the AEN Server install<a class="headerlink" href="#test-the-aen-server-install" title="Permalink to this headline">¶</a></h3>
    <p>Visit <a class="reference external" href="http://$AEN_SERVER">http://$AEN_SERVER</a>. You should be shown the <strong>&#8220;No license found&#8221;</strong> page.</p>
    <img alt="../../../_images/ae-notebooks/4.1.2/install/server-nolicensefound.png" src="../../../_images/ae-notebooks/4.1.2/install/server-nolicensefound.png" />
    </div>
    <div class="section" id="update-the-license">
    <h3>Update the license<a class="headerlink" href="#update-the-license" title="Permalink to this headline">¶</a></h3>
    <p>From the <strong>&#8220;No license found&#8221;</strong> page, follow the onscreen instructions to
    upload your license file. After submitting it, you should see the login
    page.</p>
    </div>
    </div>
    <div class="section" id="next-steps">
    <h2>Next steps<a class="headerlink" href="#next-steps" title="Permalink to this headline">¶</a></h2>
    <p>See the next steps needed for full AEN install below:</p>
    <ol class="arabic simple">
    <li><a class="reference internal" href="install-gateway.html"><span class="doc">Install AEN Gateway</span></a></li>
    <li><a class="reference internal" href="install-compute.html"><span class="doc">Install AEN Compute</span></a></li>
    </ol>
    <p>The following optional install procedures may need to be performed,
    depending on how you set up your Data Center:</p>
    <ul class="simple">
    <li><a class="reference internal" href="option-config.html"><span class="doc">Optional configuration</span></a></li>
    <li><a class="reference internal" href="customization.html"><span class="doc">Sudo configuration</span></a></li>
    <li><a class="reference internal" href="ldap.html"><span class="doc">LDAP configuration</span></a></li>
    <li><a class="reference internal" href="ssl.html"><span class="doc">SSL</span></a></li>
    <li><a class="reference internal" href="sso.html"><span class="doc">Single sign on</span></a></li>
    </ul>
    <p>Additional post-install information:</p>
    <ul class="simple">
    <li><a class="reference internal" href="installation_update.html"><span class="doc">Upgrading Anaconda Enterprise Notebooks</span></a></li>
    <li><a class="reference internal" href="uninstall.html"><span class="doc">Uninstall</span></a></li>
    <li><a class="reference internal" href="release.html"><span class="doc">Release notes</span></a></li>
    </ul>
    </div>
