Installing Nextcloud 11 on RHEL7 using rh-php70


  • Apache
    default package
    yum install httpd
  • mariadb
    default package
    yum install mariadb-server

    create db + user with all privileges on this db

  • PHP
    As Nextcloud requires 5.6+ and RHEL7 offers 5.4.x I chose RH-PHP70 from scl

    subscription-manager repos --enable rhel-server-rhscl-7-eus-rpms 

    yum install rh-php70 rh-php70-php-fpm rh-php70-php-mysqlnd rh-php70-php-mbstring rh-php70-php-gd

Nextcloud Installation

  • Prepare data-directory out of /var/www for Nextcloud data files
  • Package nextcloud-11.0.0 from
  • As the server can only connect to internet via proxy
    add: 'proxy' => 'http://myproxy:1234',

Setting up owncloud on RHEL7 / CENTOS7


Minimal server

Required packages:

yum install httpd php php-mysql mariadb-server mariadb php-dom php-mbstring php-gd php-pdo wget


mc bash-completion


Disable selinux





Setup Firewall – choose http/https or both

firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd –reload


systemctl start httpd.service
systemctl enable httpd.service
systemctl start mariadb.service
systemctl enable mariadb.service


 Extract + set owner to apache:apache
Create DB, all perms to serviceaccount
Set up vhost
Set up certificate
Edit configfile (typ: /var/www/html/owncloud/config/config.php

new disk for owncloud

  1. pvcreate /dev/sdb

    vgcreate VG_ownclouddata /dev/sdb

    lvcreate -n LV_ownclouddata -L 80G VG_ownclouddata

    mkfs.ext3 /dev/VG_ownclouddata/LV_ownclouddata
  2. fstab add:
    /dev/mapper/VG_ownclouddata-LV_ownclouddata /var/www/html/owncloud/data ext4 rw 0 0