Installing and configuring ownCloud on CentOS 7

As the internet evolves to accommodate more and more of our needs and requirements, it also becomes increasingly vulnerable to threats. More and more people learn how to hack their way into databases, storage spaces and generally, all kinds of places where they can find sensitive data that they can exploit so as to serve their own interests. Naturally, a lot of effort is being put into enhancing the security of data stored on the internet, but sometimes it’s just not enough.

For VPS users, ownCloud comes as a solution that eliminates the need to use a third-party cloud hosting service. This free, open-source file sharing server allows you to store your personal content, like documents and pictures, in a centralized location. It is essentially a more secure equivalent to the popular Dropbox.

To install an ownCloud instance on a CentOS 7 server, you will require a user with sudo privileges, a LAMP stack (Linux, Apache, MySQL, and PHP) and finally, an SSL certificate. Once you have all that, you can proceed to installing ownCloud on your server.

Installation

  • To begin, import the release key for CentOS repositories with the rpm command.
sudo rpm --import https://download.owncloud.org/download/repositories/stable/CentOS_7/repodata/repomd.xml.key
  • Next, use the curl command to download the ownCloud repository file:
sudo curl -L https://download.owncloud.org/download/repositories/stable/CentOS_7/ce:stable.repo -o/etc/yum.repos.d/ownCloud.repo
  • Then, use the clean command to make yum aware of the change:
sudo yum clean expire-cache
  • Finally, install ownCloud using the yum utility and the install command:
sudo yum install owncloud

Press Y, then ENTER to the prompt to authorize the installation.

 

Creating an SQL database

  • First, go ahead and log into MySQL with the administrative account:
mysql -u root -p
  • ownCloud requires a separate database for storing administrative data. You can name this database anything you wish, but we decided on ‘owncloud’ for the sake of keeping things as simple as possible.
CREATE DATABASE owncloud;
  • Next, you must create a separate MySQL user account to interact with the newly created database. As with your database, you can choose any username you prefer. Again, we’ve decided on ‘owncloud’ for the sake of clarity:
GRANT ALL ON owncloud.* to 'owncloud'@'localhost' IDENTIFIED BY'set_database_password';
  • Finally, perform the flush-privileges operation to make sure the running instance of MySQL is informed about the recent privilege assignment. Then quit the session.
FLUSH PRIVILEGES;

 

Configuration

  • To  begin, open your web browser and navigate to the following address:
https://server_domain_or_IP/owncloud
  • You will see this screen:

  • Create an admin account. Once you’re done,click on the Finish Setup button and then move over to the Storage & database link.
  • Select MySQL/MariaDB in the Configure the database section.
  • Finally, enter the database information that you have previously configured.
  • Click Finish Setup when you’re done and you will then be able to access the main interface.

 

Once you’ve completed all the steps, you’re done! Your data is now stored safely in a place that you control.

Leave a Reply