Your IP : 216.73.217.64


Current Path : /home3/gp97/cloud.97gp.net/core/doc/admin/installation/
Upload File :
Current File : //home3/gp97/cloud.97gp.net/core/doc/admin/installation/source_installation.html

<!DOCTYPE html>


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>Manual Installation on Linux &mdash; 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="ownCloud Community Appliance" href="appliance_installation.html" />
    <link rel="prev" title="Supported Apps in ownCloud" href="apps_supported.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&#8217;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"><a class="reference internal" href="command_line_installation.html">Installing ownCloud from the Command Line</a></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 current"><a class="current reference internal" href="">Manual Installation on Linux</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#prerequisites">Prerequisites</a></li>
<li class="toctree-l3"><a class="reference internal" href="#mysql-mariadb-require-innodb">MySQL/MariaDB Require InnoDB</a></li>
<li class="toctree-l3"><a class="reference internal" href="#example-installation-on-ubuntu-16-04-lts-server">Example Installation on Ubuntu 16.04 LTS Server</a></li>
<li class="toctree-l3"><a class="reference internal" href="#example-installation-on-ubuntu-14-04-lts-server">Example Installation on Ubuntu 14.04 LTS Server</a></li>
<li class="toctree-l3"><a class="reference internal" href="#binlog-format-statement">BINLOG_FORMAT = STATEMENT</a></li>
<li class="toctree-l3"><a class="reference internal" href="#apache-web-server-configuration">Apache Web Server Configuration</a></li>
<li class="toctree-l3"><a class="reference internal" href="#enabling-ssl">Enabling SSL</a></li>
<li class="toctree-l3"><a class="reference internal" href="#installation-wizard">Installation Wizard</a></li>
<li class="toctree-l3"><a class="reference internal" href="#setting-strong-directory-permissions">Setting Strong Directory Permissions</a></li>
<li class="toctree-l3"><a class="reference internal" href="#selinux-configuration-tips">SELinux Configuration Tips</a></li>
<li class="toctree-l3"><a class="reference internal" href="#php-ini-configuration-notes">php.ini Configuration Notes</a></li>
<li class="toctree-l3"><a class="reference internal" href="#php-fpm-configuration-notes">php-fpm Configuration Notes</a></li>
<li class="toctree-l3"><a class="reference internal" href="#other-web-servers">Other Web Servers</a></li>
</ul>
</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="apps_supported.html" title="Previous Chapter: Supported Apps in ownCloud"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm">&laquo; Supported App...</span>
    </a>
  </li>
  <li class="next">
    <a href="appliance_installation.html" title="Next Chapter: ownCloud Community Appliance"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm">ownCloud Comm... &raquo;</span>
    </a>
  </li>
</ul>
						
  <div class="section" id="manual-installation-on-linux">
