This is an old revision of the document!
See also OwnCloud - Client
We use the
apt
package manager to install and maintain OwnCloud.
https://doc.owncloud.org/server/9.1/admin_manual/maintenance/package_upgrade.html
https://doc.owncloud.org/server/9.0/admin_manual/maintenance/update.html
as root
:
apt-get -y update && apt-get -y dist-upgrade && apt-get -y autoremove && reboot
Upgrading OwnCloud will leave the installation in Maintenance Mode.
Then, after logging back in as root
:
cd /var/www/owncloud/ sudo -u www-data php occ upgrade sudo -u www-data php occ maintenance:mode --off
Smaller installations can just use SQLite database for simplicity.
Virtualmin → <domain> → Install Scripts → Available Scripts → OwnCloud
Install updates:
apt-get update apt-get upgrade reboot
Configure the package repository:
wget -nv https://download.owncloud.org/download/repositories/stable/Ubuntu_16.04/Release.key -O Release.key apt-key add - < Release.key
Install OwnCloud:
sh -c "echo 'deb http://download.owncloud.org/download/repositories/stable/Ubuntu_16.04/ /' > /etc/apt/sources.list.d/owncloud.list" apt-get update apt-get install owncloud mcrypt
Configure the database:
mysql -u root -p
CREATE USER 'ownclouduser'@'localhost' IDENTIFIED BY 'YOURPASSWORD'; CREATE DATABASE ownclouddb; GRANT ALL ON ownclouddb.* TO 'ownclouduser'@'localhost'; FLUSH PRIVILEGES; exit
See also Minimal CentOS Install
yum install mod_ssl openssl php-pdo php-gd php-mysql mariadb-server mariadb php5-mcrypt
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/owncloud -type d -exec chmod 775 {} \; find /var/www/owncloud -type f -exec chmod 664 {} \; chown -R root:root /var/www/owncloud chown -R www-data.www-data /var/www/owncloud/config chown -R www-data.www-data /var/www/owncloud/data chown -R www-data.www-data /var/www/owncloud/apps chown root.root /var/www/owncloud/.htaccess chown root.root /var/www/owncloud/config/.htaccess chown root.root /var/www/owncloud/data/.htaccess chcon -R -t httpd_sys_rw_content_t /var/www/owncloud/config chcon -R -t httpd_sys_rw_content_t /var/www/owncloud/data chcon -R -t httpd_sys_rw_content_t /var/www/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
→ Adminhttps://doc.owncloud.org/desktop/1.8/navigating.html#adding-a-folder
The default local sync folder is ownCloud
, in your home directory.