Skip to content

ノートDwinar

Hidup tuh bercanda, yang serius cuma mati

Menu
  • Home
  • Admin Server
    • Debian
    • RedHat
    • Ubuntu
    • Zimbra
  • Blog
  • Buku & Publishing
  • About
  • Contact
  • Privacy Policy
Menu

Cara Install Nextcloud Server di CentOS 7

Posted on January 25, 2019 by dwinar

Nextcloud adalah aplikasi open source yang dapat digunakan untuk membuat cloud storage atau media penyimpanan data, dimana kegunaanya seperti google drive atau dropbox. Dengan adanya Nextcloud ini anda dapat menyimpan berbagai macam file, seperti musik, film, gambar, dan sebagainya.

Pada tutorial kali ini saya mengunakan Nextcloud 14. Namun sebelum melakukan instalasi Nextcloud ada baiknya anda membaca system requirement yang digunakan Nextcloud 14. Untuk system requirement dapat dilihat disini. Setelah membacasystem requirement tersebut, pastikan system yang anda gunakan sesuai dengan system requirement yang dibutuhkan untuk menjalankan Nextcloud 14.

  • Install Paket Pendukung

Update system

yum update -y

Install paket dependensi

yum install -y epel-release yum-utils unzip curl wget bash-completion policycoreutils-python mlocate bzip2

Apache Web Server

Install Apache Web Server

yum install httpd -y

Buat konfigurasi virtual host

nano /etc/httpd/conf.d/nextcloud.conf

Buat konfigurasi virtualhost

<VirtualHost *:80>
	DocumentRoot /var/www/html/nextcloud
	ServerName cloud.dwinar.web.id 
 
	<Directory "/var/www/html/">
    	Require all granted
    	AllowOverride All
    	Options FollowSymLinks MultiViews
	</Directory>
</VirtualHost>

Restart service httpd

systemctl restart httpd
systemctl enable httpd
systemctl status httpd

Pastikan service apache up dan running.

  • PHP Engine

Selanjutnya install repository webtatic untuk instalasi PHP 7.2

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

Install PHP 7.2

yum install -y php72w php72w-cli php72w-common php72w-curl php72w-gd php72w-mbstring php72w-mysqlnd php72w-process php72w-xml php72w-zip php72w-opcache php72w-pecl-apcu php72w-intl php72w-pecl-redis
  • MariaDB Database

Install database MariaDB

yum install mariadb-server -y

Jalankan service mariadb

systemctl start mariadb
systemctl enable mariadb
systemctl status mariadb

Konfigurasi awal MariaDB

mysql_secure_installation

Jawab pertanyaan konfigurasi

Enter current password for root (enter for none):
Change the root password? [Y/n] y
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] y

Login ke MariaDB

mysql -u root -p

Buat database dan usernya

MariaDB [(none)]> create database nextcloud;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> create user 'usernextcloud'@'localhost' identified by 'password-nextcloud';
Query OK, 0 rows affected (0.04 sec)

MariaDB [(none)]> grant all privileges on nextcloud.* to 'usernextcloud';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> exit
  • Instalasi Nextcloud

Download Nextcloud

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

Extract dan copy Nextcloud ke /var/www/html

unzip nextcloud-14.0.4.zip
cp -R nextcloud /var/www/html/

Buat folder data

mkdir /var/www/html/nextcloud/data

Beri hak akses pada directory nextcloud

chown -R apache:apache /var/www/html/nextcloud/
chmod -R 755 /var/www/html/nextcloud/

Restart service httpd

systemctl restart httpd
  • Pengujian

Akses Nextcloud dari browser client. Lalu masukkan user, password, dan konfigurasi database.

Setelah instalasi selesai hasilnya seperti di bawah ini.

  • Instalasi SSL

Selanjutnya kita bisa menambahkan SSL agar lebih aman.

Install yum-utils

yum -y install yum-utils
yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional

Install certbot apache

yum -y install python2-certbot-apache

Lalu jalan certbot untuk generate SSL dengan membaca konfigurasi virtual host Apache

Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): [email protected] 
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
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 at
https://acme-v02.api.letsencrypt.org/directory
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(A)gree/(C)ancel: A

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing 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
Starting new HTTPS connection (1): supporters.eff.org

Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: cloud.dwinar.web.id
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for cloud.dwinar.web.id
Waiting for verification...
Cleaning up challenges
Resetting dropped connection: acme-v02.api.letsencrypt.org
Created an SSL vhost at /etc/httpd/conf.d/nextcloud-le-ssl.conf
Deploying Certificate to VirtualHost /etc/httpd/conf.d/nextcloud-le-ssl.conf

Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: No redirect - Make no further changes to the webserver configuration.
2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
new sites, or if you're confident your site works on HTTPS. You can undo this
change by editing your web server's configuration.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2

Akses kembali domain anda untuk menguji apakah sertifikat SSL sudah terpasang.

Leave a Reply Cancel reply

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

Recent Posts

  • Instalasi T-Pot Honeypot Framework
  • Ulang Tahun Excellent 9
  • Cara Setting DNS over HTTPS
  • Cara Upgrade OS Mikrotik
  • Membersihkan Sampah Pada Docker

Recent Comments

  • raihan irfan on Cara Install Docker Toolbox di Windows 10 Home
  • dwinar on Instalasi T-Pot Honeypot Framework
  • dwinar on Instalasi T-Pot Honeypot Framework
  • dwinar on Cara Replikasi Database Master – Slave
  • manda on Cara Replikasi Database Master – Slave

Categories

  • Admin Server
  • Blog
  • Debian
  • RedHat
  • Ubuntu
  • Zimbra

Archives

  • January 2021
  • September 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018

Tags

BBB Blog CentOS CentOS 8 Cockpit cPanel DataBases docer Docker Docker CE Docker Private Registry Docker Toolbox fail2ban Gnome google cloud Honeypot Jitsi Kubernetes Let’s Encrypt Linux lsync MariaDB Mikrotik Nakivo NextCloud Open Source OpenSUSE Redhat RedHat 7 S/MIME SSH SSL T-Pot Ubuntu Video Conference Web Server WFH WHM Windows Zextras Zimbra Zimbra Docs Zimbra Drive Zimbra Drive v2 Zimbra NE
January 2019
MTWTFSS
 123456
78910111213
14151617181920
21222324252627
28293031 
« Dec   Feb »
© 2023 ノートDwinar | Powered by Minimalist Blog WordPress Theme