yum -y install centos-release-scl wget http://download.owncloud.org/download/repositories/stable/CentOS_7/ce:stable.repo -O /etc/yum.repos.d/ce:stable.repo
yum install nfs-utils mariadb-server bzip2 policycoreutils-python yum install httpd -t yum install php55 php55-php-gd php55-php-mbstring php55-php-xml php55-php-mysqlnd php55-php php55-php-ldap
cp /opt/rh/httpd24/root/etc/httpd/conf.d/php55-php.conf /etc/httpd/conf.d cp /opt/rh/httpd24/root/etc/httpd/conf.modules.d/10-php55-php.conf /etc/httpd/conf.modules.d/ cp /opt/rh/httpd24/root/etc/httpd/modules/libphp55-php5.so /etc/httpd/modules/ ln -s /opt/rh/php55/root/etc/php.ini /etc/php.ini
systemctl enable httpd.service systemctl start httpd.service systemctl enable mariadb.service systemctl start mariadb.service
yum install owncloud-files
mysql_secure_installation mysql -u root -p
Create database called clouddb
create database clouddb;
Allow clouddbuser to access the clouddb database on localhost with predefined password.
grant all on clouddb.* to 'clouddbuser'@'localhost' identified by 'password'; flush privileges;
setsebool -P httpd_unified 1 setsebool -P httpd_can_sendmail 1 setsebool -P httpd_can_connect_ldap 1 setsebool -P httpd_use_nfs 1
I am using NFS mount for data mounted on /mnt/data
. . [2a02:22a0:bbb7:403::3]:/mnt/hdd/owncloud /mnt/data nfs _netdev,rw,vers=3,auto 0 0
mkdir /mnt/data mount -a chown apache. /mnt/data
Click on lower left + (Apps) as admin user. Enable LDAP user and group backend
click on user admin (top right) and choose Admin.
On server tab:
localhost port 389 cn=Manager,dc=mail,dc=helux,dc=nl PASSWORD dc=mail,dc=helux,dc=nl
On User filter tab:
only those object classes: mailUser
On Login filter tab:
Other Attributes: mail
On Group filter tab:
Edit raw filter instead: (&(|(objectclass=mailDomain)(objectclass=mailUser)))
On Advanced tab:
Directory settings: User Display Name Field: cn Base User Tree: o=domains,dc=mail,dc=helux,dc=nl Group Display Name Field: cn Base Group Tree: o=domains,dc=mail,dc=helux,dc=nl Group-Member association: uniqueMember Special Attributes: Quota Field: Quota Default: Email Field: mail
Disable TLS LDAP. Owncloud does not work with it very well.
mysql -u root -p use clouddb; update oc_appconfig set configvalue=0 where configkey="ldap_tls";
. . 'trusted_domains' => array ( 0 => 'cloud.local.rtd.helux.nl', 1 => 'cloud.helux.nl', ), 'datadirectory' => '/data/owncloud', 'overwrite.cli.url' => 'http://cloud.local.rtd.helux.nl/owncloud', 'overwritehost' => 'cloud.helux.nl', 'overwriteprotocol' => 'https', 'overwritewebroot' => '/', . .
sed -i '/post_max_size/c\post_max_size = 2G' /etc/php.ini sed -i '/cgi.fix_pathinfo/c\cgi.fix_pathinfo = 0' /etc/php.ini sed -i '/upload_max_filesize/c\upload_max_filesize = 2G' /etc/php.ini sed -i '/date.timezone/c\date.timezone = "UTC"' /etc/php.ini
. . php_value upload_max_filesize 2G php_value post_max_size 2G php_value memory_limit 2G . .