Installing the AEN server (AEN 4.2.1)
=====================================

.. raw:: html

    <div class="contents local topic" id="contents">
    <ul class="simple">
    <li><a class="reference internal" href="#installing-the-bzip2-package" id="id1">Installing the bzip2 package</a></li>
    <li><a class="reference internal" href="#downloading-prerequisite-rpms" id="id2">Downloading prerequisite RPMs</a></li>
    <li><a class="reference internal" href="#installing-prerequisite-rpms" id="id3">Installing prerequisite RPMs</a></li>
    <li><a class="reference internal" href="#setting-variables-and-changing-permissions" id="id4">Setting variables and changing permissions</a></li>
    <li><a class="reference internal" href="#running-the-aen-server-installer" id="id5">Running the AEN server installer</a></li>
    <li><a class="reference internal" href="#starting-nginx-and-elasticsearch" id="id6">Starting NGINX and Elasticsearch</a></li>
    <li><a class="reference internal" href="#testing-aen-server-installation" id="id7">Testing AEN server installation</a></li>
    <li><a class="reference internal" href="#updating-your-license" id="id8">Updating your license</a></li>
    <li><a class="reference internal" href="#what-s-next" id="id9">What&#8217;s next</a></li>
    </ul>
    </div>
    <p>The AEN server is the administrative front end to the system.
    This is where users log in to the system, where user accounts are
    stored, and where admins can manage the system.</p>
    <p>Server is installed in the <code class="docutils literal"><span class="pre">/opt/wakari/wakari-server</span></code>
    directory.</p>
    <div class="section" id="installing-the-bzip2-package">
    <h2><a class="toc-backref" href="#id1">Installing the bzip2 package</a><a class="headerlink" href="#installing-the-bzip2-package" title="Permalink to this headline">¶</a></h2>
    <p>Be sure you have the <cite>bzip2</cite> package installed. If this package
    is not installed on your system, install it:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>sudo yum install bzip2
    </pre></div>
    </div>
    </div>
    <div class="section" id="downloading-prerequisite-rpms">
    <h2><a class="toc-backref" href="#id2">Downloading prerequisite RPMs</a><a class="headerlink" href="#downloading-prerequisite-rpms" title="Permalink to this headline">¶</a></h2>
    <p>To install AEN on a CentOS 6 server:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span><span class="nv">RPM_CDN</span><span class="o">=</span><span class="s2">&quot;https://820451f3d8380952ce65-4cc6343b423784e82fd202bb87cf87cf.ssl.cf1.rackcdn.com&quot;</span>
    curl -O <span class="nv">$RPM_CDN</span>/nginx-1.6.2-1.el6.ngx.x86_64.rpm
    curl -O <span class="nv">$RPM_CDN</span>/mongodb-org-tools-2.6.8-1.x86_64.rpm
    curl -O <span class="nv">$RPM_CDN</span>/mongodb-org-shell-2.6.8-1.x86_64.rpm
    curl -O <span class="nv">$RPM_CDN</span>/mongodb-org-server-2.6.8-1.x86_64.rpm
    curl -O <span class="nv">$RPM_CDN</span>/mongodb-org-mongos-2.6.8-1.x86_64.rpm
    curl -O <span class="nv">$RPM_CDN</span>/mongodb-org-2.6.8-1.x86_64.rpm
    curl -O <span class="nv">$RPM_CDN</span>/elasticsearch-1.7.2.noarch.rpm
    curl -O <span class="nv">$RPM_CDN</span>/jre-8u65-linux-x64.rpm
    </pre></div>
    </div>
    <p>To install AEN on a CentOS 7 server:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span><span class="nv">RPM_CDN</span><span class="o">=</span><span class="s2">&quot;https://820451f3d8380952ce65-4cc6343b423784e82fd202bb87cf87cf.ssl.cf1.rackcdn.com&quot;</span>
    curl -O <span class="nv">$RPM_CDN</span>/nginx-1.10.2-1.el7.ngx.x86_64.rpm
    curl -O <span class="nv">$RPM_CDN</span>/mongodb-org-tools-2.6.12-1.x86_64.rpm
    curl -O <span class="nv">$RPM_CDN</span>/mongodb-org-shell-2.6.12-1.x86_64.rpm
    curl -O <span class="nv">$RPM_CDN</span>/mongodb-org-server-2.6.12-1.x86_64.rpm
    curl -O <span class="nv">$RPM_CDN</span>/mongodb-org-mongos-2.6.12-1.x86_64.rpm
    curl -O <span class="nv">$RPM_CDN</span>/mongodb-org-2.6.12-1.x86_64.rpm
    curl -O <span class="nv">$RPM_CDN</span>/jre-8u112-linux-x64.rpm
    curl -O <span class="nv">$RPM_CDN</span>/elasticsearch-1.7.6.noarch.rpm
    </pre></div>
    </div>
    </div>
    <div class="section" id="installing-prerequisite-rpms">
    <h2><a class="toc-backref" href="#id3">Installing prerequisite RPMs</a><a class="headerlink" href="#installing-prerequisite-rpms" title="Permalink to this headline">¶</a></h2>
    <p>Run:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>sudo yum install -y *.rpm
    sudo service mongod start
    sudo chkconfig --add elasticsearch
    </pre></div>
    </div>
    </div>
    <div class="section" id="setting-variables-and-changing-permissions">
    <h2><a class="toc-backref" href="#id4">Setting variables and changing permissions</a><a class="headerlink" href="#setting-variables-and-changing-permissions" title="Permalink to this headline">¶</a></h2>
    <p>Run:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span><span class="nb">export</span> <span class="nv">AEN_SERVER</span><span class="o">=</span>&lt;FQDN HOSTNAME OR IP ADDRESS&gt; <span class="c1"># Use the real FQDN</span>
    chmod a+x aen-*.sh                <span class="c1"># Set installer to be executable</span>
    </pre></div>
    </div>
    <p>NOTE: Change &lt;FQDN HOSTNAME OR IP ADDRESS&gt; to the actual fully qualified domain
    hostname or IP address.</p>
    </div>
    <div class="section" id="running-the-aen-server-installer">
    <h2><a class="toc-backref" href="#id5">Running the AEN server installer</a><a class="headerlink" href="#running-the-aen-server-installer" title="Permalink to this headline">¶</a></h2>
    <p>Run:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>sudo -E ./aen-server-4.2.1-Linux-x86_64.sh -w <span class="nv">$AEN_SERVER</span>
    &lt;license text&gt;
    ...
    ...

    <span class="nv">PREFIX</span><span class="o">=</span>/opt/wakari/wakari-server
    Logging to /tmp/wakari_server.log
    Checking server name
    Ready <span class="k">for</span> 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


    <span class="o">===================================</span>

    Created password <span class="s1">&#39;&lt;RANDOM_PASSWORD&gt;&#39;</span> <span class="k">for</span> user <span class="s1">&#39;aen_admin&#39;</span>

    <span class="o">===================================</span>


    Starting Wakari daemons...
    installation finished.
    </pre></div>
    </div>
    <p>After successfully completing the installation script, the installer creates
    the administrator account&#8212;AEN_SRVC_ACCT user&#8212;and assigns it a password.</p>
    <p>EXAMPLE:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>Created password <span class="s1">&#39;&lt;RANDOM_PASSWORD&gt;&#39;</span> <span class="k">for</span> user <span class="s1">&#39;aen_admin&#39;</span>
    </pre></div>
    </div>
    <p>TIP: Record this password. It will be needed in the following steps. It is also
    available in the installation log file <code class="docutils literal"><span class="pre">/tmp/wakari_server.log</span></code>.</p>
    </div>
    <div class="section" id="starting-nginx-and-elasticsearch">
    <h2><a class="toc-backref" href="#id6">Starting NGINX and Elasticsearch</a><a class="headerlink" href="#starting-nginx-and-elasticsearch" title="Permalink to this headline">¶</a></h2>
    <p>When SELinux is enabled, it blocks NGINX from connecting to the socket created by
    Gunicorn. If you have SELinux enabled, run these commands 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">semanage</span> <span class="n">fcontext</span> <span class="o">-</span><span class="n">a</span> <span class="o">-</span><span class="n">t</span> <span class="n">httpd_var_run_t</span> <span class="s2">&quot;/opt/wakari/wakari-server/var/run/wakari-server.sock&quot;</span>
    <span class="n">sudo</span> <span class="n">restorecon</span> <span class="o">-</span><span class="n">r</span> <span class="o">/</span><span class="n">opt</span><span class="o">/</span><span class="n">wakari</span><span class="o">/</span><span class="n">wakari</span><span class="o">-</span><span class="n">server</span><span class="o">/</span><span class="n">var</span><span class="o">/</span><span class="n">run</span>
    </pre></div>
    </div>
    <p>To start NGINX and Elasticsearch to read the new config file:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>sudo service nginx start
    sudo service elasticsearch start
    </pre></div>
    </div>
    <p>TIP: If the AEN web page shows an NGINX 404 error, restart NGINX:</p>
    <div class="highlight-bash"><div class="highlight"><pre><span></span>sudo nginx -s stop
    sudo nginx
    </pre></div>
    </div>
    </div>
    <div class="section" id="testing-aen-server-installation">
    <h2><a class="toc-backref" href="#id7">Testing AEN server installation</a><a class="headerlink" href="#testing-aen-server-installation" title="Permalink to this headline">¶</a></h2>
    <p>Visit <a class="reference external" href="http://$AEN_SERVER">http://$AEN_SERVER</a>.</p>
    <p>The License expired page is displayed.</p>
    <div class="figure">
    <a class="reference internal image-reference" href="../../../../_images/ae-notebooks/4.2.1/aen-install-server-nolicensefound.png"><img alt="../../../../_images/ae-notebooks/4.2.1/aen-install-server-nolicensefound.png" src="../../../../_images/ae-notebooks/4.2.1/aen-install-server-nolicensefound.png" style="width: 50%;" /></a>
    </div>
    <div class="line-block">
    <div class="line"><br /></div>
    </div>
    </div>
    <div class="section" id="updating-your-license">
    <h2><a class="toc-backref" href="#id8">Updating your license</a><a class="headerlink" href="#updating-your-license" title="Permalink to this headline">¶</a></h2>
    <p>From the License expired page, follow the onscreen instructions to upload your
    license file.</p>
    <p>After your license is submitted, you will see this page:</p>
    <div class="figure">
    <a class="reference internal image-reference" href="../../../../_images/ae-notebooks/4.2.1/aen-install-server-login.png"><img alt="../../../../_images/ae-notebooks/4.2.1/aen-install-server-login.png" src="../../../../_images/ae-notebooks/4.2.1/aen-install-server-login.png" style="width: 50%;" /></a>
    </div>
    <div class="line-block">
    <div class="line"><br /></div>
    </div>
    </div>
    <div class="section" id="what-s-next">
    <h2><a class="toc-backref" href="#id9">What&#8217;s next</a><a class="headerlink" href="#what-s-next" title="Permalink to this headline">¶</a></h2>
    <p><a class="reference internal" href="install-gateway-node.html"><span class="doc">Install the AEN gateway</span></a>.</p>
    </div>
