Install Nextcloud on VPS Almalinux

Setelah webserver telah siap, langkah selanjutnya untuk menginstall Nextcloud pada sebuah domain/subdomain yang dipointing ke IP VPS di bagi ke dalam sub tahapan berikut.

Kegunaan Nextcloud

Pada studi kasus ini Nextcloud di install pada domain dan IP Public VPS berikut

Domain data.firman.kelompoksaya.my.id
IP Public VPS 103.176.79.213

Create Domain / SubDomain & Pointing to IP VPS

data.firman.kelompoksaya.my.id    >   103.176.79.213

Check Propagansi Domain

Check propagansi domain dengan A record pada situs

https://dnschecker.org/

Create Database, username & password Nextcloud

Silahkan buat database, user dan password pada phpmyadmin

DBNAME
DBHOST
DBPASS
DBHOSTNAME

Download Installer Nextcloud

Masuk ke folder root

[root@Almalinux-FirmanPratama ~]#	cd /root

Silahkan download file installer Nextcloud pada salah satu link berikut menggunakan wget

Unofficial website

[root@Almalinux ~]# wget https://repo.firmanpratama.id/nextcloud/latest.zip

Official website

[root@Almalinux ~]# wget https://download.nextcloud.com/server/releases/latest.zip
Note:
Official site Nextcloud Download
https://nextcloud.com/install/

Extract/Unzip Installer Nextcloud

[root@Almalinux ~]# unzip latest.zip

Move folder Nextcloud to /var/www/html

Check terlebih dahulu isi file & folder pada folder /root

[root@Almalinux ~]# ls -la

Pindahkan folder Nextcloud ke dalam folder “/var/www/html/”

[root@Almalinux ~]# mv nextcloud /var/www/html/

Masuk ke dalam folder “/var/www/html/”

[root@Almalinux ~]# cd /var/www/html/

Check isi, ownership serta permission file-folder di dalam folder “/var/www/html/” menggunakan perintah berikut

[root@Almalinux-FirmanPratama html]# ls -la

Ubah Ownership & Permission folder nextcloud dari “root” ke “apache”

[root@Almalinux-FirmanPratama html]# chown -R apache:apache nextcloud

Ubah Permission folder nextcloud ke 755

[root@Almalinux-FirmanPratama html]# chmod -R 755 nextcloud

Check kembali isi, ownership serta permission file-folder di dalam folder “/var/www/html/” menggunakan perintah berikut

[root@Almalinux-FirmanPratama html]# ls -la

Create Virtual Host Domain CMS Nextcloud

Create virtual host port 80 dan 443
http://data.firman.kelompoksaya.my.id
https://data.firman.kelompoksaya.my.id

ke dalam folder
/var/www/html/nextcloud

Restart Service Apache & PHP-FPM

[root@Almalinux-FirmanPratama html]# systemctl restart httpd
[root@Almalinux-FirmanPratama html]# systemctl restart php-fpm

Install Let’s Encrypt SSL certificate. (https)

Install Let’s Encrypt SSL certificate sesuai dengan masing-masing domain/subdomain

[root@Almalinux-FirmanPratama html]# certbot --apache -d NamaDomain
Contoh
[root@Almalinux-FirmanPratama html]# certbot --apache -d data.firman.kelompoksaya.my.id
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Enter email address (used for urgent renewal and security notices)
 (Enter 'c' to cancel): [email protected]

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must
agree in order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, to
share your email address with the Electronic Frontier Foundation, a founding
partner of the Let's Encrypt project and the non-profit organization that
develops Certbot? We'd like to send you email about our work encrypting the web,
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y
Account registered.
Requesting a certificate for data.firman.kelompoksaya.my.id

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/data.firman.kelompoksaya.my.id/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/data.firman.kelompoksaya.my.id/privkey.pem
This certificate expires on 2022-09-14.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.

Deploying certificate
Successfully deployed certificate for data.firman.kelompoksaya.my.id to /etc/httpd/conf/httpd.conf
Congratulations! You have successfully enabled HTTPS on https://data.firman.kelompoksaya.my.id

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
 * Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
 * Donating to EFF:                    https://eff.org/donate-le

Web Install

Silahkan menuju browser dan akses Domain/Subdomain yang telah dibuat untuk melanjutkan instalasi nextcloud

Contoh
https://data.firman.kelompoksaya.my.id

Setelah proses instalasi selesai ubah kembali permission folder nextcloud ke 750

[root@Almalinux-FirmanPratama html]# chmod -R 750 nextcloud

Leave a Reply

Your email address will not be published. Required fields are marked *