This is an old revision of the document!
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 httpd mariadb-server bzip2 policycoreutils-python yum install php55 php55-php-gd php55-php-mbstring php55-php-xml php55-php-mysqlnd php55-php php55-php-ldap #yum install php-mysql php-ldap php php-gd php-mbstring php-xml bzip2 policycoreutils-python systemctl enable httpd.service systemctl start httpd.service systemctl enable mariadb.service systemctl start mariadb.service
yum install owncloud
wget https://download.owncloud.org/community/owncloud-7.0.4.tar.bz2 tar -xvjf owncloud-7.0.4.tar.bz2 -C /var/www/html/ chown -R apache. /var/www/html/owncloud
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
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/owncloud/data' restorecon -Rv '/var/www/html/owncloud/data'
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/owncloud/config' restorecon -Rv '/var/www/html/owncloud/config'
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/owncloud/apps' restorecon -Rv '/var/www/html/owncloud/apps'
<IfModule mod_alias.c> Alias /owncloud /var/www/html/owncloud </IfModule> <Directory "/var/www/html/owncloud"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny allow from all </Directory>
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 . .
There is a bug in the SSL crap of owncloud so here is a quick fix.
on line 73 add the following:
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);