This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
computing:storage:owncloud_server [2017/08/09 15:55] gcooper |
— (current) | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== OwnCloud - Server ====== | ||
- | See also **[[computing: | ||
- | |||
- | http:// | ||
- | |||
- | http:// | ||
- | |||
- | * Synchronized cloud storage on your hardware | ||
- | * Virtualmin Pro has install script | ||
- | |||
- | ===== Server Side ===== | ||
- | |||
- | ==== Upgrading ==== | ||
- | |||
- | :!: We use the '' | ||
- | |||
- | https:// | ||
- | |||
- | https:// | ||
- | |||
- | <note warning> | ||
- | |||
- | as '' | ||
- | |||
- | < | ||
- | apt-get update | ||
- | apt-get dist-upgrade | ||
- | reboot | ||
- | </ | ||
- | |||
- | :!: Upgrading OwnCloud will leave the installation in **Maintenance Mode**. | ||
- | |||
- | Then, after logging back in as '' | ||
- | |||
- | < | ||
- | cd / | ||
- | sudo -u www-data php occ upgrade | ||
- | sudo -u www-data php occ maintenance: | ||
- | </ | ||
- | |||
- | ==== Installation ==== | ||
- | |||
- | :!: Smaller installations can just use **SQLite database for simplicity**. | ||
- | |||
- | === Virtualmin === | ||
- | |||
- | **Virtualmin -> < | ||
- | |||
- | - Browse to the OwnCloud URL | ||
- | - When prompted to create an admin user, enter your virtual server admin username and password | ||
- | |||
- | === Official Package Repositories === | ||
- | |||
- | https:// | ||
- | |||
- | === Ubuntu 16.04 === | ||
- | |||
- | Install updates: | ||
- | |||
- | < | ||
- | apt-get update | ||
- | apt-get upgrade | ||
- | reboot | ||
- | </ | ||
- | |||
- | Configure the package repository: | ||
- | |||
- | < | ||
- | wget -nv https:// | ||
- | apt-key add - < Release.key | ||
- | </ | ||
- | |||
- | Install OwnCloud: | ||
- | |||
- | < | ||
- | sh -c "echo 'deb http:// | ||
- | apt-get update | ||
- | apt-get install owncloud | ||
- | </ | ||
- | |||
- | Configure the MySQL database: | ||
- | |||
- | :!: Use your own password! | ||
- | |||
- | < | ||
- | mysql_secure_installation | ||
- | </ | ||
- | |||
- | Configure the database: | ||
- | |||
- | < | ||
- | #mysql -u root -p | ||
- | Enter password: | ||
- | |||
- | mysql> CREATE USER ' | ||
- | mysql> CREATE DATABASE ownclouddb; | ||
- | mysql> GRANT ALL ON ownclouddb.* TO ' | ||
- | mysql> FLUSH PRIVILEGES; | ||
- | mysql> exit | ||
- | </ | ||
- | |||
- | === CentOS 7 === | ||
- | |||
- | See also **[[computing: | ||
- | |||
- | < | ||
- | 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 ' | ||
- | CREATE DATABASE IF NOT EXISTS owncloud; | ||
- | GRANT ALL PRIVILEGES ON owncloud.* TO ' | ||
- | FLUSH PRIVILEGES; | ||
- | quit | ||
- | </ | ||
- | |||
- | === Firewall === | ||
- | |||
- | 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 '' | ||
- | firewall-cmd --permanent --zone=public --zone=internal --zone=work --zone=external --zone=dmz --add-port=2222/ | ||
- | firewall-cmd --reload | ||
- | </ | ||
- | |||
- | ==== Install ==== | ||
- | |||
- | http:// | ||
- | |||
- | Enable the repository and install OwnCloud: | ||
- | |||
- | < | ||
- | cd / | ||
- | wget http:// | ||
- | yum install owncloud | ||
- | </ | ||
- | |||
- | Enable the web server startup and reboot: | ||
- | |||
- | < | ||
- | systemctl enable httpd | ||
- | reboot | ||
- | </ | ||
- | |||
- | Reset permissions for better security: | ||
- | |||
- | < | ||
- | find / | ||
- | find / | ||
- | chown -R root:root / | ||
- | chown -R apache.apache / | ||
- | chown -R apache.apache / | ||
- | chown -R apache.apache / | ||
- | chown root.root / | ||
- | chown root.root / | ||
- | chown root.root / | ||
- | chcon -R -t httpd_sys_rw_content_t / | ||
- | chcon -R -t httpd_sys_rw_content_t / | ||
- | chcon -R -t httpd_sys_rw_content_t / | ||
- | </ | ||
- | |||
- | ==== NFS Storage ==== | ||
- | |||
- | Here we mount an NFS share as the OwnCloud data store: | ||
- | |||
- | < | ||
- | mount -t nfs ip.of.nfs.svr:/ | ||
- | |||
- | rsync -avr / | ||
- | |||
- | umount /mnt/ | ||
- | </ | ||
- | |||
- | Make it survive a reboot: | ||
- | < | ||
- | |||
- | vim /etc/fstab | ||
- | |||
- | # Mount the NFS data store | ||
- | ip.of.nfs.svr:/ | ||
- | |||
- | mount -a | ||
- | mount | ||
- | </ | ||
- | |||
- | :!: Verify and/or reset the permissions on the '' | ||
- | |||
- | ==== Force SSL (HTTPS) ==== | ||
- | |||
- | - Log into OwnCloud as the administrator using HTTPS | ||
- | - Click **'' | ||
- | - Scroll down to **Security -> Enforce HTTPS** | ||
- | |||
- | ===== Client Side ===== | ||
- | |||
- | ==== Sync Folder Location ==== | ||
- | |||
- | https:// | ||
- | |||
- | The default local sync folder is '' |