cara membuat swap file di linux
Untuk komputer/server anda, bila belum ada swap file dapat mengikuti langkah berikut. 1. Periksa apakah swap sudah aktip, bila belum lanjutkan ke langkah berikutnya. # free total used free shared buffers cached Mem: 2054288 1916924 137364 4456 69268 1049580 -/+ buffers/cache: 798076 1256212 Swap: 0 0 0 2. Alokasikan 2Gb untuk swap file # fallocate -l 2G /swapfile 3. Berikan mode 600 ke swap file # chmod 600 /swapfile 4. Buatkan swapfile untuk file swapfile # mkswap /swapfile Setting up swapspace version 1, size = 2097148 KiB no label, UUID=2947f0f6-d589-4837-a642-2f82f001d2fd 5. Aktipkan Swap file # swapon /swapfile 6. Untuk memastikan swap file aktip, berikan perintah berikut: # swapon --show NAME TYPE SIZE USED PRIO /swapfile file 2G 0B -1 7. Bisa juga ditampilan di memory dengan perintah free # free