============================================================================ SETTING VPS ============================================================================ ############## GANTI SSH PORT ############## nano /etc/ssh/sshd_config Ganti di bagian : #Port 22 systemctl restart sshd ============================================== INSTALL NTP SERVICE ============================================== yum install ntp ntpdate timedatectl set-timezone Asia/Jakarta ntpdate -u -s 0.centos.pool.ntp.org 1.centos.pool.ntp.org 2.centos.pool.ntp.org systemctl restart ntpd ============================================== MENGHAPUS SERVICE LINUX YANG TIDAK PENTING : ============================================== chkconfig netconsole off; service netconsole stop chkconfig auditd off; service auditd stop chkconfig multipathd off; service multipathd stop ============================================== TES KECEPATAN VPS ============================================== wget -O /dev/null https://speed.hetzner.de/100MB.bin wget -O /dev/null http://cachefly.cachefly.net/100mb.test wget -O /dev/null http://mirror.leaseweb.com/speedtest/100mb.bin wget -O /dev/null http://speedtest.wdc01.softlayer.com/downloads/test100.zip curl -s -w 'Testing Website Response Time for :%{url_effective}\n\nLookup Time:\t\t%{time_namelookup}\nConnect Time:\t\t%{time_connect}\nPre-transfer Time:\t%{time_pretransfer}\nStart-transfer Time:\t%{time_starttransfer}\n\nTotal Time:\t\t%{time_total}\n' -o /dev/null https://motoris.me/item/4000877224129 ============================================== MEMBUAT SWAP FILE https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-centos-7 ============================================== Cek swap file sebelumnya : swapon -s Jika output kosong, berarti belum ada sebelumnya, silahkan dilanjut.. Membuat 30GB file swap: sudo dd if=/dev/zero of=/swapfile count=30720 bs=1MiB Cek file swap : ls -lh /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile swapon -s Membuat file swap permanent: sudo nano /etc/fstab Tambahkan baris berikut di bawah: /swapfile swap swap sw 0 0 cat /proc/sys/vm/swappiness sudo sysctl vm.swappiness=10 sudo nano /etc/sysctl.conf Tambahkan : vm.swappiness = 10 cat /proc/sys/vm/vfs_cache_pressure sudo sysctl vm.vfs_cache_pressure=50 sudo nano /etc/sysctl.conf Tambahkan : vm.vfs_cache_pressure = 50 ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ============================================== ==============================================