Installing OwnCloud 10.0.2 / Debian 9.0

Setup Pre req.

apt-get update && apt-get upgrade -y

apt-get install unzip nano apache2 mysql-server

apt-get install libapache2-mod-php

apt-get install php-gd php-json php-mysql php-curl

apt-get install php-intl php-mcrypt php-imagick

apt-get install php-mbstring php-xml php-zip


Finish the mariadb install

mysql_install_db
/usr/bin/mysql_secure_installation

Setup OwnCloud Database

mysql -u root -p
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE OwnCloud2017;
GRANT ALL PRIVILEGES ON OwnCloud2017.* TO 'sesipod'@'localhost' WITH GRANT OPTION;
EXIT

—-

Download latest owncloud

wget https://download.owncloud.org/community/owncloud-10.0.2.zip
unzip owncloud-10.0.2.zip
mv owncloud /var/www/

Setup Apache 2 default file.

cd /etc/apache2/sites-available/

nano 000-default.conf

<VirtualHost *:80>
        ServerName owncloud.sesipod.info
        ServerAdmin [email protected]
        DocumentRoot /var/www/owncloud
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        <Directory "/var/www/owncloud">
        AllowOverride All
        # Allow open access:
        Require all granted
        </Directory>
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

service apache2 restart

Set proper permissions for 'data' folder

chown -R www-data:www-data /var/www/owncloud/


Fix .htaccess file

/var/www/owncloud/data

chmod 664 .htaccess