<h1>Manual Installation on Linux<a class="headerlink" href="#manual-installation-on-linux" title="Permalink to this headline">¶</a></h1>
<p>Installing ownCloud on Linux from our Open Build Service packages is the
preferred method (see <a class="reference internal" href="linux_installation.html"><em>Preferred Linux Installation Method</em></a>). These are maintained by
ownCloud engineers, and you can use your package manager to keep your ownCloud
server up-to-date.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Enterprise customers should refer to
<code class="xref doc docutils literal"><span class="pre">../enterprise_installation/linux_installation</span></code></p>
</div>
<p>If there are no packages for your Linux distribution, or you prefer installing
from the source tarball, you can setup ownCloud from scratch using a classic
LAMP stack (Linux, Apache, MySQL/MariaDB, PHP). This document provides
a complete walk-through for installing ownCloud on Ubuntu 14.04 LTS Server with
Apache and MariaDB, using <a class="reference external" href="https://owncloud.org/install/">the ownCloud .tar archive</a>.</p>
<ul class="simple">
<li><a class="reference internal" href="#prerequisites-label"><span>Prerequisites</span></a></li>
<li><a class="reference internal" href="#ubuntu-installation-label"><span>Example Installation on Ubuntu 16.04 LTS Server</span></a></li>
<li><a class="reference internal" href="#binlog-format-label"><span>BINLOG_FORMAT = STATEMENT</span></a></li>
<li><a class="reference internal" href="#apache-configuration-label"><span>Apache Web Server Configuration</span></a></li>
<li><a class="reference internal" href="#enabling-ssl-label"><span>Enabling SSL</span></a></li>
<li><a class="reference internal" href="#installation-wizard-label"><span>Installation Wizard</span></a></li>
<li><a class="reference internal" href="installation_wizard.html#strong-perms-label"><span>Setting Strong Directory Permissions</span></a></li>
<li><a class="reference internal" href="#selinux-tips-label"><span>SELinux Configuration Tips</span></a></li>
<li><a class="reference internal" href="#php-ini-tips-label"><span>php.ini Configuration Notes</span></a></li>
<li><a class="reference internal" href="#php-fpm-tips-label"><span>php-fpm Configuration Notes</span></a></li>
<li><span class="xref std std-ref">other_HTTP_servers_label</span></li>
</ul>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Admins of SELinux-enabled distributions such as CentOS, Fedora, and
Red Hat Enterprise Linux may need to set new rules to enable installing
ownCloud. See <a class="reference internal" href="#selinux-tips-label"><span>SELinux Configuration Tips</span></a> for a suggested configuration.</p>
</div>
<div class="section" id="prerequisites">
<span id="prerequisites-label"></span><h2>Prerequisites<a class="headerlink" href="#prerequisites" title="Permalink to this headline">¶</a></h2>
<p>The ownCloud tar archive contains all of the required third-party PHP
libraries. As a result, no extra ones are required. However, ownCloud does
require that PHP has a set of extensions installed, enabled, and configured.</p>
<p>This section lists both the required and optional PHP extensions. If you need
further information about a particular extension, please consult the relevant
section of <a class="reference external" href="http://php.net/manual/en/extensions.php">the extensions section of the PHP manual</a>.</p>
<p>If you are using a Linux distribution it should have packages for all the
required extensions. You can check the presence of a module by typing <code class="docutils literal"><span class="pre">php</span> <span class="pre">-m</span>
<span class="pre">|</span> <span class="pre">grep</span> <span class="pre">-i</span> <span class="pre">&lt;module_name&gt;</span></code>. If you get a result, the module is present.</p>
<div class="section" id="required">
<h3>Required<a class="headerlink" href="#required" title="Permalink to this headline">¶</a></h3>
<p>PHP &gt;= 5.6</p>
<div class="section" id="extensions">
<h4>Extensions<a class="headerlink" href="#extensions" title="Permalink to this headline">¶</a></h4>
<table border="1" class="docutils">
<colgroup>
<col width="24%" />
<col width="76%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Name</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference external" href="https://secure.php.net/manual/en/book.ctype.php">Ctype</a></td>
<td>For character type checking</td>
</tr>
<tr class="row-odd"><td><a class="reference external" href="https://php.net/manual/en/book.curl.php">cURL</a></td>
<td>Used for aspects of HTTP user authentication</td>
</tr>
<tr class="row-even"><td><a class="reference external" href="https://secure.php.net/manual/en/book.dom.php">DOM</a></td>
<td>For operating on XML documents through the DOM API</td>
</tr>
<tr class="row-odd"><td><a class="reference external" href="https://php.net/manual/en/book.image.php">GD</a></td>
<td>For creating and manipulating image files in a variety of
different image formats, including GIF, PNG, JPEG, WBMP,
and XPM.</td>
</tr>
<tr class="row-even"><td>HASH Message</td>
<td>For working with message digests (hash).</td>
</tr>
<tr class="row-odd"><td>Digest Framework</td>
<td>&nbsp;</td>
</tr>
<tr class="row-even"><td><a class="reference external" href="https://php.net/manual/en/book.iconv.php">iconv</a></td>
<td>For working with the iconv character set conversion
facility.</td>
</tr>
<tr class="row-odd"><td><a class="reference external" href="https://php.net/manual/en/book.json.php">JSON</a></td>
<td>For working with the JSON data-interchange format.</td>
</tr>
<tr class="row-even"><td><a class="reference external" href="https://php.net/manual/en/book.libxml.php">libxml</a></td>
<td>This is required for the _DOM_, _libxml_, _SimpleXML_, and
_XMLWriter_ extensions to work. It requires that libxml2,
version 2.7.0 or higher, is installed.</td>
</tr>
<tr class="row-odd"><td><a class="reference external" href="https://php.net/manual/en/book.mbstring.php">Multibyte String</a></td>
<td>For working with multibyte character encoding schemes.</td>
</tr>
<tr class="row-even"><td><a class="reference external" href="https://secure.php.net/manual/en/book.pdo.php">PDO</a></td>
<td>This is required for the pdo_msql function to work.</td>
</tr>
<tr class="row-odd"><td><a class="reference external" href="https://php.net/manual/en/book.posix.php">POSIX</a></td>
<td>For working with UNIX POSIX functionality.</td>
</tr>
<tr class="row-even"><td><a class="reference external" href="https://php.net/manual/en/book.simplexml.php">SimpleXML</a></td>
<td>For working with XML files as objects.</td>
</tr>
<tr class="row-odd"><td><a class="reference external" href="https://php.net/manual/en/book.xmlwriter.php">XMLWriter</a></td>
<td>For generating streams or files of XML data.</td>
</tr>
<tr class="row-even"><td><a class="reference external" href="https://php.net/manual/en/book.zip.php">Zip</a></td>
<td>For reading and writing ZIP compressed archives and the
files inside them.</td>
</tr>
<tr class="row-odd"><td><a class="reference external" href="https://php.net/manual/en/book.zlib.php">Zlib</a></td>
<td>For reading and writing gzip (.gz) compressed files.</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="database-connectors">
<h4>Database Connectors<a class="headerlink" href="#database-connectors" title="Permalink to this headline">¶</a></h4>
<table border="1" class="docutils">
<colgroup>
<col width="15%" />
<col width="85%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Name</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference external" href="https://secure.php.net/manual/en/ref.pdo-mysql.php">pdo_mysql</a></td>
<td>For working with MySQL &amp; MariaDB.</td>
</tr>
<tr class="row-odd"><td><a class="reference external" href="https://secure.php.net/manual/en/ref.pgsql.php">pgsql</a></td>
<td>For working with PostgreSQL. It requires PostgreSQL 9.0 or above.</td>
</tr>
<tr class="row-even"><td><a class="reference external" href="https://secure.php.net/manual/en/ref.sqlite.php">sqlite</a></td>
<td>For working with SQLite. It requires SQLite 3 or above. This is,
usually, not recommended, for performance reasons.</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="required-for-specific-apps">
<h3>Required For Specific Apps<a class="headerlink" href="#required-for-specific-apps" title="Permalink to this headline">¶</a></h3>
<table border="1" class="docutils">
<colgroup>
<col width="15%" />
<col width="85%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Name</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference external" href="https://secure.php.net/manual/en/book.ftp.php">ftp</a></td>
<td>For working with FTP storage</td>
</tr>
<tr class="row-odd"><td><a class="reference external" href="https://secure.php.net/manual/de/book.ssh2.php">sftp</a></td>
<td>For working with SFTP storage</td>
</tr>
<tr class="row-even"><td><a class="reference external" href="https://secure.php.net/manual/en/book.imap.php">imap</a></td>
<td>For IMAP integration</td>
</tr>
<tr class="row-odd"><td><a class="reference external" href="https://secure.php.net/manual/en/book.ldap.php">ldap</a></td>
<td>For LDAP integration</td>
</tr>
<tr class="row-even"><td><a class="reference external" href="https://pecl.php.net/package/smbclient">smbclient</a></td>
<td>For SMB/CIFS integration</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">SMB/Windows Network Drive mounts require the PHP module smbclient version 0.8.0+; see
<a class="reference internal" href="../configuration_files/external_storage/smb.html"><em>SMB/CIFS</em></a>.</p>
</div>
</div>
<div class="section" id="optional">
<h3>Optional<a class="headerlink" href="#optional" title="Permalink to this headline">¶</a></h3>
<table border="1" class="docutils">
<colgroup>
<col width="14%" />
<col width="86%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Extension</th>
<th class="head">Reason</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference external" href="https://php.net/manual/en/book.bzip2.php">Bzip2</a></td>
<td>Required for extraction of applications</td>
</tr>
<tr class="row-odd"><td><a class="reference external" href="https://php.net/manual/en/book.fileinfo.php">Fileinfo</a></td>
<td>Highly recommended, as it enhances file analysis performance</td>
</tr>
<tr class="row-even"><td><a class="reference external" href="https://php.net/manual/en/book.intl.php">intl</a></td>
<td>Increases language translation performance and fixes sorting of
non-ASCII characters</td>
</tr>
<tr class="row-odd"><td><a class="reference external" href="https://php.net/manual/en/book.mcrypt.php">Mcrypt</a></td>
<td>Increases file encryption performance</td>
</tr>
<tr class="row-even"><td><a class="reference external" href="https://php.net/manual/en/book.openssl.php">OpenSSL</a></td>
<td>Required for accessing HTTPS resources</td>
</tr>
<tr class="row-odd"><td><a class="reference external" href="https://secure.php.net/manual/en/book.imagick.php">imagick</a></td>
<td>Required for creating and modifying images and preview thumbnails</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="recommended">
<h3>Recommended<a class="headerlink" href="#recommended" title="Permalink to this headline">¶</a></h3>
<div class="section" id="for-specific-apps">
<h4>For Specific Apps<a class="headerlink" href="#for-specific-apps" title="Permalink to this headline">¶</a></h4>
<table border="1" class="docutils">
<colgroup>
<col width="12%" />
<col width="88%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Extension</th>
<th class="head">Reason</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference external" href="https://php.net/manual/en/book.exif.php">Exif</a></td>
<td>For image rotation in the pictures app</td>
</tr>
<tr class="row-odd"><td><a class="reference external" href="https://php.net/manual/en/book.gmp.php">GMP</a></td>
<td>For working with arbitrary-length integers</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="for-server-performance">
<h4>For Server Performance<a class="headerlink" href="#for-server-performance" title="Permalink to this headline">¶</a></h4>
<p>For enhanced server performance consider installing one of the following cache
extensions:</p>
<ul class="simple">
<li><a class="reference external" href="https://secure.php.net/manual/en/book.apcu.php">apcu</a></li>
<li><a class="reference external" href="https://secure.php.net/manual/en/book.memcached.php">memcached</a></li>
<li><a class="reference external" href="https://pecl.php.net/package/redis">redis</a> (&gt;= 2.2.6+, required for transactional file locking)</li>
</ul>
<p>See <a class="reference internal" href="../configuration_server/caching_configuration.html"><em>Configuring Memory Caching</em></a> to learn how to select
and configure a memcache.</p>
</div>
<div class="section" id="for-preview-generation">
<h4>For Preview Generation<a class="headerlink" href="#for-preview-generation" title="Permalink to this headline">¶</a></h4>
<ul class="simple">
<li><a class="reference external" href="https://libav.org/">avconv</a> or <a class="reference external" href="https://ffmpeg.org/">ffmpeg</a></li>
<li><a class="reference external" href="https://www.openoffice.org/">OpenOffice</a> or <a class="reference external" href="https://www.libreoffice.org/">LibreOffice</a></li>
</ul>
</div>
<div class="section" id="for-command-line-processing">
<h4>For Command Line Processing<a class="headerlink" href="#for-command-line-processing" title="Permalink to this headline">¶</a></h4>
<table border="1" class="docutils">
<colgroup>
<col width="12%" />
<col width="88%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">Extension</th>
<th class="head">Reason</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td><a class="reference external" href="https://secure.php.net/manual/en/book.pcntl.php">PCNTL</a></td>
<td>Enables command interruption by pressing <code class="docutils literal"><span class="pre">ctrl-c</span></code></td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">You don’t need the WebDAV module for your Web server (i.e. Apache’s
<code class="docutils literal"><span class="pre">mod_webdav</span></code>), as ownCloud has a built-in WebDAV server of its own, <a class="reference external" href="http://sabre.io/">SabreDAV</a>.
If <code class="docutils literal"><span class="pre">mod_webdav</span></code> is enabled you must disable it for ownCloud. (See
<a class="reference internal" href="#apache-configuration-label"><span>Apache Web Server Configuration</span></a> for an example configuration.)</p>
</div>
</div>
</div>
</div>
<div class="section" id="mysql-mariadb-require-innodb">
<h2>MySQL/MariaDB Require InnoDB<a class="headerlink" href="#mysql-mariadb-require-innodb" title="Permalink to this headline">¶</a></h2>
<p>The InnoDB storage engine is required, and MyISAM is not supported, see:
<a class="reference internal" href="../configuration_database/linux_database_configuration.html#db-storage-engine-label"><span>MySQL / MariaDB storage engine</span></a>.</p>
</div>
<div class="section" id="example-installation-on-ubuntu-16-04-lts-server">
<span id="ubuntu-installation-label"></span><h2>Example Installation on Ubuntu 16.04 LTS Server<a class="headerlink" href="#example-installation-on-ubuntu-16-04-lts-server" title="Permalink to this headline">¶</a></h2>
<p>On a machine running a pristine Ubuntu 16.04 LTS server, install the
required and recommended modules for a typical ownCloud installation, using
Apache and MariaDB, by issuing the following commands in a terminal:</p>
<div class="highlight-python"><div class="highlight"><pre>apt install -y apache2 mariadb-server libapache2-mod-php7.0 \
    php7.0-gd php7.0-json php7.0-mysql php7.0-curl \
    php7.0-intl php7.0-mcrypt php-imagick \
    php7.0-zip php7.0-xml php7.0-mbstring
