Your IP : 216.73.217.64
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Installing ownCloud from the Command Line — ownCloud 10.0.1 Server Administration Manual 10.0.1 documentation</title>
<link rel="stylesheet" href="../_static/" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/main.min.css" type="text/css" />
<link rel="stylesheet" href="../_static/styles.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '10.0.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="../_static/js/jquery-fix.js"></script>
<script type="text/javascript" src="../_static/bootstrap-3.1.0/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../_static/bootstrap-sphinx.js"></script>
<link rel="top" title="ownCloud 10.0.1 Server Administration Manual 10.0.1 documentation" href="../contents.html" />
<link rel="up" title="Installation" href="index.html" />
<link rel="next" title="Changing Your ownCloud URL" href="changing_the_web_route.html" />
<link rel="prev" title="Installation Wizard" href="installation_wizard.html" />
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1'>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#1d2d44">
</head>
<body role="document">
<div class="wrap container not-front">
<div class="content row">
<main class="main">
<div class="row page-content-header">
<div class="col-md-5 col-md-offset-7">
<form class="headersearch" style="margin-bottom:-3px;" action="../search.html" method="get">
<input type="text" value="" name="q" id="q" class="form-control" />
<button class="btn btn-default" type="submit" id="searchsubmit">Search</button>
</form>
</div>
</div>
<div class="row">
<div class="col-md-3">
<div class="sidebar">
<div class="menu-support-container">
<ul id="menu-support" class="menu">
<ul>
<li><a href="../contents.html">Table of Contents</a></li>
</ul>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../index.html">Introduction</a></li>
<li class="toctree-l1"><a class="reference internal" href="../release_notes.html">Release Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../whats_new_admin.html">What’s New in ownCloud 10.0.1</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="index.html">Installation</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="system_requirements.html">System Requirements</a></li>
<li class="toctree-l2"><a class="reference internal" href="deployment_recommendations.html">ownCloud Deployment Recommendations</a></li>
<li class="toctree-l2"><a class="reference internal" href="linux_installation.html">Preferred Linux Installation Method</a></li>
<li class="toctree-l2"><a class="reference internal" href="installation_wizard.html">Installation Wizard</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="">Installing ownCloud from the Command Line</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#binlog-format-statement">BINLOG_FORMAT = STATEMENT</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="changing_the_web_route.html">Changing Your ownCloud URL</a></li>
<li class="toctree-l2"><a class="reference internal" href="apps_management_installation.html">Installing and Managing Apps</a></li>
<li class="toctree-l2"><a class="reference internal" href="apps_supported.html">Supported Apps in ownCloud</a></li>
<li class="toctree-l2"><a class="reference internal" href="source_installation.html">Manual Installation on Linux</a></li>
<li class="toctree-l2"><a class="reference internal" href="appliance_installation.html">ownCloud Community Appliance</a></li>
<li class="toctree-l2"><a class="reference internal" href="selinux_configuration.html">SELinux Configuration</a></li>
<li class="toctree-l2"><a class="reference internal" href="nginx_examples.html">NGINX Example Configurations</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="../configuration_database/index.html">Database Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="../configuration_files/index.html">File Sharing and Management</a></li>
<li class="toctree-l1"><a class="reference internal" href="../maintenance/index.html">Maintenance</a></li>
<li class="toctree-l1"><a class="reference internal" href="../configuration_mimetypes/index.html">Mimetypes Management</a></li>
<li class="toctree-l1"><a class="reference internal" href="../configuration_server/index.html">Server Configuration</a></li>
<li class="toctree-l1"><a class="reference internal" href="../configuration_user/index.html">User Management</a></li>
<li class="toctree-l1"><a class="reference internal" href="../issues/index.html">Issues and Troubleshooting</a></li>
<li class="toctree-l1"><a class="reference internal" href="../enterprise/index.html">Enterprise Features</a></li>
</ul>
</ul>
</div>
</div>
</div>
<div class="col-md-9">
<div class="page-content">
<ul class="prevnext-title list-unstyled list-inline">
<li class="prev">
<a href="installation_wizard.html" title="Previous Chapter: Installation Wizard"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm">« Installation ...</span>
</a>
</li>
<li class="next">
<a href="changing_the_web_route.html" title="Next Chapter: Changing Your ownCloud URL"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm">Changing Your... »</span>
</a>
</li>
</ul>
<div class="section" id="installing-owncloud-from-the-command-line">
<h1>Installing ownCloud from the Command Line<a class="headerlink" href="#installing-owncloud-from-the-command-line" title="Permalink to this headline">¶</a></h1>
<p>ownCloud can be installed entirely from the command line. This is convenient for
scripted operations and for systems administrators who prefer using the command
line over a GUI.</p>
<p>To install ownCloud, first <a class="reference external" href="https://owncloud.org/install/#instructions-server">download the source</a> (whether community or
enterprise) directly from ownCloud, and then unpack (decompress) the tarball
into the appropriate directory.</p>
<p>With that done, you next need to set your webserver user to be the owner of
your, unpacked, <code class="docutils literal"><span class="pre">owncloud</span></code> directory, as in the example below.:</p>
<div class="highlight-python"><div class="highlight"><pre>$ sudo chown -R www-data:www-data /var/www/owncloud/
</pre></div>
</div>
<p>With those steps completed, next use the <code class="docutils literal"><span class="pre">occ</span></code> command, from the root
directory of the ownCloud source, to perform the installation. This removes the
need to run the graphical Installation Wizard. Here’s an example of how to do
it:</p>
<div class="highlight-python"><div class="highlight"><pre># Assuming you’ve unpacked the source to /var/www/owncloud/
$ cd /var/www/owncloud/
$ sudo -u www-data php occ maintenance:install \
--database "mysql" --database-name "owncloud" \
--database-user "root" --database-pass "password" \
--admin-user "admin" --admin-pass "password"
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">You must run <code class="docutils literal"><span class="pre">occ</span></code> as your HTTP user. See <a class="reference internal" href="../configuration_server/occ_command.html#http-user-label"><span>Run occ As Your HTTP User</span></a></p>
</div>
<div class="admonition tip">
<p class="first admonition-title">Tip</p>
<p class="last">If you want to use a directory other than the default (which is <cite>data</cite> inside
the root ownCloud directory), you can also supply the <cite>–data-dir</cite> switch.
For example, if you were using the command above and you wanted the data
directory to be <cite>/opt/owncloud/data</cite>, then add <cite>–data-dir
/opt/owncloud/data</cite> to the command.</p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p>Supported databases are:</p>
<div class="last highlight-python"><div class="highlight"><pre>- SQLite3 (ownCloud Community edition only)
- MySQL (MySQL/MariaDB)
- PgSQL (PostgreSQL)
- Oracle (ownCloud Enterprise edition only)
</pre></div>
</div>
</div>
<p>See <a class="reference internal" href="../configuration_server/occ_command.html#command-line-installation-label"><span>Command Line Installation</span></a> for more information.</p>
<p>When the command completes, apply the correct permissions to your ownCloud files
and directories (see <a class="reference internal" href="installation_wizard.html#strong-perms-label"><span>Setting Strong Directory Permissions</span></a>). This is extremely important, as
it helps protect your ownCloud installation and ensure that it will operate
correctly.</p>
<div class="section" id="binlog-format-statement">
<h2>BINLOG_FORMAT = STATEMENT<a class="headerlink" href="#binlog-format-statement" title="Permalink to this headline">¶</a></h2>
<p>If your ownCloud installation fails and you see this in your ownCloud log:</p>
<div class="highlight-python"><div class="highlight"><pre>An unhandled exception has been thrown: exception ‘PDOException’ with message
'SQLSTATE[HY000]: General error: 1665 Cannot execute statement: impossible to
write to binary log since BINLOG_FORMAT = STATEMENT and at least one table
uses a storage engine limited to row-based logging. InnoDB is limited to
row-logging when transaction isolation level is READ COMMITTED or READ
UNCOMMITTED.'
</pre></div>
</div>
<p>See <a class="reference internal" href="../configuration_database/linux_database_configuration.html#db-binlog-label"><span>MySQL / MariaDB with Binary Logging Enabled</span></a>.</p>
</div>
</div>
<ul class="prevnext-title list-unstyled list-inline">
<li class="prev">
<a href="installation_wizard.html" title="Previous Chapter: Installation Wizard"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm">« Installation ...</span>
</a>
</li>
<li class="next">
<a href="changing_the_web_route.html" title="Next Chapter: Changing Your ownCloud URL"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm">Changing Your... »</span>
</a>
</li>
</ul>
</div>
</div>
</div>
</main>
</div>
</div>
</body>
</html>