User Tools

Site Tools


computing:storage:owncloud_server

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
computing:storage:owncloud_server [2018/03/15 11:10]
gcooper
— (current)
Line 1: Line 1:
-====== OwnCloud - Server ====== 
- 
-See also **[[computing:storage:owncloud_client|OwnCloud - Client]]** 
- 
-**Deployment Recommendations**: https://doc.owncloud.com/server/10.0/admin_manual/installation/deployment_recommendations.html 
- 
-**Ubuntu Server Howto**: https://www.marksei.com/install-owncloud-10-server-ubuntu/ 
- 
-**OSS**: http://owncloud.org 
- 
-**Enterprise**: http://owncloud.com 
- 
-  * Synchronized cloud storage on your hardware 
-  * Virtualmin Pro has install script 
- 
-===== Upgrade ===== 
- 
-:!: 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 
- 
-<note warning>Using the OwnCloud web interface, make a backup before upgrading!</note> 
- 
-as ''root'': 
- 
-<file> 
-apt-get -y update && apt-get -y dist-upgrade && apt-get -y autoremove && reboot 
-</file> 
- 
-:!: Upgrading OwnCloud will leave the installation in **Maintenance Mode**. 
- 
-Then, after logging back in as ''root'': 
- 
-<file> 
-cd /var/www/owncloud/ 
-sudo -u www-data php occ upgrade 
-sudo -u www-data php occ maintenance:mode --off 
-</file> 
- 
-===== Install ===== 
- 
-:!: Smaller installations can just use **SQLite database for simplicity**. 
- 
-==== Using Virtualmin Install Script ==== 
- 
-**Virtualmin -> <domain> -> Install Scripts -> Available Scripts -> OwnCloud** 
- 
-  - Browse to the OwnCloud URL 
-  - When prompted to create an admin user, enter your virtual server admin username and password 
- 
-==== Using Official Repos ==== 
- 
-https://download.owncloud.org/download/repositories/stable/owncloud/ 
- 
-=== Ubuntu 16.04 === 
- 
-Install updates: 
- 
-<file> 
-apt-get -y update && apt-get -y dist-upgrade && apt-get -y autoremove && reboot 
-</file> 
- 
-Configure the package repository: 
- 
-<file> 
-curl https://download.owncloud.org/download/repositories/10.0/Ubuntu_16.04/Release.key | apt-key add - 
-</file> 
- 
-Install OwnCloud: 
- 
-<file> 
-sh -c "echo 'deb https://download.owncloud.org/download/repositories/10.0/Ubuntu_16.04/ /' > \ 
-  /etc/apt/sources.list.d/owncloud.list" 
-apt-get update 
-apt-get install owncloud-files apache2 libapache2-mod-php7.0 php7.0-gd php7.0-json php7.0-mysql \ 
-  php7.0-curl php7.0-mbstring php7.0-intl php7.0-mcrypt php-imagick php7.0-xml php7.0-zip \ 
-  mysql-server 
-</file> 
- 
-Configure the database: 
- 
-<file> 
-mysql -u root -p 
-</file> 
- 
-<file> 
-CREATE USER 'ownclouduser'@'localhost' IDENTIFIED BY 'YOURPASSWORD'; 
-CREATE DATABASE ownclouddb; 
-GRANT ALL ON ownclouddb.* TO 'ownclouduser'@'localhost'; 
-FLUSH PRIVILEGES; 
-exit 
-</file> 
- 
-=== CentOS 7 === 
- 
-See also **[[computing:linux:minimal_centos_install|Minimal CentOS Install]]** 
- 
-<file> 
-yum install mod_ssl openssl php-pdo php-gd php-mysql mariadb-server mariadb php5-mcrypt 
-</file> 
- 
-Secure the fresh MySQL (MariaDB) installation and configure for auto-start (initial MySQL password is blank): 
- 
-<file> 
-systemctl start mariadb && systemctl enable mariadb 
- 
-mysql_secure_installation 
-</file> 
- 
-Prepare the MySQL database: 
- 
-<file> 
-mysql -u root -p 
-</file> 
- 
-<file> 
-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 
-</file> 
- 
-== Install == 
- 
-http://software.opensuse.org/download/package?project=isv:ownCloud:community&package=owncloud 
- 
-Enable the repository and install OwnCloud:  
- 
-<file> 
-cd /etc/yum.repos.d/ 
-wget http://download.opensuse.org/repositories/isv:ownCloud:community/RedHat_RHEL-7/isv:ownCloud:community.repo 
-yum install owncloud 
-</file> 
- 
-Enable the web server startup and reboot: 
- 
-<file> 
-systemctl enable httpd 
-reboot 
-</file> 
- 
-Reset permissions for better security: 
- 
-<file> 
-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 
-</file> 
- 
-===== Firewall ===== 
- 
-See also **[[networking:firewall:csf|ConfigServer Security & Firewall (CSF)]]** 
- 
-==== Ubuntu ==== 
- 
-<file> 
-ufw allow http 
-ufw allow https 
-</file> 
- 
-==== CentOS ==== 
- 
-Open ports in the firewall: 
- 
-<file> 
-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 
-</file> 
- 
-===== NFS Storage ===== 
- 
-Here we mount an NFS share as the OwnCloud data store: 
- 
-<file> 
-mount -t nfs ip.of.nfs.svr:/path/to/owncloud /mnt/ 
- 
-rsync -avr /var/www/html/owncloud/data/* /mnt/ 
- 
-umount /mnt/ 
-</file> 
- 
-Make it survive a reboot: 
-<file> 
- 
-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 
-</file> 
- 
-:!: Verify and/or reset the permissions on the ''data'' folder as above. 
- 
-===== Force SSL (HTTPS) ===== 
- 
-  - Log into OwnCloud as the administrator using HTTPS 
-  - Click **''adminusername'' -> Admin** 
-  - Scroll down to **Security -> Enforce HTTPS** 
  
computing/storage/owncloud_server.1521133844.txt.gz · Last modified: 2018/03/15 11:10 by gcooper