</pre></div>
</div>
<p>The remaining steps are analogous to the installation on Ubuntu 14.04 as shown
below.</p>
</div>
<div class="section" id="example-installation-on-ubuntu-14-04-lts-server">
<h2>Example Installation on Ubuntu 14.04 LTS Server<a class="headerlink" href="#example-installation-on-ubuntu-14-04-lts-server" title="Permalink to this headline">¶</a></h2>
<p>On a machine running a pristine Ubuntu 14.04 LTS server, install the
required and recommended modules for a typical ownCloud installation, using
Apache and MariaDB, by issuing the following commands in a terminal:</p>
<div class="highlight-python"><div class="highlight"><pre>apt-get install apache2 mariadb-server libapache2-mod-php5
apt-get install php5-gd php5-json php5-mysql php5-curl
apt-get install php5-intl php5-mcrypt php5-imagick
</pre></div>
</div>
<ul class="simple">
<li>This installs the packages for the ownCloud core system.
<code class="docutils literal"><span class="pre">libapache2-mod-php5</span></code> provides the following PHP extensions: <code class="docutils literal"><span class="pre">bcmath</span> <span class="pre">bz2</span>
<span class="pre">calendar</span> <span class="pre">Core</span> <span class="pre">ctype</span> <span class="pre">date</span> <span class="pre">dba</span> <span class="pre">dom</span> <span class="pre">ereg</span> <span class="pre">exif</span> <span class="pre">fileinfo</span> <span class="pre">filter</span> <span class="pre">ftp</span> <span class="pre">gettext</span> <span class="pre">hash</span>
<span class="pre">iconv</span> <span class="pre">libxml</span> <span class="pre">mbstring</span> <span class="pre">mhash</span> <span class="pre">openssl</span> <span class="pre">pcre</span> <span class="pre">Phar</span> <span class="pre">posix</span> <span class="pre">Reflection</span> <span class="pre">session</span> <span class="pre">shmop</span>
<span class="pre">SimpleXML</span> <span class="pre">soap</span> <span class="pre">sockets</span> <span class="pre">SPL</span> <span class="pre">standard</span> <span class="pre">sysvmsg</span> <span class="pre">sysvsem</span> <span class="pre">sysvshm</span> <span class="pre">tokenizer</span> <span class="pre">wddx</span>
<span class="pre">xml</span> <span class="pre">xmlreader</span> <span class="pre">xmlwriter</span> <span class="pre">zip</span> <span class="pre">zlib</span></code>. If you are planning
on running additional apps, keep in mind that they might require additional
packages.  See <a class="reference internal" href="#prerequisites-label"><span>Prerequisites</span></a> for details.</li>
<li>At the installation of the MySQL/MariaDB server, you will be prompted to
create a root password. Be sure to remember your password as you will need it
during ownCloud database setup.</li>
</ul>
<p>Now download the archive of the latest ownCloud version:</p>
<ul>
<li><p class="first">Go to the <a class="reference external" href="https://owncloud.org/install">ownCloud Download Page</a>.</p>
</li>
<li><p class="first">Go to <strong>Download ownCloud Server &gt; Download &gt; Archive file for
server owners</strong> and download either the tar.bz2 or .zip archive.</p>
</li>
<li><p class="first">This downloads a file named owncloud-x.y.z.tar.bz2 or owncloud-x.y.z.zip
(where x.y.z is the version number).</p>
</li>
<li><p class="first">Download its corresponding checksum file, e.g. owncloud-x.y.z.tar.bz2.md5,
or owncloud-x.y.z.tar.bz2.sha256.</p>
</li>
<li><p class="first">Verify the MD5 or SHA256 sum:</p>
<div class="highlight-python"><div class="highlight"><pre>md5sum -c owncloud-x.y.z.tar.bz2.md5 &lt; owncloud-x.y.z.tar.bz2
sha256sum -c owncloud-x.y.z.tar.bz2.sha256 &lt; owncloud-x.y.z.tar.bz2
md5sum  -c owncloud-x.y.z.zip.md5 &lt; owncloud-x.y.z.zip
sha256sum  -c owncloud-x.y.z.zip.sha256 &lt; owncloud-x.y.z.zip
</pre></div>
</div>
</li>
<li><p class="first">You may also verify the PGP signature:</p>
<div class="highlight-python"><div class="highlight"><pre>wget https://download.owncloud.org/community/owncloud-x.y.z.tar.bz2.asc
wget https://owncloud.org/owncloud.asc
gpg --import owncloud.asc
gpg --verify owncloud-x.y.z.tar.bz2.asc owncloud-x.y.z.tar.bz2
</pre></div>
</div>
</li>
<li><p class="first">Now you can extract the archive contents. Run the appropriate unpacking
command for your archive type:</p>
<div class="highlight-python"><div class="highlight"><pre>tar -xjf owncloud-x.y.z.tar.bz2
unzip owncloud-x.y.z.zip
</pre></div>
</div>
</li>
<li><p class="first">This unpacks to a single <code class="docutils literal"><span class="pre">owncloud</span></code> directory. Copy the ownCloud directory
to its final destination. When you are running the Apache HTTP server you may
safely install ownCloud in your Apache document root:</p>
<div class="highlight-python"><div class="highlight"><pre>cp -r owncloud /path/to/webserver/document-root
</pre></div>
</div>
<p>where <code class="docutils literal"><span class="pre">/path/to/webserver/document-root</span></code> is replaced by the
document root of your Web server:</p>
<div class="highlight-python"><div class="highlight"><pre>cp -r owncloud /var/www
</pre></div>
</div>
</li>
</ul>
<p>On other HTTP servers it is recommended to install ownCloud outside of the
document root.</p>
</div>
<div class="section" id="binlog-format-statement">
<span id="binlog-format-label"></span><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
&#39;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.&#39;
</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 class="section" id="apache-web-server-configuration">
<span id="apache-configuration-label"></span><h2>Apache Web Server Configuration<a class="headerlink" href="#apache-web-server-configuration" title="Permalink to this headline">¶</a></h2>
<p>On Debian, Ubuntu, and their derivatives, Apache installs with a useful
configuration so all you have to do is create
a <code class="file docutils literal"><span class="pre">/etc/apache2/sites-available/owncloud.conf</span></code> file with these lines in
it, replacing the <strong>Directory</strong> and other file paths with your own file paths:</p>
<div class="highlight-python"><div class="highlight"><pre>Alias /owncloud &quot;/var/www/owncloud/&quot;

