Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

Install OwnCloud

cat <<EOL>owncloud_ubuntu16.sh
#!/bin/bash
#https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-owncloud-on-ubuntu-16-04
sudo curl https://download.owncloud.org/download/repositories/stable/Ubuntu_16.04/Release.key | sudo apt-key add -
echo 'deb https://download.owncloud.org/download/repositories/stable/Ubuntu_16.04/ /' | sudo tee /etc/apt/sources.list.d/owncloud.list
sudo apt-get update
sudo apt-get install -y owncloud mysql-client mysql-server
EOL
chmod +x owncloud_ubuntu16.sh
./owncloud_ubuntu16.sh

Create New MySqlDB

mysql -u root -p
CREATE USER 'ownclouduser'@'localhost' IDENTIFIED BY 'YOURPASSWORD';
CREATE DATABASE ownclouddb;
GRANT ALL ON ownclouddb.* TO 'ownclouduser'@'localhost';
FLUSH PRIVILEGES;
exit

Finding Newly Created files

/var/www/owncloud/occ files:scan --all

Default Permissions for Files

chown www-data:www-data
chmod 644

Bonus : Forward root of domain to /owncloud if desired

sudo sh -c 'echo "RedirectMatch ^/$ /owncloud/" >> /etc/apache2/apache2.conf' && rm /var/www/html/index.html && sudo service apache2 restart
  • No labels