Panjimedia

Learn without fatigue, strive without cease

Menu
  • About
  • Blog
  • Contact
  • Courses
  • Home
  • Sample Page
Menu

Konfigurasi Apache2 untuk server presensi 1000 pegawai menggunakan mode MPM Worker pada server Ubuntu

Posted on Februari 19, 2023Februari 19, 2023 by dinocerata

Berikut adalah konfigurasi Apache2 untuk server presensi 10000 pegawai bersamaan menggunakan Ubuntu 24 core CPU dan 24G RAM dengan menggunakan MPM Worker:

  1. Pastikan Apache2 telah terinstall pada server Ubuntu dengan menjalankan perintah berikut: sudo apt-get install apache2
  2. Pastikan modul MPM Worker telah terinstall pada server Ubuntu dengan menjalankan perintah berikut: sudo apt-get install libapache2-mod-worker-mpm
  3. Buka file konfigurasi Apache2 dengan perintah berikut: sudo nano /etc/apache2/apache2.conf
  4. Tambahkan baris konfigurasi berikut pada bagian atas file konfigurasi: Set MPM Worker as the default ServerName localhost
    ServerRoot /etc/apache2
    Mutex file:${APACHE_LOCK_DIR} default
    PidFile ${APACHE_PID_FILE}
    Timeout 300
    KeepAlive On
    MaxKeepAliveRequests 100
    KeepAliveTimeout 5
    User ${APACHE_RUN_USER}
    Group ${APACHE_RUN_GROUP}
    HostnameLookups Off
    ErrorLog ${APACHE_LOG_DIR}/error.log
    LogLevel warn
    IncludeOptional mods-enabled/.load IncludeOptional mods-enabled/.conf
  5. Simpan dan keluar dari file konfigurasi.
  6. Buka file konfigurasi MPM Worker dengan perintah berikut: sudo nano /etc/apache2/mods-available/mpm_worker.conf
  7. Pastikan konfigurasi berikut terdapat pada file tersebut: StartServers 4 MinSpareThreads 25 MaxSpareThreads 75 ThreadLimit 64 ThreadsPerChild 25 MaxRequestWorkers400 MaxConnectionsPerChild 0

Konfigurasi di atas menetapkan jumlah server awal (StartServers), jumlah thread minimum (MinSpareThreads), jumlah thread maksimum (MaxSpareThreads), batas thread per anak proses (ThreadLimit), jumlah thread per anak proses (ThreadsPerChild), maksimum jumlah pekerja permintaan (MaxRequestWorkers), dan batas koneksi per anak proses (MaxConnectionsPerChild).

  1. Simpan dan keluar dari file konfigurasi.
  2. Restart Apache2 dengan perintah berikut: sudo systemctl restart apache2

Setelah menjalankan konfigurasi di atas, Apache2 akan diatur menggunakan modul MPM Worker dan siap digunakan untuk menangani presensi 10000 pegawai secara bersamaan. Pastikan juga untuk mengkonfigurasi PHP dan MySQL dengan benar untuk mendukung beban kerja yang besar.
Tambahan

Berikut perintah jika akan mengubah dari mode MPM Perfork ke MPM Worker
sudo a2dismod php7.4
sudo a2dismod mpm_prefork
sudo a2enmod mpm_worker
sudo systemctl restart apache2
sudo apt install php-fpm -y
sudo a2enmod proxy_fcgi setenvif
sudo a2enconf php7.4-fpm
sudo systemctl start php7.4-fpm
sudo systemctl restart apache2

Category: Linux

Tinggalkan Balasan Batalkan balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *

Recent Posts

  • Konfigurasi server NginX untuk traffik tinggi
  • Konfigurasi Apache2 untuk server presensi 1000 pegawai menggunakan mode MPM Worker pada server Ubuntu
  • Pola Pendidikan Finlandia dalam Perspektif Kurikulum Merdeka di Indonesia
  • Technology Enhanced Learning
  • Awards Ceremony Day

Recent Comments

  1. A WordPress Commenter mengenai Hello world!

Archives

  • Februari 2023

Categories

  • Award Ceremony
  • Courses
  • Learning
  • Linux
  • Pendidikan
  • Scholarship
  • Uncategorized
© 2023 Panjimedia | Powered by Minimalist Blog WordPress Theme