&lt;Directory /var/www/owncloud/&gt;
  Options +FollowSymlinks
  AllowOverride All

 &lt;IfModule mod_dav.c&gt;
  Dav off
 &lt;/IfModule&gt;

 SetEnv HOME /var/www/owncloud
 SetEnv HTTP_HOME /var/www/owncloud

&lt;/Directory&gt;
</pre></div>
</div>
<p>Then create a symlink to <code class="file docutils literal"><span class="pre">/etc/apache2/sites-enabled</span></code>:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">ln</span> <span class="o">-</span><span class="n">s</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">apache2</span><span class="o">/</span><span class="n">sites</span><span class="o">-</span><span class="n">available</span><span class="o">/</span><span class="n">owncloud</span><span class="o">.</span><span class="n">conf</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">apache2</span><span class="o">/</span><span class="n">sites</span><span class="o">-</span><span class="n">enabled</span><span class="o">/</span><span class="n">owncloud</span><span class="o">.</span><span class="n">conf</span>
</pre></div>
</div>
<div class="section" id="additional-apache-configurations">
<h3>Additional Apache Configurations<a class="headerlink" href="#additional-apache-configurations" title="Permalink to this headline">¶</a></h3>
<ul>
<li><p class="first">For ownCloud to work correctly, we need the module <code class="docutils literal"><span class="pre">mod_rewrite</span></code>. Enable it
by running:</p>
<div class="highlight-python"><div class="highlight"><pre>a2enmod rewrite
</pre></div>
</div>
<p>Additional recommended modules are <code class="docutils literal"><span class="pre">mod_headers</span></code>, <code class="docutils literal"><span class="pre">mod_env</span></code>, <code class="docutils literal"><span class="pre">mod_dir</span></code> and <code class="docutils literal"><span class="pre">mod_mime</span></code>:</p>
<div class="highlight-python"><div class="highlight"><pre>a2enmod headers
a2enmod env
a2enmod dir
a2enmod mime
</pre></div>
</div>
</li>
<li><p class="first">You must disable any server-configured authentication for ownCloud, as it
uses Basic authentication internally for DAV services. If you have turned on
authentication on a parent folder (via e.g. an <code class="docutils literal"><span class="pre">AuthType</span> <span class="pre">Basic</span></code>
directive), you can turn off the authentication specifically for the ownCloud
entry. Following the above example configuration file, add the following line
in the <code class="docutils literal"><span class="pre">&lt;Directory</span></code> section:</p>
<div class="highlight-python"><div class="highlight"><pre>Satisfy Any
</pre></div>
</div>
</li>
<li><p class="first">When using SSL, take special note of the <code class="docutils literal"><span class="pre">ServerName</span></code>. You should specify one in
the  server configuration, as well as in the <cite>CommonName</cite> field of the
certificate. If you want your ownCloud to be reachable via the internet, then
set both of these to the domain you want to reach your ownCloud server.</p>
</li>
<li><p class="first">Now restart Apache:</p>
<div class="highlight-python"><div class="highlight"><pre>service apache2 restart
</pre></div>
</div>
</li>
<li><p class="first">If you&#8217;re running ownCloud in a sub-directory and want to use CalDAV or
CardDAV clients make sure you have configured the correct
<a class="reference internal" href="../issues/general_troubleshooting.html#service-discovery-label"><span>Service discovery</span></a> URLs.</p>
</li>
</ul>
</div>
</div>
<div class="section" id="enabling-ssl">
<span id="enabling-ssl-label"></span><h2>Enabling SSL<a class="headerlink" href="#enabling-ssl" title="Permalink to this headline">¶</a></h2>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">You can use ownCloud over plain HTTP, but we strongly encourage you to
use SSL/TLS to encrypt all of your server traffic, and to protect
user&#8217;s logins and data in transit.</p>
</div>
<p>Apache installed under Ubuntu comes already set-up with a simple
self-signed certificate. All you have to do is to enable the <code class="docutils literal"><span class="pre">ssl</span></code> module and
the default site. Open a terminal and run:</p>
<div class="highlight-python"><div class="highlight"><pre>a2enmod ssl
a2ensite default-ssl
service apache2 reload
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Self-signed certificates have their drawbacks - especially when you
plan to make your ownCloud server publicly accessible. You might want
to consider getting a certificate signed by a commercial signing
authority. Check with your domain name registrar or hosting service
for good deals on commercial certificates.</p>
</div>
</div>
<div class="section" id="installation-wizard">
<span id="installation-wizard-label"></span><h2>Installation Wizard<a class="headerlink" href="#installation-wizard" title="Permalink to this headline">¶</a></h2>
<p>After restarting Apache you must complete your installation by running either
the graphical Installation Wizard, or on the command line with the <code class="docutils literal"><span class="pre">occ</span></code>
command. To enable this, temporarily change the ownership on your ownCloud
directories to your HTTP user (see <a class="reference internal" href="installation_wizard.html#strong-perms-label"><span>Setting Strong Directory Permissions</span></a> to learn how to
find your HTTP user):</p>
<div class="highlight-python"><div class="highlight"><pre>chown -R www-data:www-data /var/www/owncloud/
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Admins of SELinux-enabled distributions may need to write new SELinux
rules to complete their ownCloud installation; see
<a class="reference internal" href="#selinux-tips-label"><span>SELinux Configuration Tips</span></a>.</p>
</div>
<p>To use <code class="docutils literal"><span class="pre">occ</span></code> see <a class="reference internal" href="command_line_installation.html"><em>Installing ownCloud from the Command Line</em></a>.</p>
<p>To use the graphical Installation Wizard see <a class="reference internal" href="installation_wizard.html"><em>Installation Wizard</em></a>.</p>
</div>
<div class="section" id="setting-strong-directory-permissions">
<h2>Setting Strong Directory Permissions<a class="headerlink" href="#setting-strong-directory-permissions" title="Permalink to this headline">¶</a></h2>
<p>After completing installation, you must immediately set the directory
permissions in your ownCloud installation as strictly as possible for stronger
security. Please refer to <a class="reference internal" href="installation_wizard.html#strong-perms-label"><span>Setting Strong Directory Permissions</span></a>.</p>
<p>Now your ownCloud server is ready to use.</p>
</div>
<div class="section" id="selinux-configuration-tips">
<span id="selinux-tips-label"></span><h2>SELinux Configuration Tips<a class="headerlink" href="#selinux-configuration-tips" title="Permalink to this headline">¶</a></h2>
<p>See <a class="reference internal" href="selinux_configuration.html"><em>SELinux Configuration</em></a> for a suggested configuration for
SELinux-enabled distributions such as Fedora and CentOS.</p>
</div>
<div class="section" id="php-ini-configuration-notes">
<span id="php-ini-tips-label"></span><h2>php.ini Configuration Notes<a class="headerlink" href="#php-ini-configuration-notes" title="Permalink to this headline">¶</a></h2>
<p>Several core PHP settings have to be configured correctly, otherwise ownCloud may
not work properly. Known settings causing issues are listed here. Please note that
there might be other settings causing unwanted behaviours. In general it is recommended
to keep the <code class="docutils literal"><span class="pre">php.ini</span></code> at their defaults.</p>
<div class="section" id="session-auto-start-enable-post-data-reading">
<h3>session.auto_start &amp;&amp; enable_post_data_reading<a class="headerlink" href="#session-auto-start-enable-post-data-reading" title="Permalink to this headline">¶</a></h3>
<p>Ensure that <a class="reference external" href="https://secure.php.net/manual/en/session.configuration.php#ini.session.auto-start">session.auto_start</a> is set to <code class="docutils literal"><span class="pre">0</span></code> or <code class="docutils literal"><span class="pre">Off</span></code> and <a class="reference external" href="https://secure.php.net/manual/en/ini.core.php#ini.enable-post-data-reading">enable_post_data_reading</a>
to <code class="docutils literal"><span class="pre">1</span></code> or <code class="docutils literal"><span class="pre">On</span></code> in your configuration. If not, you may have issues logging in
to ownCloud via the WebUI, where you see the error: &#8220;<em>Access denied. CSRF check
failed</em>&#8221;.</p>
</div>
<div class="section" id="session-save-path">
<h3>session.save_path<a class="headerlink" href="#session-save-path" title="Permalink to this headline">¶</a></h3>
<p>In addition to setting <code class="docutils literal"><span class="pre">session.auto_start</span></code> and <code class="docutils literal"><span class="pre">enable_post_data_reading</span></code>
correctly, ensure that, if <code class="docutils literal"><span class="pre">session.save_handler</span></code> is set to <code class="docutils literal"><span class="pre">files</span></code>, that
<code class="docutils literal"><span class="pre">session.save_path</span></code> is set to a path on the filesystem which the web server
process, or process which PHP is running as, can read from and write to.</p>
</div>
<div class="section" id="post-max-size">
<h3>post_max_size<a class="headerlink" href="#post-max-size" title="Permalink to this headline">¶</a></h3>
<p>Please ensure that you have <code class="docutils literal"><span class="pre">post_max_size</span></code> configured with <em>at least</em> the minimum
amount of memory for use with ownCloud, which is 512 MB.</p>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p class="last">Please be careful when you set this value if you use the byte value shortcut as it is very specific.
Use <cite>K</cite> for kilobyte, <cite>M</cite> for megabyte and <cite>G</cite> for gigabyte. <cite>KB</cite>, <cite>MB</cite>, and <cite>GB</cite> <strong>do not work!</strong></p>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Keep in mind that changes to <code class="docutils literal"><span class="pre">php.ini</span></code> may have to be configured in more
than one ini file. This can be the case, for example, for the
<code class="docutils literal"><span class="pre">date.timezone</span></code> setting.</p>
</div>
<p><strong>php.ini - used by the Web server:</strong></p>
<div class="highlight-python"><div class="highlight"><pre>  /etc/php5/apache2/php.ini
or
  /etc/php5/fpm/php.ini
