In this tutorial we will cover the steps needed to install ownCloud on your CentOS 6.4, Debian or Ubuntu platform. ownCloud is a data storage application which gives you web access to your files (similar to Dropbox).

Requirements

  • CentOS 6.4, Debian or Ubuntu installed on your computer/server
  • SSH access (Command line access to the server)
  • root privileges
  • Basic skills for working on a Linux environment
  • LAMP/LEMP installed on the server – How to install LAMP/LEMP.

Configure an ownCloud database

The ownCloud application requires a MySQL database where the website information will be stored. During the installation the database name, database username and password should be specified so we will go ahead and create new empty database through SSH:

You will be prompted to fill in the MySQL root password. After that the command prompt will be switched to a MySQL one.

New MySQL database can be created with the following command:

After that create new MySQL username and assign it to the database:

You can set desired password in the first MySQL query.

When ready flush the MySQL privileges in order for the changes to take effect:

When ready you can exit the MySQL prompt:

Install ownCloud and test its functionality

You can download the latest ownCloud installation package through the official website. Download and extract the content of the package inside a newly created folder in the default web root folder (usually this is /var/www/).

The folder owncloud/ will be extracted inside the Apache web root folder.

Make sure that the correct ownership is set for the website content:

where www-data is the default user configured for the web server.

We can continue the installation by accessing the ownCloud installation wizard through the browser:

where X.X.X.X is your server's IP address, i.e. http://1.2.3.4/owncloud

An easy way to find your server's IP address is to execute the following command:

You will be prompted to create an administrative account with password. There should be a an Advanced button which can be clicked in order to access the MySQL configuration section. Inside it we can specify the MySQL credentials related to the ownCloud installation:

When the installation is completed you will be logged automatically with the administrative user.