NextCloud is a free open-source self-facilitated distributed storage arrangement. It’s practically like Dropbox. Restrictive distributed storage arrangements (Dropbox, Google Drive, and so forth) are helpful, however at a value: they can be utilized to gather individual information on the grounds that your documents are put away on their PCs. On the off chance that you stressed over protection, you can change to NextCloud, which you can introduce on your private home worker or on a virtual private worker (VPS). You can transfer your documents to your worker through NextCloud and afterward sync those records to your personal computer, PC or advanced cell. This way you have full control of your information.
sudo apt-get update
sudo apt-get install apache2 -y
curl -I localhost
sudo apt-get install php php-zip php-xml php-json php-gd libapache2-mod-php php-mysql php-curl php-mbstring -y
apt-get install mariadb-server mariadb-client -y
Press Y button to continue and save new password to login MariaDB access.
Remove the antonymous users from the MariaDB server Press Y for that.
Now you will be asked for the remove the test database from MariaDB server Press Y button for the same.
In the final step, You need to update the tables privileges by pressing the Y button.
Now, We are about to create database and user with permission for Nextcloud, Use the given command for the same.
Login in MariaDB shell
sudo mysql -u root -p
Create a database for nextcloud, You can change the details for security perpose.
Execute the given command one by one.
CREATE DATABASE nextcloud;
CREATE USER 'nextcloud'@'localhost' IDENTIFIED BY 'MYPASSWORD';
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost';
Sample output like this.
apt-get install unzip -y
rsync -azvh nextcloud/* /var/www/html/
chown -R www-data:www-data /var/www/html/*
chmod -R ugo+rw /var/www/html/*
systemctl restart apache2
ufw allow 80
As you can see the i have entered my MariaDB database credentials and uncheck the Install recommended apps and click on Finish setup button.
Here you will get the information about NextCloud service and information just click on next icon to get next page.
We have successfully installed NextCloud in our Ubuntu 18.04 server.