From Fedora Project Wiki

Line 57: Line 57:
Then your owncloud server should be available under your <code>localhost/owncloud</code>. Unless configured otherwise it won't be available from outside.
Then your owncloud server should be available under your <code>localhost/owncloud</code>. Unless configured otherwise it won't be available from outside.


Configuration files are <code>/etc/owncloud/config.php</code> and <code>/etc/httpd/conf.d/owncloud.conf</code>
{{admon/warning | This exposes your computer to the Internet and potential attackers. Secure your installation properly before exposing your server to the Internet.}}
 
Once owncloud is properly configured you can make it available from outside. Edit <code>/etc/httpd/conf.d/owncloud.conf</code> such that
<pre>    <IfModule mod_authz_core.c>
    # Apache 2.4
    #Require local
    Require all granted
    </IfModule>
    <IfModule !mod_authz_core.c>
    # Apache 2.2
    Order Deny,Allow
    #Deny from all
    #Allow from 127.0.0.1
    #Allow from ::1
    Allow from all
    </IfModule>
</pre>
 
This however enables owncloud for all your virtual hosts under <code>hostname/owncloud</code>. If this is not what you want, comment out this line
<pre># Alias /owncloud /usr/share/owncloud</pre>
 
And for example, let's say that you want to create a virtual host for owncloud using the domain <code>owncloud.hostname</code> with SSL support. If /etc/httpd/conf.d/hostname.conf doesn't exist, create it, and paste this
<pre>
<VirtualHost *:80>
    ServerName hostname
    DocumentRoot /usr/share/owncloud
</VirtualHost>
 
<VirtualHost *:443>
    ServerName hostname
    DocumentRoot /usr/share/owncloud
    SSLEngine On
    SSLCertificateFile /etc/pki/tls/certs/hostname.crt
    SSLCertificateKeyFile /etc/pki/tls/private/hostname.key
</VirtualHost>
</pre>
 
ownCloud onfiguration file is <code>/etc/owncloud/config.php</code>


== Troubleshooting ==
== Troubleshooting ==

Revision as of 14:08, 2 May 2014

ownCloud is a AGPLv3 private file server

Features

  • Online file storage
  • Android compatibility
  • Contacts(CarDAV) and calendar (CalDAV) synchronization
  • Music streaming
  • Many more

Installation

Requirements

The following software must be installed and configured

  1. A database management system
  2. A web server

Install owncloud

$ su root
$ yum install owncloud owncloud-mysql owncloud-httpd

A configuration file named /etc/httpd/conf.d/owncloud.conf should have been created

Start MariaDB and Apache HTTP Server if they weren't already

$ systemctl start httpd
$ systemctl start mariadb

If Apache was already running restart it

$ systemctl restart httpd

Create a database

Log in as root

$ mysql -u root -p

Create a new databse

CREATE DATABASE IF NOT EXISTS owncloud;

Create a new user and grant him privileges

CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON owncloud.* TO 'username'@'localhost' IDENTIFIED BY 'password';

Reload privileges and quit

FLUSH PRIVILEGES;
quit

Setup owncloud

Open localhost/owncloud in your browser and create the admin account. Also configure owncloud database parameters set previously.

Then your owncloud server should be available under your localhost/owncloud. Unless configured otherwise it won't be available from outside.

This exposes your computer to the Internet and potential attackers. Secure your installation properly before exposing your server to the Internet.

Once owncloud is properly configured you can make it available from outside. Edit /etc/httpd/conf.d/owncloud.conf such that

    <IfModule mod_authz_core.c>
    # Apache 2.4
    #Require local
    Require all granted
    </IfModule>
    <IfModule !mod_authz_core.c>
    # Apache 2.2
    Order Deny,Allow
    #Deny from all
    #Allow from 127.0.0.1
    #Allow from ::1
    Allow from all
    </IfModule>

This however enables owncloud for all your virtual hosts under hostname/owncloud. If this is not what you want, comment out this line

# Alias /owncloud /usr/share/owncloud

And for example, let's say that you want to create a virtual host for owncloud using the domain owncloud.hostname with SSL support. If /etc/httpd/conf.d/hostname.conf doesn't exist, create it, and paste this

<VirtualHost *:80>
    ServerName hostname
    DocumentRoot /usr/share/owncloud
</VirtualHost>

<VirtualHost *:443>
    ServerName hostname
    DocumentRoot /usr/share/owncloud
    SSLEngine On
    SSLCertificateFile /etc/pki/tls/certs/hostname.crt
    SSLCertificateKeyFile /etc/pki/tls/private/hostname.key
</VirtualHost>

ownCloud onfiguration file is /etc/owncloud/config.php

Troubleshooting

Dynamic IP adress

If you have a dynamic IP address you can configure a dynamic DNS client, for example install inadyn-mt

Links