Login with root permissions
sudo su
copy and paste the following and hit enter
apt install -y libapache2-mod-php7.0 \ php7.0-gd php7.0-json php7.0-mysql php7.0-curl \ php7.0-intl php7.0-mcrypt php-imagick \ php7.0-zip php7.0-xml php7.0-mbstring
Restart Apache2
service apache2 restart
Add the owncloud repository
echo 'deb http://download.owncloud.org/download/repositories/production/Ubuntu_16.04/ /' > /etc/apt/sources.list.d/owncloud.list
Update our sources list
apt-get update
Install Owncloud
apt-get install owncloud-files
login to the mysql prompt
mysql -u root -p
Create the owncloud database
CREATE DATABASE owncloud;
Create mysql user and grant access to the owncloud database
CREATE USER ‘owncloud’@‘localhost' IDENTIFIED BY ‘password’;
GRANT ALL ON owncloud.* to 'owncloud'@'localhost';
FLUSH PRIVILEGES;
exit
nano /etc/apache2/sites-available/000-default.conf
service apache2 restart