Logo
  • Ubuntu
  • CentOS
  • Debian
  • Fedora
  • RedHat

How to Install OwnCloud in Debian 10 - DesignLinux

May 29 2020
designlinux 0 Comments

Owncloud is a market-leading online file sharing system that lets you back up and shares your files with ease. If you are not a fan of DropBox or Google Drive, then OwnCloud is a cool alternative.

In this article, we walk you through the installation of OwnCloud in Debian 10.

Step 1: Install LAMP Stack on Debian

Since OwnCloud runs on the browser and the back-end too by storing data on the database, we need to first install the LAMP stack. LAMP is a popular free and open-source hosting stack used by developers for hosting their web applications. It stands for Linux, Apache, MariaDB / MySQL, and PHP.

First, let’s update system repositories.

$ sudo apt update && sudo apt upgrade
Update Debian System Packages

Update Debian System Packages

Next, install the Apache web server and MariaDB database server by running the command.

$ sudo apt install apache2 mariadb-server mariadb-client
Install Apache and MariaDB

Install Apache and MariaDB

After the installation is complete, proceed and install PHP 7.2. At the time of penning down this guide, PHP 7.3 is not yet supported, so our best shot is using PHP 7.2.

So, enable the PHP repository as shown.

$ sudo wget -O /etc/apt/trusted.gpg.d/php.gpg  https://packages.sury.org/php/apt.gpg
$ sudo echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list

Once you are done creating the repository for PHP, update your system packages & repositories for the new PHP repository to take effect.

$ sudo apt update

Now install PHP and the required dependencies as shown.

$ sudo apt install php7.2 libapache2-mod-php7.2 php7.2-{mysql,intl,curl,json,gd,xml,mb,zip}
Install PHP in Debian

Install PHP in Debian

Once installed, check the PHP version using the command.

$ php -v

Also, verify that the Apache webserver is running by running the command.

$ systemctl status apache2

If Apache is up and running, you should get output similar to the one shown below, indicating that it is ‘active’.

Check Apache Status in Debian

Check Apache Status in Debian

If Apache is not started, start and enable it on boot by running the commands.

$ systemctl start apache2
$ systemctl enable apache2

Step 2: Create a Database for OwnCloud Files

The next step will be to create a database to handle OwnCloud’s files during and after the installation.

Login to the MariaDB server.

$ mysql -u root -p

Once logged in, create a database for OwnCloud.

MariaDB [(none)]> CREATE DATABASE owncloud;

Create a user for the OwnCloud database and grant all privileges to the user.

MariaDB [(none)]> GRANT ALL ON owncloud.* TO 'owncloud_user'@'localhost' IDENTIFIED BY '[email protected]';

Finally, flush privileges and exit.

MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;
Create OwnCloud Database

Create OwnCloud Database

Step 3: Install OwnCloud in Debian

By default, OwnCloud is not included in Debian 10 repositories. Nevertheless, OwnCloud maintains a repository for each distribution. The repository for Debian 10 has not yet been released, and therefore, we will use the repository of Debian 9.

First, install the PGP signing key.

$ sudo curl https://download.owncloud.org/download/repositories/10.2.1/Debian_9.0/Release.key | apt-key add -

Once the signing key is installed, go ahead and enable OwnCloud’s repository.

$ sudo echo 'deb http://download.owncloud.org/download/repositories/10.2.1/Debian_9.0/ /' > /etc/apt/sources.list.d/owncloud.list

Once again update your system to resynchronize the system packages and install Owncloud.

$ sudo apt update
$ sudo apt-get install owncloud-files

Step 4: Configure Apache for OwnCloud

Upon installation, OwnCloud stores its files in the /var/www/owncloud directory. We, therefore, need to configure our web server to serve OwnCloud’s files.

So, create a virtual host file for Owncloud as shown.

$ sudo vim /etc/apache2/sites-available/owncloud.conf

Add the configuration below and save.

Alias / "/var/www/owncloud/"

<Directory /var/www/owncloud/>
  Options +FollowSymlinks
  AllowOverride All

 <IfModule mod_dav.c>
  Dav off
 </IfModule>

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

</Directory>

