How to install OwnCloud on Ubuntu 14.04 Server

This tutorial will show you how to install OwnCloud on Ubuntu 14.04 Server. I am installing Ubuntu server 14.04 on DigitalOcean cloud computing. So, ideally this OwnCloud server will handle my data and I can sync or access them from anywhere.

Step 1. System update

To install OwnCloud on Ubuntu 14.04.4 server, first thing is to make sure that our system is up to date. Log in to your Ubuntu server and perform system update.

sudo apt-get update
sudo apt-get upgrade

Step 2. Install Apache web server

Next, we need to install apache web server.

apt-get install apache2

3. Install php 

Installing php can be done with this command

apt-get install php5 php5-mysql

Next we need to install some php module needed by OwnCloud.

apt-get install php5-gd php5-json php5-curl php5-intl php5-mcrypt php5-imagick

4. Install MySQL Server

We need to install MySQL Database server. It can be installed with this command

apt-get install mysql-server

By default, MySQL installation is not secure. We need to harden the MySQL installation security

mysql_secure_installation

5. Create new MySQL Database for OwnCloud

We need to create a new database to hold OwnCloud data. Follow these steps to create a new database.

#mysql -u root -p
Enter password:
 
mysql> CREATE USER 'ownclouduser'@'localhost' IDENTIFIED BY 'YOURPASSWORD';
mysql> CREATE DATABASE ownclouddb;
mysql> GRANT ALL ON ownclouddb.* TO 'ownclouduser'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> exit

6. Download OwnCloud package

To download the latest version of OwnCloud, it is advisable to get it from the official OwnCloud website. Copy the download link and use wget to download the package. For example:

wget https://download.owncloud.org/community/owncloud-8.2.2.tar.bz2

Extract the file to /var/www/html

tar -xvf owncloud-8.2.2.tar.bz2 -C /var/www/html/

Set the folder permission for owncloud directory

chown www-data:www-data -R /var/www/html/owncloud/

7. Configure Apache

We need to configure Apache for Owncloud. I create a new configuration file.

nano /etc/apache2/sites-available/owncloud.conf

Paste these line to the new config file

<IfModule mod_alias.c>
Alias /owncloud /var/www/html/owncloud
</IfModule>
<Directory “/var/www/html/owncloud”>
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>

Next restart apache2

service apache2 restart

At this point, we finished to configure the server. Now open a web browser and point to the IP address of the server. For example:

http://128.199.72.121/owncloud

You should see the Owncloud configuration wizard as follow. Enter the detailed information needed.

Screen Shot 2016-02-29 at 11.58.54 PM

Thank you for coming. This tutorial to install OwnCloud on Ubuntu 14.04 is tested by myself. Next time I will show you how to secure OwnCloud with https interface.

 

Admin

Leave a Reply

Your email address will not be published. Required fields are marked *