Permalink
Fetching contributors…
Cannot retrieve contributors at this time
109 lines (94 sloc) 4.6 KB
---
title: Install - API Umbrella
header: Install
---
<div class="container">
<h3>Minimum System Recommendations</h3>
<ul>
<li>1.5GB free memory</li>
</ul>
<h3>I want to install API Umbrella on</h3>
<div class="btn-group">
<button type="button" class="btn btn-default btn-lg dropdown-toggle" data-toggle="dropdown">
Choose an OS <span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li><a href="#docker">Docker</a></li>
<li><a href="#ubuntu1204">Ubuntu 12.04 (Precise)</a></li>
<li><a href="#ubuntu1404">Ubuntu 14.04 (Trusty)</a></li>
<li><a href="#ubuntu1604">Ubuntu 16.04 (Xenial)</a></li>
<li><a href="#debian7">Debian 7 (Wheezy)</a></li>
<li><a href="#debian8">Debian 8 (Jessie)</a></li>
<li><a href="#el6">Enterprise Linux 6 (CentOS/RedHat/Oracle/Scientific Linux)</a></li>
<li><a href="#el7">Enterprise Linux 7 (CentOS/RedHat/Oracle/Scientific Linux)</a></li>
<li><a href="#other">Other</a></li>
</ul>
</div>
<%
packages = {
"ubuntu1204" => "precise",
"ubuntu1404" => "trusty",
"ubuntu1604" => "xenial",
"debian7" => "wheezy",
"debian8" => "jessie",
"el6" => "el6",
"el7" => "el7",
}
%>
<div id="docker" class="platform-download" style="display: none;">
<p>In this simple example, custom API Umbrella configuration can be defined in the <code>config/api-umbrella.yml</code> file on host machine. This gets mounted as <code>/etc/api-umbrella/api-umbrella.yml</code> inside the container, which is the path for the configuration file the rest of the documentation will reference.</p>
<pre>$ mkdir config && touch config/api-umbrella.yml
$ docker run -d --name=api-umbrella -p 80:80 -p 443:443 -v "$(pwd)/config":/etc/api-umbrella nrel/api-umbrella</pre>
</div>
<% packages.each do |id, distro| %>
<div id="<%= id %>" class="platform-download" style="display: none;">
<p>Download and install the package:</p>
<% if(id =~ /^ubuntu/) %>
<pre>sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61
echo "deb https://dl.bintray.com/nrel/api-umbrella-ubuntu <%= distro %> main" | sudo tee /etc/apt/sources.list.d/api-umbrella.list
sudo apt-get update
sudo apt-get install api-umbrella</pre>
<% elsif(id =~ /^debian/) %>
<pre>sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61
echo "deb https://dl.bintray.com/nrel/api-umbrella-debian <%= distro %> main" | sudo tee /etc/apt/sources.list.d/api-umbrella.list
sudo apt-get update
sudo apt-get install api-umbrella</pre>
<% else %>
<pre>curl https://bintray.com/nrel/api-umbrella-<%= distro %>/rpm | sudo tee /etc/yum.repos.d/api-umbrella.repo
sudo yum install api-umbrella</pre>
<% end %>
</div>
<% end %>
<div id="other" class="platform-download" style="display: none;">
<p>We build binary packages for a variety of Linux distributions. These binary packages are the recommended way to install API Umbrella. However, if binary packages aren't available, you can also compile from source (also, please <a href="https://github.com/NREL/api-umbrella/issues">let us know</a> if you'd like to see binaries for other operating systems):</p>
<pre>$ curl -OLJ https://github.com/NREL/api-umbrella/archive/v0.14.4.tar.gz
$ tar -xvf api-umbrella-0.14.4.tar.gz
$ cd api-umbrella-0.14.4
$ make
$ sudo make install</pre>
</div>
<div id="setup_packages" class="platform-download" style="display: none;">
<pre>sudo /etc/init.d/api-umbrella start</pre>
</div>
<div id="setup_common" class="platform-download" style="display: none;">
<p>Browse to your server's hostname. You should land on the default homepage:</p>
<%= image_tag("../../images/default_homepage.png", :alt => "Default API Umbrella homepage", :class => "img-responsive img-center") %>
<p>Congrats! You're now up and running with API Umbrella. There are a variety of things you can do to start using the platform. For a quick tutorial, see <%= link_to("getting started", "/docs/getting-started.html") %>.
<p><em>Problems? Open an <a href="https://github.com/NREL/api-umbrella/issues">issue</a>.</em></p>
</div>
</div>
<script type="text/javascript">
$(".dropdown-menu li a").click(function(){
var selected = $(this).text();
$(this).parents('.btn-group').find('.dropdown-toggle').html(selected + ' <span class="caret"></span>');
var current = $(this).attr('href');
$('.platform-download').hide();
$(current).show();
if(current !== '#docker') {
$('#setup_packages').show();
}
$('#setup_common').show();
$(this).dropdown('toggle');
return false;
});
</script>