Skip to Content

Blog dr. Salim Mulyana

Dokter, Opreker

Cara Instalasi Nextcloud 15 di CentOS 7

Be First!
by Januari 27, 2019 Uncategorized

Nextcloud adalah aplikasi semacam Dropbox atau Google Drive yang bisa kita install di server kita sendiri. Pada Tutorial kali ini saya akan menginstall Nextcloud 15 yang merupakan Nextcloud terbaru di CentOS 7. Berikut langkah-langkahnya:

Jalankan terminal

  1. Install php7.2

yum install epel-release

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

yum install httpd php72w php72w-dom php72w-mbstring php72w-gd php72w-pdo php72w-json php72w-xml php72w-zip php72w-curl php72w-pear php72w-intl setroubleshoot-server bzip2

2. Install Database Mariadb

yum install mariadb-server php72w-mysql

systemctl start mariadb

systemctl enable mariadb

3. Konfigurasi password Mariadbnya dengan menjalankan perintah berikut

mysql_secure_installation

4. Login ke Mariadb

mysql -u root -p

5. Buat database nextcloud

CREATE DATABASE nextcloud;

6. Buat user untuk mengakses database nextcloud tersebut

CREATE USER ‘nc_user’@‘localhost’ IDENTIFIED BY PASSWORD;

PASSWORD –> ganti dengan password yang anda kehendaki
GRANT ALL PRIVILEGES ON nextcloud.* TO ‘nc_user’@‘localhost’;
FLUSH PRIVILEGES;

7. Install Nextcloud

cd /var/www/html

curl -o nextcloud-15-latest.tar.bz2 https://download.nextcloud.com/server/releases/latest-15.tar.bz2

tar -xvjf nextcloud-15-latest.tar.bz2

mkdir nextcloud/data

chown -R apache:apache nextcloud

rm nextcloud-15-latest.tar.bz2

8. Buat configurasi nextcloud

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

Isi dengan ini

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>

9. Setting apache dan SE Linux

semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/html/nextcloud/data(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/html/nextcloud/config(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/html/nextcloud/apps(/.*)?’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/html/nextcloud/.htaccess’

semanage fcontext -a -t httpd_sys_rw_content_t ‘/var/www/html/nextcloud/.user.ini’

restorecon -Rv ‘/var/www/html/nextcloud/’

setsebool -P httpd_can_network_connect_db 1

systemctl start httpd

systemctl enable httpd

10. Atur firewall

firewall-cmd –add-service http –permanent

firewall-cmd –add-service https –permanent

firewall-cmd –reload

11. Install nextcloudnya

Buka browser ketik http://alamat_ip/nextcloud

Ikuti langkah-langkah yang muncul dilayar

 

Semoga berguna

Sumber:

How to install NextCloud 15 server on CentOS 7.x

Previous
Next

Leave a Reply

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

*