Building a Personal Cloud Storage: Setting Up ownCloud on CentOS 7

I would like to share with you my configuration for setting up a personal cloud storage using the open-source operating system, CentOS 7. I want to emphasize that I am not a professional Linux user, and if there are any errors or inaccuracies in what I have shared, please feel free to email me, and I will promptly correct them. My intention is simply to share what I have learned in creating this setup and hopefully provide assistance to those who are interested in learning more about using open-source software and applications.

Setting up a personal cloud storage using CentOS 7 can be a rewarding experience, even for those who are not seasoned Linux users. By leveraging the power of open-source technology, you can create a secure and flexible storage solution that puts you in control of your data.

First and foremost, it is essential to ensure that you have a working installation of CentOS 7. This involves downloading the CentOS 7 ISO file from the official website and following the installation process. Once you have successfully installed CentOS 7, you can proceed with setting up your personal cloud storage using the ownCloud application.

ownCloud is a popular open-source software that allows you to create your cloud storage, providing features such as file synchronization, sharing, and remote access. To install ownCloud, you will need to configure the necessary dependencies and set up a LAMP (Linux, Apache, MySQL, PHP) stack on your CentOS 7 system.

CentOS official website :

To begin, make sure you have Apache, MySQL, and PHP installed on your CentOS 7 server. You can install these components using the package manager, yum. Once the LAMP stack is in place, you will need to create a MySQL database and user for ownCloud.

Next, download the ownCloud package from the official website and extract it to the appropriate directory on your server. Set the correct permissions for the ownCloud files and configure the Apache web server to serve the ownCloud application.

Once the installation and configuration are complete, you can access the ownCloud web interface through your browser. Here, you can create user accounts, define storage quotas, and customize various settings according to your preferences. You can also install additional plugins and extensions to enhance the functionality of your personal cloud storage.

It is important to note that security should be a top priority when setting up your personal cloud storage. Ensure that you have implemented proper SSL/TLS encryption to protect data transmission and enforce strong passwords for user accounts. Regularly update both the operating system and ownCloud application to benefit from the latest security patches and bug fixes.

By sharing my configuration and experiences in building a personal cloud storage using CentOS 7 and ownCloud, I hope to inspire and assist others who are interested in exploring the possibilities of open-source software. The open-source community offers a wealth of resources, forums, and documentation that can further enhance your knowledge and understanding of Linux-based systems and applications.

Remember, the beauty of open source lies in its collaborative nature, and there is always room for learning and improvement. Let us continue to embrace the spirit of sharing and contribute to the growth and development of open-source technologies.

Need to Set-up first the Network Configuration

 Edit a Connection selected, press Enter
 select Edit and press Enter
vi /etc/sysconfig/network-scipts/ifcfg-enp2s0
vi /etc/sysconfig/network
vi /etc/resolv.conf
 nameserver x.x.x.x
 nameserver x.x.x.x
yum update
yum install nano
yum install net-tools
yum install httpd
yum install wget –y
You must have the LAMP (Linux, Apache, MySQL, PHP) stacked installed. 
Step 1. First, we need to install the latest Remi repository RPM suited to your architecture.
#yum install epel-release
#yum install epel-release-7.noarch.rpm
#yum repolist
#rpm -Uvh remi-release-7.rpm

Step 2. Install the necessary PHP packages.
#yum update
#yum install httpd php php-mysql sqlite php-dom php-mbstring php-gd php-pdo php-json php-xml php-zip php-gd curl php-curl php-mcrypt php-pear –y

Step 3. Install MySQL.
#yum install mysql-server

(If error exist no package available do this)

Install Mariadb
#yum -y install mariadb-server mariadb
#systemctl start mariadb.service or #systemctl start mariadb
#systemctl enable mariadb.service or #systemctl enable mariadb
#systemctl status mariadb

Install MySQL
sudo rpm -ivh mysql-community-release-el7-5.noarch.rpm
yum update
sudo yum install mysql-server
sudo systemctl start mysqld

Install Apache
 sudo yum clean all
 sudo yum -y update
 sudo yum -y install httpd
 sudo firewall-cmd --permanent --add-port=80/tcp
 sudo firewall-cmd --permanent --add-port=443/tcp
 sudo firewall-cmd --reload
 sudo systemctl start httpd
 sudo systemctl enable httpd
 sudo systemctl status httpd
 sudo systemctl stop httpd

Installation of ownCloud on Centos 7
Step: 1 Install PHP and Web Server (HTTPD)
Use below yum command to install php and apache web server (httpd) and other PHP dependencies.

 #yum install httpd php php-mysql sqlite php-dom php-mbstring php-gd php-pdo php-json php-xml php-zip php-gd curl php-curl php-mcrypt php-pear

Step: 2 Start the Web Server service
 #systemctl start httpd.service	
 #systemctl enable httpd.service ln -s'/usr/lib/systemd/system/httpd.service''/etc/systemd/system/'

Step: 3 Install ownCloud package using yum command.
ownCloud Package is not available in the default yum repositories so we will set below EPEL and ownlcoud repositories.
Note : Install wget package in case it is not installed on your system.

 # yum install wget
 # rpm -Uhv$(uname -i)/e/epel-release-7-5.noarch.rpm
 # wget -O /etc/yum.repos.d/ce:stable.repo
 # yum install owncloud
Allow Web Server’s port in the OS(Operating System) firewall.
 # firewall-cmd --permanent --zone=public --add-service=http
 # firewall-cmd --permanent --zone=public --add-service=https
 # firewall-cmd --reload

Set the required permissions on ownlcoud folder “/var/www/html/owncloud”
 # chown -R apache.apache /var/www/html/owncloud/

Set the below SELinux Rules if SELinux is enabled on your system
 # semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/owncloud/data'
 # restorecon '/var/www/html/owncloud/data'	
 # semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/owncloud/config'
 # restorecon '/var/www/html/owncloud/config'
 # semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/owncloud/apps'
 # restorecon '/var/www/html/owncloud/apps'	

Upgrading Owncloud to latest release
# wget