or ...
</pre></div>
</div>
<p><strong>php.ini - used by the php-cli and so by ownCloud CRON jobs:</strong></p>
<div class="highlight-python"><div class="highlight"><pre>/etc/php5/cli/php.ini
</pre></div>
</div>
</div>
</div>
<div class="section" id="php-fpm-configuration-notes">
<span id="php-fpm-tips-label"></span><h2>php-fpm Configuration Notes<a class="headerlink" href="#php-fpm-configuration-notes" title="Permalink to this headline">¶</a></h2>
<p><strong>System environment variables</strong></p>
<p>When you are using <code class="docutils literal"><span class="pre">php-fpm</span></code>, system environment variables like
<code class="docutils literal"><span class="pre">PATH</span></code>, <code class="docutils literal"><span class="pre">TMP</span></code> or others are not automatically populated in the same way as
when using <code class="docutils literal"><span class="pre">php-cli</span></code>. A PHP call like <code class="docutils literal"><span class="pre">getenv('PATH');</span></code> can therefore
return an empty result. So you may need to manually configure environment
variables in the appropriate <code class="docutils literal"><span class="pre">php-fpm</span></code> ini/config file.</p>
<p>Here are some example root paths for these ini/config files:</p>
<table border="1" class="docutils">
<colgroup>
<col width="47%" />
<col width="53%" />
</colgroup>
<tbody valign="top">
<tr class="row-odd"><td>Ubuntu/Mint</td>
<td>CentOS/Red Hat/Fedora</td>
</tr>
<tr class="row-even"><td><code class="docutils literal"><span class="pre">/etc/php5/fpm/</span></code></td>
<td><code class="docutils literal"><span class="pre">/etc/php-fpm.d/</span></code></td>
</tr>
</tbody>
</table>
<p>In both examples, the <code class="docutils literal"><span class="pre">ini/config</span></code> file is called <code class="docutils literal"><span class="pre">www.conf</span></code>, and depending
on the distribution or customizations which you have made, it may be in
a sub-directory.</p>
<p>Usually, you will find some or all of the environment variables
already in the file, but commented out like this:</p>
<div class="highlight-python"><div class="highlight"><pre>;env[HOSTNAME] = $HOSTNAME
;env[PATH] = /usr/local/bin:/usr/bin:/bin
;env[TMP] = /tmp
;env[TMPDIR] = /tmp
;env[TEMP] = /tmp
</pre></div>
</div>
<p>Uncomment the appropriate existing entries. Then run <code class="docutils literal"><span class="pre">printenv</span> <span class="pre">PATH</span></code> to
confirm your paths, for example:</p>
<div class="highlight-python"><div class="highlight"><pre>$ printenv PATH
/home/user/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:
/sbin:/bin:/
</pre></div>
</div>
<p>If any of your system environment variables are not present in the file then
you must add them.</p>
<p>When you are using shared hosting or a control panel to manage your ownCloud
virtual machine or server, the configuration files are almost certain to be
located somewhere else, for security and flexibility reasons, so check your
documentation for the correct locations.</p>
<p>Please keep in mind that it is possible to create different settings for
<code class="docutils literal"><span class="pre">php-cli</span></code> and <code class="docutils literal"><span class="pre">php-fpm</span></code>, and for different domains and Web sites.
The best way to check your settings is with <a class="reference internal" href="../issues/general_troubleshooting.html#label-phpinfo"><span>PHP Version and Information</span></a>.</p>
<p><strong>Maximum upload size</strong></p>
<p>If you want to increase the maximum upload size, you will also have to modify
your <code class="docutils literal"><span class="pre">php-fpm</span></code> configuration and increase the <code class="docutils literal"><span class="pre">upload_max_filesize</span></code> and
<code class="docutils literal"><span class="pre">post_max_size</span></code> values. You will need to restart <code class="docutils literal"><span class="pre">php5-fpm</span></code> and your HTTP
server in order for these changes to be applied.</p>
<p><strong>.htaccess notes for Apache</strong></p>
<p>ownCloud comes with its own <code class="docutils literal"><span class="pre">owncloud/.htaccess</span></code> file. Because <code class="docutils literal"><span class="pre">php-fpm</span></code> can&#8217;t
read PHP settings in <code class="docutils literal"><span class="pre">.htaccess</span></code> these settings and permissions must be set
in the <code class="docutils literal"><span class="pre">owncloud/.user.ini</span></code> file.</p>
<p id="other-http-servers-label"><strong>No basic authentication headers were found</strong></p>
<p>This error is shown in your <code class="docutils literal"><span class="pre">data/owncloud.log</span></code> file.
Some Apache modules like <code class="docutils literal"><span class="pre">mod_fastcgi</span></code>, <code class="docutils literal"><span class="pre">mod_fcgid</span></code> or <code class="docutils literal"><span class="pre">mod_proxy_fcgi</span></code> are not passing the needed authentication headers to PHP and so the login to ownCloud via WebDAV, CalDAV and CardDAV clients is failing.
Information on how to correctly configure your environment can be found <a class="reference external" href="https://central.owncloud.org/t/no-basic-authentication-headers-were-found-message/819">in the forums</a> but we generally recommend against the use of these modules and recommend mod_php instead.</p>
</div>
<div class="section" id="other-web-servers">
<h2>Other Web Servers<a class="headerlink" href="#other-web-servers" title="Permalink to this headline">¶</a></h2>
<p><a class="reference internal" href="nginx_examples.html"><em>NGINX Example Configurations</em></a></p>
<p><a class="reference external" href="https://github.com/owncloud/documentation/wiki/Alternate-Web-server-notes">Other HTTP servers</a></p>
<p><a class="reference external" href="https://github.com/owncloud/documentation/wiki/UCS-Installation">Univention Corporate Server installation</a></p>
</div>
</div>


            
<ul class="prevnext-title list-unstyled list-inline">
  <li class="prev">
    <a href="apps_supported.html" title="Previous Chapter: Supported Apps in ownCloud"><span class="glyphicon glyphicon-chevron-left visible-sm"></span><span class="hidden-sm">&laquo; Supported App...</span>
    </a>
  </li>
  <li class="next">
    <a href="appliance_installation.html" title="Next Chapter: ownCloud Community Appliance"><span class="glyphicon glyphicon-chevron-right visible-sm"></span><span class="hidden-sm">ownCloud Comm... &raquo;</span>
    </a>
  </li>
</ul>
					</div>
				</div>
			</div>
  </main>  
  </div>
</div>
  </body>
</html>