Description

If you’re only running Owncloud on a basic VPS with less 1TB of storage for personal use, Owncloud can be installed from their official repos in your Linux distro. However, if you’d like to provide several users with their own Owncloud installs, you can also do that in the same way you install WordPress, by downloading the tar.gz or .zip file from Owncloud and extracting it to your documentroot and setting up a database instance.

We’ll be using Centos as our target Linux distro and using the official Owncloud repos for the purposes of this document. If you’re using another distro like Debian or Ubuntu the only thing that will change in any significant way is the installation process. The Apache httpd configuration below should work on any distro that you can install Apache httpd on.

For Debian, Ubuntu or other distros see OwnCloud’s installation instructions here: https://download.owncloud.org/download/repositories/stable/owncloud/ or download Owncloud directly as a zip or tar.gz on your server with wget.

Prerequisites

  1. VPS or other server you have root access to
  2. Apache httpd installed and configured for your domain(s)
  3. MariaDB or MySQL installed and configured with a valid DBA account

Installation

  1. Open a terminal and give the following commands as root or using sudo.
  2. Get a Free SSL certificate for your desired subdomain. [Recommended]
  3. We’re using “storage.example.com” in our example but you can use whatever domain or subdomain you want, make sure you’ve made the necessary DNS changes and pointed it to the server that Apache httpd is running on.
  4. After successful installation, open and edit the following file to reflect your own domain name:
  5. /etc/httpd/conf.d/owncloud.conf

  6. Restart the webserver
  7. C6: service httpd restart
    C7: systemctl restasrt httpd.service

Database setup

We need to create a database container, username and password for our OwnCloud installation, we’ll be using MariaDB but these same instructions will work with MySQL.

Login to the database server:

  1. mysql -p
  2. create database own_cloud;
  3. grant all privileges on own_cloud.* TO 'oc_admin'@'localhost' IDENTIFIED BY 'strong_password';

You’ll need to remember the following:

Hostname

localhost
Database name

own_cloud
Database username

oc_admin
Database password

strong_password

Testing & Troubleshooting

You should now be able to visit https://storage.example.com/ and begin the installation.

Last Modified: 27 Jul, 2016 at 15:06:16