Why?


Search This Blog

Saturday, October 8, 2016

owncloud 9.1 install on CentOS 7


Fresh install CentOS 7 minimal.

Disable selinux and reboot server.

Update OS and then reboot.

yum -y update
reboot

Run the below command to install MariaDB server and client, httpd server, and PHP. We will use MariaDB to connect ownCloud to its own MySQL database.

yum -x php-mysqlnd -y install mariadb-server mariadb* httpd php* wget

Enable the services.

systemctl enable mariadb
systemctl enable httpd
systemctl start mariadb
systemctl start httpd

Check that these are installed and running.

php -v
systemctl status mariadb
systemctl status httpd

Secure you MySQL server (mariadb). In this example i set the password as mypassword.

mysql_secure_installation
Remove anonymous users? [Y/n] y
 ... Success!
Disallow root login remotely? [Y/n] n
 ... skipping.
Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!
Reload privilege tables now? [Y/n] y
 ... Success!


Now log into mysql.

mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 5.5.50-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.00 sec)

MariaDB [(none)]> quit
Bye


Check the httpd service with your we browser.

http://your_ip_here/


Install owncloud 9.1

Run the following commands as root to trust the repository, install the repo, and install owncloud.

rpm --import https://download.owncloud.org/download/repositories/9.1/CentOS_7/repodata/repomd.xml.key
wget http://download.owncloud.org/download/repositories/9.1/CentOS_7/ce:9.1.repo -O /etc/yum.repos.d/ce:9.1.repo
yum clean expire-cache
yum -y install owncloud-files

Once done with the installation, browse to http://your_ip_here/owncloud/

At the bash shell cli create directory to store your data and change the permissions to that directory.

mkdir /owncloud
chown apache:apache /owncloud
chmod 771 /owncloud

Now back to the web UI of owncloud

Supply admin login and admin password.
Click on Storage & database drop down and supply path for data files, select MySQL/MariaDB and supply user root and root password for your MySQL database and choose owncloud for your database.


Install your clients and enjoy!

No comments:

Post a Comment