VPS

How to Install and Configure ownCloud on CentOS 7 VPS

Introduction

If you want to create a file sync/share server for your photos, backups, calendars or any other kind of data, ownCloud is the way to go. It’s a self-hosted open-source software focused towards simplicity and customization. While resembling services like Dropbox or Google Drive, ownCloud comes free of charge for anyone eager to try it on their computers or servers. In this tutorial, you will learn how to install and configure ownCloud on CentOS 7 VPS.

What you’ll need

Before you begin this guide you’ll need the following:

  • SSH root access to the VPS
  • LAMP stack

Step 1 — Installing ownCloud

CentOS does not have the ownCloud package in its default software repositories, however, ownCloud has its own dedicated repo for this matter. Firstly, import the release key:

rpm --import https://download.owncloud.org/download/repositories/stable/CentOS_7/repodata/repomd.xml.key

Then, run this command to download the actual repository:

curl -L https://download.owncloud.org/download/repositories/stable/CentOS_7/ce:stable.repo -o /etc/yum.repos.d/ownCloud.repo

Now we will introduce this package to Yum by clearing the cache:

yum clean expire-cache

Output should be similar to this:

Loaded plugins: fastestmirror
Cleaning repos: base ce_stable extras updates vz-base vz-updates
10 metadata files removed

Finally, install owncloud package by running standard yum install command:

yum install owncloud -y

You have just installed ownCloud package, now it’s time to create a database!

Step 2 — Creating database

Log in to MySQL by executing this command:

mysql -u root -p

Once prompted, enter the password that you initially set while installing the server.

Create a new database called owncloud:

CREATE DATABASE owncloud;

Now create a user and assign it to the owncloud database:

GRANT ALL ON owncloud.* to 'owncloud'@'localhost' IDENTIFIED BY 'password';

Change password to actual password which will be used with this user to access the database. After all is done, exit the MySQL:

exit

Database and user are ready, now we can proceed configuring ownCloud.

Step 3 — Setting up ownCloud

To reach ownCloud via browser use this URL:

https://domain_or_IP/owncloud

Once you access ownCloud, a warning will appear stating that certificate can not be trusted. You can ignore this, data transmissions are still encrypted. Alternatively, you can install fee SSL certificate from Let’s Encrypt to remove this warning. Similar screen should be present after the warning:

ownCloud CentOS7

Fill in Username and Password fields to create a new administrator account. Then, click on Storage & database.

ownCloud CentOS7

Leave data folder as is and click on MySQL/MariaDB under Configure the database section. Here you need to enter the database name and user which were created in Step 2.

After all is set just proceed further by clicking on Finish setup button.

ownCloud CentOS7

That’s it! You have successfully installed ownCloud, now you can upload data to your own personal cloud.

Conclusion

ownCloud installation was a quite simple process, you have installed new CentOS repository along with ownCloud itself on CentOS 7 VPS, then you created a database and specified configuration details in initial ownCloud setup. Now you can enjoy all the features that come with ownCloud.

About the author

Edgaras G.

Edgaras is a veteran server administrator at Hostinger. He makes sure that every server runs at full throttle and has all the latest technological advancements. When he's not working, Edgaras enjoys skiing and exploring the world.

Add Comment

Click here to post a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

[href]
[href]
More in VPS
How to Check Disk Space Usage in Linux

Close