blob: cc7f9bb554d86aa7015d633a4f36b97dec63e690 [file] [log] [blame]
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Setup &mdash; Apache AGE master documentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/custom.css" type="text/css" />
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Graphs" href="graphs.html" />
<link rel="prev" title="Overview" href="overview.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> Apache AGE
<img src="../_static/logo.png" class="logo" alt="Logo"/>
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption" role="heading"><span class="caption-text">Introduction</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="overview.html">Overview</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Setup</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#getting-age">Getting AGE</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#releases">Releases</a></li>
<li class="toctree-l3"><a class="reference internal" href="#source-code">Source code</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#pre-installation">Pre-Installation</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#centos">CentOS</a></li>
<li class="toctree-l3"><a class="reference internal" href="#fedora">Fedora</a></li>
<li class="toctree-l3"><a class="reference internal" href="#ubuntu">Ubuntu</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#installation">Installation</a></li>
<li class="toctree-l2"><a class="reference internal" href="#post-installation">Post Installation</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#per-installation-instructions">Per Installation Instructions</a></li>
<li class="toctree-l3"><a class="reference internal" href="#per-session-instructions">Per Session Instructions</a></li>
<li class="toctree-l3"><a class="reference internal" href="#optional-allow-non-superusers-to-use-apache-age">Optional: allow non-superusers to use Apache AGE</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="graphs.html">Graphs</a></li>
<li class="toctree-l1"><a class="reference internal" href="cypher.html">The AGE Cypher Query Format</a></li>
<li class="toctree-l1"><a class="reference internal" href="types.html">Data Types - An Introduction to agtype</a></li>
<li class="toctree-l1"><a class="reference internal" href="comparability.html">Comparability, Equality, Orderability and Equivalence</a></li>
<li class="toctree-l1"><a class="reference internal" href="operators.html">Operators</a></li>
<li class="toctree-l1"><a class="reference internal" href="aggregation.html">Aggregation</a></li>
<li class="toctree-l1"><a class="reference internal" href="agload.html">Importing graph from files</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Clauses</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../clauses/match.html">MATCH</a></li>
<li class="toctree-l1"><a class="reference internal" href="../clauses/with.html">WITH</a></li>
<li class="toctree-l1"><a class="reference internal" href="../clauses/return.html">RETURN</a></li>
<li class="toctree-l1"><a class="reference internal" href="../clauses/order_by.html">ORDER BY</a></li>
<li class="toctree-l1"><a class="reference internal" href="../clauses/skip.html">SKIP</a></li>
<li class="toctree-l1"><a class="reference internal" href="../clauses/limit.html">LIMIT</a></li>
<li class="toctree-l1"><a class="reference internal" href="../clauses/create.html">CREATE</a></li>
<li class="toctree-l1"><a class="reference internal" href="../clauses/delete.html">DELETE</a></li>
<li class="toctree-l1"><a class="reference internal" href="../clauses/set.html">SET</a></li>
<li class="toctree-l1"><a class="reference internal" href="../clauses/remove.html">REMOVE</a></li>
<li class="toctree-l1"><a class="reference internal" href="../clauses/merge.html">MERGE</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Functions</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../functions/predicate_functions.html">Predicate Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../functions/scalar_functions.html">Scalar Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../functions/list_functions.html">List Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../functions/numeric_functions.html">Numeric Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../functions/logarithmic_functions.html">Logarithmic Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../functions/trigonometric_functions.html">Trigonometric Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../functions/string_functions.html">String Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../functions/aggregate_functions.html">Aggregation Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../functions/user_functions.html">User defined functions</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">AGE Beyond Cypher</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../advanced/advanced_overview.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="../advanced/advanced.html">Using Cypher in a CTE Expression</a></li>
<li class="toctree-l1"><a class="reference internal" href="../advanced/advanced.html#using-cypher-in-a-join-expression">Using Cypher in a Join expression</a></li>
<li class="toctree-l1"><a class="reference internal" href="../advanced/advanced.html#cypher-in-sql-expressions">Cypher in SQL expressions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../advanced/prepared_statements.html">Prepared Statements</a></li>
<li class="toctree-l1"><a class="reference internal" href="../advanced/plpgsql.html">PL/pgSQL Functions</a></li>
<li class="toctree-l1"><a class="reference internal" href="../advanced/sql_in_cypher.html">SQL In Cypher</a></li>
</ul>
<p class="caption" role="heading"><span class="caption-text">Contributing</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../contributing/run_tests.html">Run the test suite</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">Apache AGE</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li>Setup</li>
<li class="wy-breadcrumbs-aside">
<a href="https://github.com/apache/incubator-age-website/blob/master/docs/intro/setup.md" class="fa fa-github"> Edit on GitHub</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="tex2jax_ignore mathjax_ignore section" id="setup">
<h1>Setup<a class="headerlink" href="#setup" title="Permalink to this headline"></a></h1>
<div class="section" id="getting-age">
<h2>Getting AGE<a class="headerlink" href="#getting-age" title="Permalink to this headline"></a></h2>
<div class="section" id="releases">
<h3>Releases<a class="headerlink" href="#releases" title="Permalink to this headline"></a></h3>
<p>The releases and release notes can be found at <a class="reference external" href="https://github.com/apache/incubator-age/releases">https://github.com/apache/incubator-age/releases</a></p>
</div>
<div class="section" id="source-code">
<h3>Source code<a class="headerlink" href="#source-code" title="Permalink to this headline"></a></h3>
<p>The source code can be found at <a class="reference external" href="https://github.com/apache/incubator-age">https://github.com/apache/incubator-age</a></p>
</div>
</div>
<div class="section" id="pre-installation">
<h2>Pre-Installation<a class="headerlink" href="#pre-installation" title="Permalink to this headline"></a></h2>
<p>Install the following essential libraries according to each OS.
Building AGE from source depends on the following Linux libraries (Ubuntu package names shown below):</p>
<div class="section" id="centos">
<h3>CentOS<a class="headerlink" href="#centos" title="Permalink to this headline"></a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">yum install gcc glibc glib-common readline readline-devel zlib zlib-devel flex bison</span>
</pre></div>
</div>
</div>
<div class="section" id="fedora">
<h3>Fedora<a class="headerlink" href="#fedora" title="Permalink to this headline"></a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">dnf install gcc glibc bison flex readline readline-devel zlib zlib-devel</span>
</pre></div>
</div>
</div>
<div class="section" id="ubuntu">
<h3>Ubuntu<a class="headerlink" href="#ubuntu" title="Permalink to this headline"></a></h3>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison</span>
</pre></div>
</div>
</div>
</div>
<div class="section" id="installation">
<h2>Installation<a class="headerlink" href="#installation" title="Permalink to this headline"></a></h2>
<p>The build process will attempt to use the first path in the PATH environment variable when installing AGE. If the pg_config path is located there, run the following command in the source code directory of Apache AGE to build and install the extension.</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">make install</span>
</pre></div>
</div>
<p>If the path to your Postgres installation is not in the PATH variable, add the path in the arguments:</p>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">make PG_CONFIG=/path/to/postgres/bin/pg_config install</span>
</pre></div>
</div>
</div>
<div class="section" id="post-installation">
<h2>Post Installation<a class="headerlink" href="#post-installation" title="Permalink to this headline"></a></h2>
<div class="section" id="per-installation-instructions">
<h3>Per Installation Instructions<a class="headerlink" href="#per-installation-instructions" title="Permalink to this headline"></a></h3>
<p>After the installation, run the CREATE EXTENSION command to have AGE be installed on the server.</p>
<div class="highlight-postgresql notranslate"><div class="highlight"><pre><span></span><span class="k">CREATE</span> <span class="k">EXTENSION</span> <span class="n">age</span><span class="p">;</span>
</pre></div>
</div>
</div>
<div class="section" id="per-session-instructions">
<h3>Per Session Instructions<a class="headerlink" href="#per-session-instructions" title="Permalink to this headline"></a></h3>
<div class="highlight-postgresql notranslate"><div class="highlight"><pre><span></span><span class="k">LOAD</span> <span class="s1">&#39;age&#39;</span><span class="p">;</span>
</pre></div>
</div>
<p>We recommend adding ag_catalog to your search_path to simplify your queries. The rest of this document will assume you have done so. If you do not, remember to add ‘ag_catalog’ to your cypher query function calls.</p>
<div class="highlight-postgresql notranslate"><div class="highlight"><pre><span></span><span class="k">SET</span> <span class="n">search_path</span> <span class="o">=</span> <span class="n">ag_catalog</span><span class="p">,</span> <span class="s s-Name">&quot;$user&quot;</span><span class="p">,</span> <span class="n">public</span><span class="p">;</span>
</pre></div>
</div>
</div>
<div class="section" id="optional-allow-non-superusers-to-use-apache-age">
<h3>Optional: allow non-superusers to use Apache AGE<a class="headerlink" href="#optional-allow-non-superusers-to-use-apache-age" title="Permalink to this headline"></a></h3>
<ul class="simple">
<li><p>Non-superusers can only apply LOAD to library files located in <code class="docutils literal notranslate"><span class="pre">$libdir/plugins/</span></code> (see <a class="reference external" href="https://www.postgresql.org/docs/11/sql-load.html">https://www.postgresql.org/docs/11/sql-load.html</a>). A symlink can be created to allow non-superusers to LOAD the Apache AGE library:</p></li>
</ul>
<div class="highlight-console notranslate"><div class="highlight"><pre><span></span><span class="go">sudo ln -s /usr/lib/postgresql/11/lib/age.so /usr/lib/postgresql/11/lib/plugins/age.so</span>
</pre></div>
</div>
<ul class="simple">
<li><p>In order to use Apache AGE, users need <code class="docutils literal notranslate"><span class="pre">USAGE</span></code> privileges on the <code class="docutils literal notranslate"><span class="pre">ag_catalog</span></code> schema (example for user <code class="docutils literal notranslate"><span class="pre">db_user</span></code>):</p></li>
</ul>
<div class="highlight-postgresql notranslate"><div class="highlight"><pre><span></span><span class="k">GRANT</span> <span class="n">USAGE</span> <span class="k">ON</span> <span class="k">SCHEMA</span> <span class="n">ag_catalog</span> <span class="k">TO</span> <span class="n">db_user</span><span class="p">;</span>
</pre></div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="graphs.html" class="btn btn-neutral float-right" title="Graphs" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="overview.html" class="btn btn-neutral float-left" title="Overview" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2021, Apache AGE.
</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
<span class="rst-current-version" data-toggle="rst-current-version">
<span class="fa fa-book"> Other Versions</span>
v: manual-link
<span class="fa fa-caret-down"></span>
</span>
<div class="rst-other-versions">
<dl>
<dt>Versions</dt>
<dd><a href="../../documentation-staging/index.html">documentation-staging</a></dd>
<dd><a href="setup.html">manual-link</a></dd>
<dd><a href="../../master/index.html">master</a></dd>
<dd><a href="../../v0.6.0/index.html">v0.6.0</a></dd>
</dl>
</div>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>