Kamis, 10 Agustus 2017

Owncloud Centos7

How to Install ownCloud 9 on CentOS 7

ownCloud is an open source free cloud software that allows you to have a personal synching service. It is similar to the Dropbox cloud storage but operates on your own server. The software has been in the market for years now and has proven its robustness by all means. It is quick, secure, and easy to setup.
In this tutorial we are going to install the latest up to date version of ownCloud 9 (v9.0.2) on CentOS 7.  ownCloud requires the below softwares to run:
  • MySQL/MariaDB
  • PHP 5.4 +
  • Apache 2.4 with mod_php
We will choose to install MariaDB, PHP 5.5, and Apache 2.4

Install MariaDB 5.5

Run the below command to install MariaDB server and client. We will use MariaDB to connect ownCloud to its own MySQL database.
Start the MariaDB server:
Allow MariaDB to start during machine boot:
Configure MySQL to ensure it is secured and running:

Install Apache 2.4

ownCloud 9 has a friendly web interface. This requires the installation of Apache. Run the below command to install Apache 2.4.6
Start the Apache service
Add Apache to allow it to start during boot time:
To test if Apache is running fine, browse to your machine IP : http://your-machine-ip/
You should see the below Apache test page:
apache2

Install PHP 5.5

If you run “yum install php” you will be installing PHP v5.4. Unfortunately, this version is not supported anymore and has reached EOL. That is why ownCloud recommends installing PHP 5.5+ .
The first step is to install the SCL repository:
Then install PHP 5.5 and these modules:

Copy the PHP 5.5 Apache modules into place:
Then restart Apache:
Verify with phpinfo that your Apache server is using PHP 5.5 and loading the correct modules. Create a new file in the httpd directory:
Now we call that file in a browser http://your-machine-ip/info.php . You should get the below:
phpinfo

Install ownCloud 9 (v9.0.2)

Run the following shell commands as root to trust the repository:
Run the following shell commands as root to add the repository and install from there.
Clean expired cache to ensure you install the latest ownCloud files:
Install ownCloud:

Once done with the installation, browse to http://your-server-ip/owncloud . You should get the following page.
owncloud permissions
However, there are some directory permissions that need to be fixed in order to continue with the ownCloud 9 installation wizard.

Fix Permissons

ownCloud has created a bash script that fixes those permissions. Create a new file in the /tmp directory and give it execute permissions.
Add the below to the file we created:
Allow execute permissions to the file we created:
Output:

When you have SELinux enabled on your Linux distribution, you may run into permissions problems after a new ownCloud installation, and see permission denied errors in your ownCloud logs. Run these commands as root:

Refresh the page and you should get the following:
owncloud mysql


Configure Database

To continue with the installation wizard, we need to create a database for ownCloud and a user to access this database:
Run the below commands in order:

Choose MySQL as database and fill in the information needed and create a new admin user:
owncloud mysql

After finalizing the installation wizard, you will have a new ownCloud 9 installation ready to store data!
ownCloud 9.0.2 Web Interface

Congratulations! You’ve now have ownCloud 9 up and running. However, you have to know that it is accessible by everyone online. So make sure you follow up about hardening your ownCloud security by following this tutorial: https://doc.owncloud.org/server/9.0/admin_manual/configuration_server/harden_server.html 
If you need any help or have any questions, just comment below and I’ll be glad to assist you.

Tidak ada komentar:

Posting Komentar