Install & Konfigurasi Nextcloud (Private Cloud Storage)


 

Nextcloud adalah client server software yang menyediakan layanan mirip Dropbox, Google Drive atau juga iCloud. Anda bisa mengumpulkan sejumlah file Anda untuk bisa diakses dengan internet, dari mana pun Anda berada dan kapanpun Anda mau.

Tak hanya itu, Anda juga bisa membagikan file tersebut ke teman-teman atau relasi Anda. Hal ini kerap disederhanakan menjadi istilah Cloud Storage. Tapi secara teknis, layanan satu ini tak cuma bisa melakukan itu saja.

Berikut installasi konfigurasinya : 


install Apache, PHP and its required modules, and MariaDB 

sudo apt install apache2 libapache2-mod-php php-cli php-fpm php-json php-intl php-imagick php-pdo php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath mariadb-server


When the whole process is finished, make sure that in the firewall you have open ports 80 and 443.

sudo ufw allow 80

sudo ufw allow 443

Now you have to configure MariaDB, setting a root password. To achieve this, run.

sudo mysql_secure_installation

As soon as you start it, you will be prompted to log in by pressing Enter. Then, you will be able to change the root password and finally, answer the following configuration questions.

Remove anonymous users [Y/n]

Disallow root login remotely [Y/n] 

Remove test database and access to it [Y/n]

Reload privilege tables now [Y/n] 


Create a new database on MariaDB for Nextcloud

The next step is to create a new database and user for Nextcloud.So, access the MariaDB console:

sudo mysql -u root -p

Create the new user to avoid working with the user root.

CREATE USER 'nextcloud'@'localhost' identified by 'passw';

Of course, you can change the username and the password value.

Now, create the new database:

CREATE DATABASE nextcloud;

You can also assign another name to it.

Set appropriate permissions on the new database to the user.

GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost';

Refresh permissions.

FLUSH PRIVILEGES;

And exit the console:

quit


Download and install Nextcloud

First, install the unzip and wget packages to be able to download and unzip Nextcloud.

sudo apt install wget unzip

Now, perform the download:

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

Now unzip the file you downloaded:

unzip nextcloud-27.0.2.zip -d /var/www/html

Make the user www:data the owner of the folder and set the appropriate permissions.

sudo chown -R www-data:www-data /var/www/html/nextcloud

sudo chmod -R 755 /var/www/html/nextcloud

Create a new VirtualHost for Nextlcoud configuration.

sudo nano /etc/apache2/sites-available/nextcloud.conf

And add the following content:

Alias /nextcloud "/var/www/html/nextcloud/"
<Directory /var/www/html/nextcloud>
    Options +FollowSymlinks
    AllowOverride All
      <IfModule mod_dav.c>
        Dav off
      </IfModule>
     SetEnv HOME /var/www/html/nextcloud
    SetEnv HTTP_HOME /var/www/html/nextcloud
</Directory>
</VirtualHost>
Save the changes, close the editor and apply the changes by enabling the Apache modules and restarting it.
a2ensite nextcloud
sudo systemctl restart apache2
*Masuk Browser
http://ip_kalian/nextcloud
*Buat user admin dengan username dan password yang unik kemudian konfigurasi database nextcloud dengan informasi yang sudah kita tentukan sebelumnya.
Database user: nextcloud
Database password: masukan password yang anda buat sebelumnya
Database name: nextcloud
localhost
Note : Untuk merubah dns atau alamat ip transit dari nextcloud bisa sesuaikan alamat ip konfigurasi nextcloud dengan perintah: sudo nano /var/www/html/nextcloud/config/config.php
Note : Jika mengalami "Strict mode, no HTTP connecton allowed" tambahkan konfigurasi ‘overwriteprotocol’ => ‘https’,

Posting Komentar

Komentar (0)

Lebih baru Lebih lama