User Tools

Site Tools


computing:storage:owncloud

This is an old revision of the document!


OwnCloud

http://owncloud.org/

http://fedoraproject.org/wiki/OwnCloud

  • Synchronized cloud storage on your hardware
  • Virtualmin Pro has install script

Installation

Virtualmin

Virtualmin → <domain> → Install Scripts → Available Scripts → OwnCloud

  1. Browse to the OwnCloud URL
  2. When prompted to create an admin user, enter your virtual server admin username and password

CentOS 7

See also Minimal CentOS Install

:!: Smaller installations should just use SQLite database for simplicity.

Install prerequisites:

yum install mod_ssl openssl php-pdo php-gd php-mysql mariadb-server mariadb

MySQL Database

:!: Use your own password!

Secure the fresh MySQL (MariaDB) installation and configure for auto-start (initial MySQL password is blank):

systemctl start mariadb && systemctl enable mariadb

mysql_secure_installation

Prepare the MySQL database:

mysql -u root -p
CREATE USER 'owncloud'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE IF NOT EXISTS owncloud;
GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
quit

Firewall

Open ports in the firewall:

firewall-cmd --permanent --zone=public --add-service=http --add-service=https
firewall-cmd --permanent --add-port=2222/tcp      #if you change SSH to the non-standard port ''2222''
firewall-cmd --reload

OwnCloud

http://software.opensuse.org/download/package?project=isv:ownCloud:community&package=owncloud

Enable the repository and install OwnCloud:

cd /etc/yum.repos.d/
wget http://download.opensuse.org/repositories/isv:ownCloud:community/RedHat_RHEL-7/isv:ownCloud:community.repo
yum install owncloud

Enable the web server startup and reboot:

systemctl enable httpd
reboot

Reset permissions for better security:

find /var/www/html/owncloud -type d -exec chmod 775 {} \;
find /var/www/html/owncloud -type f -exec chmod 664 {} \;
chown -R root:root /var/www/html/owncloud
chown apache.apache /var/www/html/owncloud/config/config.php
chown -R apache.apache /var/www/html/owncloud/data
chown root.root /var/www/html/owncloud/data/.htaccess
chown apache.apache /var/www/html/owncloud/apps

NFS Storage

Here we mount an NFS share as the OwnCloud data store:

mount -t nfs ip.of.nfs.svr:/path/to/owncloud /mnt/

rsync -avr /var/www/html/owncloud/data/* /mnt/

umount /mnt/

Make it survive a reboot:

vim /etc/fstab

# Mount the NFS data store
ip.of.nfs.svr:/path/to/owncloud        /var/www/html/owncloud/data/  nfs  _netdev,context="system_u:object_r:httpd_sys_rw_content_t:s0"  0 0

mount -a
mount

:!: Verify and/or reset the permissions on the data folder as above.

Force SSL (HTTPS)

  1. Log into OwnCloud as the administrator using HTTPS
  2. Click adminusername → Admin
  3. Scroll down to Security → Enforce HTTPS
computing/storage/owncloud.1416850897.txt.gz · Last modified: 2014/11/24 10:41 by gcooper