Site icon Learning & Doing

Cara Install Nextcloud Server di CentOS 7

nextcloud

“Cara Install Nextcloud Server di CentOS 7”

Pengantar

Nextcloud adalah aplikasi open source yang dapat digunakan untuk membuat cloud storage atau penyimpanan data di mana anda dapat menyimpan berbagai macam ekstensi data ataupun file statik seperti halnya file music, video, dan sebagainya. Secara fungsi Nextcloud hampir sama seperti Google Drive atau Dropbox, bahkan Nextcloud juga dapat dimanfaatkan untuk berbagai macam kepetingan dan kebutuhan misalnya video conference antar pengguna Nextcloud dan masih banyak lainnya.

Install Dependensi

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

Install Apache Webserver

yum install httpd -y
nano /etc/httpd/conf.d/nextcloud.conf
<VirtualHost *:80>
	DocumentRoot /var/www/html/nextcloud
	ServerName namadomain.com 

	<Directory "/var/www/html/">
    	Require all granted
    	AllowOverride All
    	Options FollowSymLinks MultiViews
	</Directory>
</VirtualHost>	
systemctl start httpd
systemctl enable httpd
systemctl status httpd

Install PHP 7.2

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
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
php -v

Install Mariadb Database

yum install mariadb-server -y
systemctl start mariadb
systemctl enable mariadb
systemctl status mariadb
mysql_secure_installation
Enter current password for root (enter for none): enter
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	
mysql -u root -p

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

MariaDB [(none)]> create user 'usernextcloud'@'localhost' identified by 'passwordnya-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

Install Nextcloud

wget https://download.nextcloud.com/server/releases/nextcloud-14.0.4.zip
unzip nextcloud-14.0.4.zip
cp -R nextcloud /var/www/html/
mkdir /var/www/html/nextcloud/data
chown -R apache:apache /var/www/html/nextcloud/
chmod -R 755 /var/www/html/nextcloud/	
systemctl restart httpd

Setup Nextcloud

http://namadomain atau http://IPaddr

Masukan User , password dan setting database

Setelah selesai

Install SSL letsencrypt ( Optional ) -> untuk domain biar lebih aman

yum -y install yum-utils
yum-config-manager --enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional
yum -y install python2-certbot-apache
certbot --apache
Enter email address (used for urgent renewal and security notices) (Enter 'c' to
cancel): alamat@email.com
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

Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: namadomain.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1

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

External Storage

Jika memiliki storage seperti Amazon S3, FTP/FTPS, SFTP, atau OpenStack Object Storage, kita dapat memasukkannya (attach/mount) ke Nextcloud. Caranya dengan mengaktifkan Apps Nextcloud dengan nama External Storages, kemudian pada menu Settings->Administration->External Storages konfigurasikan storage yang ingin dimount.

Penutup

Sahabat Blog Learning & Doing demikianlah penjelasan mengenai Cara Install Nextcloud Server di CentOS 7. Semoga Bermanfaat . Sampai ketemu lagi di postingan berikut nya.

Exit mobile version