2/24/22

Cara Install Dan Konfigurasi NextCloud Menggunakan Raspberry Pi 3 4 Dengan Apache & MariaDB

1. Update OS Raspberry dan firmware dengan mengikuti perintah berikut : 

 sudo apt update 
sudo apt full-upgrade 
sudo rpi-update
2. Install mariadb-server dengan mengikuti perintah berikut : sudo apt install mariadb-server
3. Set Up mariadb. 
sudo mysql_secure_installation 

Enter current password for root (enter for none) : (klik enter) 
Set root password? [Y/n} (klik y) New password : (isi paswword database) 
Remove anonymous users? [Y/n] (pilih y) 
Disallow root login remotely? [Y/n] (pilih y) 
Remove test database and access to it? [Y/n] (pilih y) 
Reload privilege tables now? [Y/n] (pilih y)
4. Membuat Database untuk cloud server sudo mariadb 

CREATE DATABASE teguh; 
SHOW DATABASES; 
GRANT ALL PRIVILEGES ON teguh.* TO 'nextcloud'@'localhost' IDENTIFIED BY 'mypassword'; FLUSH PRIVILEGES;
5. Intsall Apache dan beberapa paket yang dibutuhkan. 
sudo apt install php php-apcu php-bcmath php-cli php-common php-curl php-gd php-gmp php-imagick php-intl php-mbstring php-mysql php-zip php-xml
6. Restart Service mariadb dan apache2 

sudo systemctl restart apache2 
sudo systemctl restart mariadb
7. Aktifkan ekstensi PHP yang sebelumnya diinstall 

 sudo phpenmod bcmath gmp imagick intl
8. Cek web service yang sebelumnya diinstall, dengan membuka browser dengan alamat localhost atau ip raspberry yang diinstall. 

9. Download Nextcloud 

cd /home/pi/Downloads 
wget https://download.nextcloud.com/server/releases/nextcloud-21.0.0.zip 
sudo apt install unzip unzip nextcloud-.zip 
sudo mv nextcloud /var/www/html
10. Beri hak akses pada file nextcloud 

sudo chown -R www-data:www-data nextcloud 
sudo a2dissite 000-default.conf 
sudo systemctl reload apache2 

11. Tambahkan host virtual Apache untuk Nextcloud 

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

<VirtualHost *:80>
     DocumentRoot "/var/www/html/nextcloud"
     ServerName nextcloud

     <Directory "/var/www/html/nextcloud/">
         Options MultiViews FollowSymlinks
         AllowOverride All
         Order allow,deny
         Allow from all
    </Directory>

    TransferLog /var/log/apache2/nextcloud_access.log
    ErrorLog /var/log/apache2/nextcloud_error.log

 </VirtualHost>

12. Aktifkan situs 

 sudo a2ensite nextcloud.conf 

13. Config file php.ini 
 Ubuntu : 
sudo nano /etc/php/7.4/apache2/php.ini 

Debian : 
sudo nano /etc/php/7.3/apache2/php.ini 

Sesuaikan parameter yang ada di file php.ini:

memory_limit = 512M
upload_max_filesize = 200M 
max_execution_time = 360 
post_max_size = 200M 
date.timezone = America/Detroit 
opcache.enable=1 
opcache.interned_strings_buffer=8 
opcache.max_accelerated_files=10000 
opcache.memory_consumption=128 
opcache.save_comments=1 
opcache.revalidate_freq=1

14. Aktifkan mod Apache yang diperlukan 

sudo a2enmod dir env headers mime rewrite ssl 
sudo systemctl restart apache2 

 15. Perbarui konfigurasi agar sesuai dengan info database yang Anda gunakan sebelumnya 

 Aktifkan cache memori 
Edit file konfigurasi Nextcloud berikut : 

sudo nano /var/www/html/nextcloud/config/config.php 

Tambahkan baris berikut diakhir: 

 'memcache.local' => '\OC\Memcache\APCu', 

Beri hak akses pada config.php 

sudo chmod 660 /var/www/nextcloud/config/config.php 
sudo chown root:www-data /var/www/html/nextcloud/config/config.php 

Perbaiki indeks database sudo php /var/www/html/nextcloud/occ db:add-missing-indices 


 16. Buat sertifikat SSL (Optional)

sudo add-apt-repository ppa:certbot/certbot 
sudo certbot --apache -d nextcloud

Share on Facebook
Share on Twitter
Share on Google+

Related : Cara Install Dan Konfigurasi NextCloud Menggunakan Raspberry Pi 3 4 Dengan Apache & MariaDB

1 comments:

  1. Borgata Hotel Casino & Spa - Mapyro
    Get directions, reviews and information for Borgata Hotel Casino & Spa in 아산 출장안마 Atlantic 계룡 출장안마 City, NJ. Casino is located at 고양 출장안마 Renaissance Pointe on the 영주 출장샵 Mystic River and has 계룡 출장안마 a

    ReplyDelete