Current location - Quotes Website - Personality signature - How to install and configure a private cloud on CentOS 7
How to install and configure a private cloud on CentOS 7
OwnCloud is a file sharing server that allows you to store your personal content, such as documents and pictures, in a centralized location, just like Dropbox. The difference of ownCloud is that it is free and open source, allowing anyone to use and check. It also returns the control and security of sensitive data to you, thus eliminating the use of third-party cloud hosting services.

We installed and configured the ownCloud instance on the CentOS 7 server.

prerequisite

The following contents are required:

Sudo users on the server: You can create users with Sudo privileges according to the CentOS 7 Initial Server Setup Guide.

A LAMP stack: ownCloud needs a Web server, a database and PHP to work properly. Set up LAMP stack (Linux, Apache, MySQL and PHP) servers to meet all these requirements. Follow this guide to install and configure the software.

In order to make full use of all the functions provided by ownCloud, please make sure to install the following PHP modules: php-gd, php-intl, php-mbstring, php-process and php-xml.

SSL certificate: How to set up SSL certificate depends on whether you have a domain name resolved to your server.

If you have a domain name ... the easiest way to secure a website is to use Let's Encrypt, which provides a free trusted certificate. According to Apache's Let's Encrypt guide.

If you don't have a domain name ... and you use this configuration for testing or personal use, you can use a self-signed certificate. This provides the same type of encryption, but no domain authentication. According to Apache's self-signed SSL guide.

Step 1- Install ownCloud

The ownCloud server package does not exist in the default repository of CentOS. However, ownCloud maintains a dedicated repository for the distribution.

First, use the rpm command to import its publishing key. This key authorizes the package manager yum to trust the repository.

sudo rpm-import mon . no arch 0: 1 . 6 . 3-2 . el7 libxau . x86 _ 64 0: 1 . 0 . 8-2. 1 . el7

lib xpm . x86 _ 64 0:3 . 5 . 1 1-3 . el7 libpng . x86 _ 64 2: 1 . 5 . 13-7 . el7 _ 2 libxcb . x86 _ 64 0: 1 . 1 1-4 . el7

libxslt . x86 _ 64 0: 1. 1.28-5.el7 own cloud-deps-PHP 5 . no arch 0:9. 1. 1- 1.2 own cloud-files . no arch 0:9. 1. 1- 1.2

PHP-GD . x86 _ 64 0:5 . 4 . 16-36.3 . el7 _ 2 PHP-LDAP . x86 _ 64 0:5 . 4 . 16-36.3 . el7 _ 2 PHP-mbstring . x86 _ 64 0:5 . 4 . 16-36.3 . el7 _ 2

PHP-process . x86 _ 64 0:5 . 4 . 16-36.3 . el7 _ 2 PHP-XML . x86 _ 64 0:5 . 4 . 16-36.3 . el7 _ 2t 1 lib . x86 _ 64 0:5. 1.2- 14 . el7

It's done.

After installing the ownCloud server, we will continue to set up the database for its use.

Step 2- Create MySQL Database

First, log in to MySQL with an administrative account:

mysql -u root -p

When installing the database server, enter the password set for the MySQL root user.

OwnCloud needs a separate database to store management data. Although you can call this database whatever you want, we decided to keep the name of owncloud simple.

Create database owncloud

Note: Each MySQL statement must start with a semicolon (; ) end. If you encounter a problem, be sure to check whether it exists.

Next, create a separate MySQL user account to interact with the newly created database. From the point of view of management and security, it is a good idea to create a single-function database and account. Just like naming a database, choose your favorite user name. In this guide, we choose to use the owncloud name.

Grant all permissions on the owncloud. * To "owncloud" @ "localhost" identified by "set_database_password";

Warning: Make sure to put the actual password in the location where the command is located: set_database_password.

Assign access rights to the database through users and perform the flush-privileges operation to ensure that the running MySQL instance knows the latest rights assignment:

Refresh privileges;

This is the end of MySQL configuration, and we will exit the session by typing the following command:

export

After the installation of the ownCloud server and database setup are completed, we are ready to turn our attention to configuring the ownCloud application.

Step 3- Configure ownCloud

To access the ownCloud Web interface, open a Web browser and navigate to the following address:

https://server _ domain _ or _ IP/own cloud

If you use a self-signed certificate, you may receive a warning because the certificate is not signed by a trusted authority of the browser. This is expected and normal. We are only interested in the encryption aspect of the certificate, not the third-party verification of the authenticity of our host. Click the corresponding button or link to enter the ownCloud Settings page.

You should see this:

Create an administrator account by selecting a user name and password. For security reasons, it is not recommended to use "admin" as the user name.

Click the Storage and Database link, and then click the Finish Setup button:

Keep the data folder settings and click the MySQL/MariaDB button in the Configuration Database section.

Enter the database information configured in the previous step. The following examples match the database credentials we use in this guide:

Click the "Finish Setup" button to log in to ownCloud. A safe home, all data splash screens should appear:

Click the X in the upper right corner of the startup screen to enter the main interface:

Here, you can create files or upload files to your personal cloud.