Professional Documents
Culture Documents
In this tutorial we are going to install the latest up to date version of ownCloud 9 (v9.0.2) on
CentOS 7. ownCloud requires the below softwares to run:
MySQL/MariaDB
PHP 5.5 +
Apache 2.4 with mod_php
# mysql_secure_installation
chmod +x ${ocpath}/occ
printf "chmod/chown .htaccess\n"
if [ -f ${ocpath}/.htaccess ]
then
chmod 0644 ${ocpath}/.htaccess
chown ${rootuser}:${htgroup} ${ocpath}/.htaccess
fi
if [ -f ${ocpath}/data/.htaccess ]
then
chmod 0644 ${ocpath}/data/.htaccess
chown ${rootuser}:${htgroup} ${ocpath}/data/.htaccess
fi
# chmod 755 /dirperm.sh
# ./dirperm.sh
# sudo -u apache ls -lisa /var/www/html/owncloud/data/
When you have Firewall and SELinux enabled on your Linux distribution, you may run into
permissions problems after a new ownCloud installation, and see permission denied errors in
your ownCloud logs. Run these commands as root:
# semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/owncloud/data'
# restorecon '/var/www/html/owncloud/data'
# semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/owncloud/config'
# restorecon '/var/www/html/owncloud/config'
# semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/owncloud/apps'
# restorecon '/var/www/html/owncloud/apps'
Allow access to a remote database
# setsebool -P httpd_can_network_connect_db on
Allow access to LDAP server
# setsebool -P httpd_can_connect_ldap on
Allow access to remote network
# setsebool -P httpd_can_network_connect on
Allow access to SMTP/sendmail
# setsebool -P httpd_can_sendmail on
Refresh the page and you should get the following:
Configure Database
To continue with the installation wizard, we need to create a database for ownCloud and a user to
access this database:
# mysql -u root -p
Enter password:
MariaDB [(none)]> create database ownclouddb;
MariaDB [(none)]> create user 'owncloudadmin'@'localhost' identified by 'Napas@kt2';
MariaDB [(none)]> grant all on ownclouddb.* to 'owncloudadmin'@'localhost' identified by
'password';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> exit
# set password for 'techonthenet'@'localhost' = password('newpassword');
Setup OwnCloud
Navigate your browser to http://Your-IP/owncloud, Enter the username, password & MariaDB
details, then hit Finish Setupbutton. It will take a while to complete the setup and you will be
redirected to admin page.
Setup Libre Office
Download and Extract
# wget
http://ftp5.gwdg.de/pub/tdf/libreoffice/stable/5.1.4/rpm/x86_64/LibreOffice_5.1.4_Linux_x86-
64_rpm.tar.gz
# tar -zxvf LibreOffice_5.1.4_Linux_x86-64_rpm.tar.gz C /tmp
Install and Configuration
# cd /tmp/LibreOffice.x.x.x/RPMS
# yum install *.rpm
# cd /var/www//html/owncloud/config/
# vi config.php
'preview_libreoffice_path' => '/usr/bin/libreoffice5.1',
# systemctl restart httpd
Enable SMB/CIFS
# yum install epel-release
Or
# rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/ epel-release-7-7.noarch.rpm
# rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
# yum install php-smbclient
# yum install samba-client