To enable the OwnCloud site, just as you would any virtual host run the command:

$ sudo ln -s /etc/apache2/sites-available/owncloud.conf /etc/apache2/sites-enabled/

Next, enable additional Apache modules that are required by OwnCloud and restart the Apache webserver to reload the configuration and effect the changes.

$ sudo a2enmod rewrite mime unique_id
$ sudo systemctl restart apache2

Step 5: Finalizing OwnCloud Installation

To complete OwnCloud setup, browse your server’sIP address as shown below:

http://server-ip

The welcome interface will greet you as shown. You will be required to provide the username and password.

Create Owncloud Admin Account

Create Owncloud Admin Account

Next, click on the ‘Storage and database’ and provide the database details such as database user, database name and password.

Add OwnCloud Database Settings

Add OwnCloud Database Settings

Finally, click on ‘Finish Setup’.

Finish OwnCloud Setup

Finish OwnCloud Setup

This takes you to the login page. Enter your username and password and hit ENTER.

Owncloud Admin Login

Owncloud Admin Login

Initially, you will get a pop-up with information about OwnCloud’s Desktop, Android and iOS app that you can install on your devices. This allows you to access your data on the go.

OwnCloud Device Apps

OwnCloud Device Apps

Here’s the dashboard.

OwnCloud Dashboard Window

OwnCloud Dashboard Window

And we have finally come to the end of this tutorial. You can now save and share your files with ease using OwnCloud. Thanks for taking the time.

Sharing is Caring…
Share on FacebookShare on TwitterShare on LinkedinShare on Reddit

Related

Tags: Debian Tips, owncloud

Zaloha.sh – A Simple Local Directory Synchronizer Script for Linux

Prev Post

Learn Python Set/Frozenset Data Structure – Part 4

Next Post
Archives
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • July 2022
  • June 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
Categories
  • AlmaLinux
  • Android
  • Ansible
  • Apache
  • Arch Linux
  • AWS
  • Backups
  • Bash Shell
  • Bodhi Linux
  • CentOS
  • CentOS Stream
  • Chef
  • Cloud Software
  • CMS
  • Commandline Tools
  • Control Panels
  • CouchDB
  • Data Recovery Tools
  • Databases
  • Debian
  • Deepin Linux
  • Desktops
  • Development Tools
  • Docker
  • Download Managers
  • Drupal
  • Editors
  • Elementary OS
  • Encryption Tools
  • Fedora
  • Firewalls
  • FreeBSD
  • FTP
  • GIMP
  • Git
  • Hadoop
  • HAProxy
  • Java
  • Jenkins
  • Joomla
  • Kali Linux
  • KDE
  • Kubernetes
  • KVM
  • Laravel
  • Let's Encrypt
  • LFCA
  • Linux Certifications
  • Linux Commands
  • Linux Desktop
  • Linux Distros
  • Linux IDE
  • Linux Mint
  • Linux Talks
  • Lubuntu
  • LXC
  • Mail Server
  • Manjaro
  • MariaDB
  • MongoDB
  • Monitoring Tools
  • MySQL
  • Network
  • Networking Commands
  • NFS
  • Nginx
  • Nodejs
  • NTP
  • Open Source
  • OpenSUSE
  • Oracle Linux
  • Package Managers
  • Pentoo
  • PHP
  • Podman
  • Postfix Mail Server
  • PostgreSQL
  • Python
  • Questions
  • RedHat
  • Redis Server
  • Rocky Linux
  • Security
  • Shell Scripting
  • SQLite
  • SSH
  • Storage
  • Suse
  • Terminals
  • Text Editors
  • Top Tools
  • Torrent Clients
  • Tutorial
  • Ubuntu
  • Udemy Courses
  • Uncategorized
  • VirtualBox
  • Virtualization
  • VMware
  • VPN
  • VSCode Editor
  • Web Browsers
  • Web Design
  • Web Hosting
  • Web Servers
  • Webmin
  • Windows
  • Windows Subsystem
  • WordPress
  • Zabbix
  • Zentyal
  • Zorin OS
Visits
  • 1
  • 683
  • 616,372

DesignLinux.com © All rights reserved

Go to mobile version