CARA MEMBUAT RTMP SERVER NGINX DI VPS LINUX UBUNTU



BAHAN YANG PERLU DISIAPKAN

  1. VPS LINUX - MINIMAL CPU 2 CORE, RAM 4GB

  2. PUTTY SSH

  3. FILEZILA


SOFTWARE YANG HARUS DIINSTAL

  1. NGINX (server rtmp)

  2. STUNNEL4 (server konfigurasi)

  3. FFMPEG (convert scale instagram vertikal ke horizontal)

  4. PHP (server halaman html)

  5. INOTIFY TOOLS (autosave konfigurasi setelah menekan tombol save)

  6. SSL (https domain agar lebih aman diakses)


CARA INSTALL SOFTWARE

  1. UPDATE & UPGRADE UBUNTU
    sudo apt-get update &&
    sudo apt-get upgrade

  2. NGINX
    sudo apt-get install nginx -y &&
    sudo apt-get install libnginx-mod-rtmp -y

  3. STUNNEL4
    sudo apt-get install stunnel4

  4. FFMPEG
    sudo apt-get install ffmpeg

  5. PHP
    sudo apt install php php-cli php-fpm php-mysql

  6. INOTIFY TOOLS
    sudo apt-get install inotify-tools

  7. SETTING IZIN AKSES FILE

    1. key1.conf , key2.conf , key3.conf, key4.conf, key5.conf, key6.conf, stunnel.conf, fb.conf, ig.conf
      646

    2. alkamal_hls , alkamal_dash
      sudo chown -R www-data:www-data /var/www/html/temp/alkamal_hls &&
      sudo chown -R www-data:www-data /var/www/html/temp/alkamal_dash
    3. nginx-monitor.sh
      chmod +x /etc/nginx/nginx-monitor.sh


    CARA INSTALL HTTPS UNTUK DI DOMAIN

    Copy Paste dan menjalankan perintah dari awal sampai akhir berikut:

    1. sudo apt install software-properties-common

    2. add-apt-repository ppa:certbot/certbot

    3. sudo apt-get install python3-certbot-nginx

      • sudo nano /etc/nginx/sites-available/default


      • Setting Pada Servername
      • mandacrew.com

    4. nginx -t

    5. sudo systemctl reload nginx

    6. ufw status

    7. sudo ufw allow 'Nginx Full'

    8. certbot --nginx -d mandacrew.com

      • Masukkan Email
      • Masukkan Huruf ' A ' Lalu Enter
      • Masukkan Huruf ' N ' Lalu Enter

    KUMPULAN FILE HTML

    1. HTML - Simpan dan Upload Semua File

    2. NGINX - Simpan dan Upload Semua File

    3. STUNNEL - Simpan dan Upload Semua File


    CARA HAPUS CACHE RAM

    Berguna jika pemakaian RAM besar, copy paste perintah berikut:

    1. sync; echo 1 > /proc/sys/vm/drop_caches

    2. sync; echo 2 > /proc/sys/vm/drop_caches

    3. sync; echo 3 > /proc/sys/vm/drop_caches