Introduction
OwnCloud is an application to create a personal cloud into your home or business. That are powerful, including a Raspberry PI version 😉
Formally speaking, we can define OwnCloud as:
A suite of client–server software for creating file hosting services and using them. ownCloud is functionally very similar to the widely used Dropbox, with the primary functional difference being that the Server Edition of ownCloud is free and open-source, and thereby allowing anyone to install and operate it without charge on a private server. It also supports extensions that allow it to work like Google Drive, with online document editing, calendar and contact synchronization, and more. Its openness avoids enforced quotas on storage space or the number of connected clients, instead having hard limits (like on storage space or number of users) defined only by the physical capabilities of the server. (Wikipedia)
In order to correctly configure your Raspberry, follow this article: http://www.theobservator.net/raspberry-pi-3-with-raspbian-os/ to learn how download and update your Raspbian OS.
IP Management
In order to use our own cloud, we really need a static IP address. To make the appropriate configuration, follow this article: http://www.theobservator.net/setup-static-ip-on-raspberry-pi-3-with-raspbian-os/
Installing Packages
First, let’s update package repositories:
sudo apt-get update
Installing Basic Packages
apt-get install -y apache2 mariadb-server libapache2-mod-php7.0 openssl php-imagick php7.0-common php7.0-curl php7.0-gd php7.0-imap php7.0-intl php7.0-json php7.0-ldap php7.0-mbstring php7.0-mcrypt php7.0-mysql php7.0-pgsql php-smbclient php-ssh2 php7.0-sqlite3 php7.0-xml php7.0-zip exfat-fuse
Some Configurations
Add the www-data user to the www-data group
sudo usermod -a -G www-data www-data
Configuring MariaDB
Access MariaDB using the command:
mysql -uroot -p
*No password needed
Create a new User
CREATE USER 'ownclouduser'@'localhost'; SET PASSWORD FOR 'ownclouduser'@'localhost' = PASSWORD('PASSWORD HERE');
Create a new Database:
</pre> <span style="font-family: Consolas, Monaco, monospace; font-size: 14px;">CREATE DATABASE IF NOT EXISTS owncloud; </span><span style="font-family: Consolas, Monaco, monospace; font-size: 14px;">GRANT ALL PRIVILEGES ON owncloud.* TO 'ownclouduser'@'localhost' IDENTIFIED BY 'password';</span> quit <div class="highlight-python"> <div class="highlight"> <pre>
Download and Install OwnCloud Package
Access https://owncloud.org/download/, and locate Tarball .zip file copy the link address.
* Note: where x.y.z is the version number
wget https://download.owncloud.org/community/owncloud-x.y.z.zip
Now, extract the content
tar -xjf owncloud-x.y.z.tar.bz2
This unpack to a single owncloud directory. Copy the ownCloud directory to its destination. When you are running the Apache HTTP server, you may safely install ownCloud in your Apache document root:
cp -r owncloud /var/www/html
Now, we need to guarantee that apache owns permission on all files that we copy:
sudo chown -R www-data:www-data /var/www/html
And finally, let’s restart apache:
sudo service apache2 restart
Configuring OwnCloud
Now, using your Browser, navigate to your Raspberry PI Address. You must see the configuration screen (bellow).
Create an “admin” user and configure the MariaDB installation. Remember the Username and Password that you use on installation and use a “owncloud” as database name.
And Voilá. Your installation now is completed
That’s All Folks.