Install Nextcloud 13 on Ubuntu 16

update your stuff

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

setup DB

apt-get install -y mariadb-server
mysql -uroot -p

CREATE DATABASE nextcloud;
GRANT ALL PRIVILEGES ON nextcloud.* TO ‘nextclouduser’@’localhost’ IDENTIFIED BY ‘secretpassword’;
FLUSH PRIVILEGES;
\q

Install webserver

sudo apt-get install apache2

Install PHP stuff

sudo apt-get install php7.0 libapache2-mod-php7.0 php7.0-mbstring php7.0-curl php7.0-zip php7.0-gd php7.0-mysql php7.0-mcrypt php7.0-bcmath php7.0-xml php7.0-json php7.0-tidy

Tweak apache

sudo a2enmod rewrite
sudo service apache2 restart

Download and extract Nexcloud

cd /opt

wget https://download.nextcloud.com/server/releases/nextcloud-13.0.1.zip

apt-get install unzip
sudo unzip nextcloud-13.0.1.zip
sudo mv nextcloud/ /var/www/html/
sudo chown www-data:www-data -R /var/www/html/nextcloud/

Virtual Host stuff for apache.

sudo touch /etc/apache2/sites-available/nextcloud.conf
sudo ln -s /etc/apache2/sites-available/nextcloud.conf /etc/apache2/sites-enabled/nextcloud.conf
sudo nano /etc/apache2/sites-available/nextcloud.conf

Then Paste this in it

<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot /var/www/html/nextcloud/
ServerName your-domain.com
ServerAlias www.your-domain.com
<Directory /var/www/html/nextcloud/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common
</VirtualHost>

restart apache

sudo service apache2 restart

Now finish off by going to your-nextcloud.com and fill in that stuff.

Adding SSL/HTTPS to your cloud:

follow this site: https://www.tecmint.com/install-free-lets-encrypt-ssl-certificate-for-apache-on-debian-and-ubuntu/

 

Be the first to comment

Leave a Reply