This is an old revision of the document!
http://fedoraproject.org/wiki/OwnCloud
Virtualmin → <domain> → Install Scripts → Available Scripts → OwnCloud
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
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
Open ports in the firewall:
firewall-cmd --permanent --zone=public --add-service=http --add-service=https # Use the next line if you change SSH to the non-standard port ''2222'' firewall-cmd --permanent --zone=public --zone=internal --zone=work --zone=external --zone=dmz --add-port=2222/tcp firewall-cmd --reload
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 -R apache.apache /var/www/html/owncloud/config chown -R apache.apache /var/www/html/owncloud/data chown -R apache.apache /var/www/html/owncloud/apps chown root.root /var/www/html/owncloud/.htaccess chown root.root /var/www/html/owncloud/config/.htaccess chown root.root /var/www/html/owncloud/data/.htaccess chcon -R -t httpd_sys_rw_content_t /var/www/html/owncloud/config chcon -R -t httpd_sys_rw_content_t /var/www/html/owncloud/data chcon -R -t httpd_sys_rw_content_t /var/www/html/owncloud/apps
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.
adminusername
→ Admin