Solusi Low VPS Untuk Trafik Tinggi & Performa Tinggi

Discussion in 'VPS (Virtual Private Server)' started by Jawanet, 13 Aug 2016.

Thread Status:
Not open for further replies.
  1. Jawanet

    Jawanet Poster 2.0

    Messages:
    113
    Likes Received:
    18
    Trophy Points:
    18
    Kita bikin vps dengan ram 512 super speed, super performance, dan bebas mau add plugin apapun, di share hosting minta install zend cache/memcached aja kadang di sewotin hahahaha. Tapi sedih juga ada yang bilang say good bye shared hosting kalau baca tutorial kayak gini.
    Setidak nya vps mempunyai ram minimal 256MB karena saya blm pernah uji di bawah itu untuk visitor 8000ribu/hari. Kali ini kita akan banyak bermain dengan putty mengingat untuk menciptakan vps katakan ram 512Mb untuk high performance plus fast load ;) .
    Extreame site? AGC? situs gila? Boleh hehehehe => Kvm vps jangan ovz kalau untuk situs extreame. :16:

    Paket software yang kita gunakan:
    - Nginx 1.10.x
    - memcached
    - Google Pagespeed (Optional)
    - MariaDB
    - Php 5.6.24 kalau saya pakai php 7 wordpress mantap
    - Nginx MicroCache
    - Basic DDOS Protection
    - Wordpress
    - Berdo.a :63:


    Spek minimal:
    -------------------------------------------------------------
    - 512MB Ram
    - 10GB Space
    - 200GB minimal BW
    - High i/o Di sarankan
    ---------------------------------------------------
    - Centos 6 x64
    - Software Centminmod lamp
    - Katakan visitor 8000/hari
    - Cloudflare untuk management dns(kalau gak mau pake dns cloudflare tinggal disable aja dari cloudflare uda lgsg ke fps kita) bisa pakai NSD DNS centmin tapi agak ribet ntar Tuan vusing.
    - Setidaknya Tuan mau belajar tentang command line centos (Yg blm tau). Tapi yakin ini gak susah kok gampang banget. Ribet pass awal doang meskipun gak se ribet ngedeketin si do'i :21:, setelah ini setup setup ntar gampang.
    -------------------------------------------------------------------------------------------------------------------

    Di luar banyak vps 512MB harga di bawah 600ribu/tahun provider ternama kvm malah.:gossip: Ovz ada yg 250rebu/th :21:
    --------------------------------------------------------------------------------------------------------------------

    Langkah Instalasi:

    1. Update CentOS ke versi terbaru dulu:
    Code:
    yum update
    2. Download Centminmod Ke Vps
    Code:
    yum -y install git wget nano bc unzip
    
    cd /usr/local/src
    
    git clone https://github.com/centminmod/centminmod.git centminmod
    
    cd centminmod
    Copy per line ya jangan semua

    3. Intall Centminmod
    Code:
    ./centmin.sh install
    Sampai sini kita sudah selesai dan bisa di gunakan buat website
    Ini dia admin panel centminmod
    Tinggal pilih no kalau mau upgrade/downgrade sesuatu, misal no 2, masukan no 2 lalu enter

    4. Memanggil admin panel centmin
    Code:
    sh centmin.sh
    Jika nanti Tuan keluar putty untuk akses centmin panel bisa menggunakan cmd:
    Code:
    cd /usr/local/src/centminmod
    
    sh centmin.sh
    5. Install PhpMyAdmin
    Code:
    cd /usr/local/src/centminmod/addons
    wget --no-check-certificate https://github.com/centminmod/phpmyadmin/raw/master/phpmyadmin.sh
    
    chmod 0700 /usr/local/src/centminmod/addons/phpmyadmin.sh
    
    cd /usr/local/src/centminmod/addons/
    
    ./phpmyadmin.sh install
    
    Dari bawaan htaccess phpmyadmin si embah centmin di protect password:
    setelah install phpmyadmin scroll ke atas pelan-pelan cari user dan password nya. jangan lupa simpan ntar lupa di marahin nyak ma babe.

    Satu lagi gak tau kan default password login mysql nya? :21: mari kita ganti password root mysql nya
    PHP:
    sudo /etc/init.d/mysqld stop
    PHP:
    sudo mysqld_safe --skip-grant-tables &
    PHP:
    mysql -uroot
    PHP:
    use mysql;
    PHP:
    update user set password=PASSWORD("password Tuan di sini"where User='root';
    PHP:
    flush privileges;
    PHP:
    quit atau ctrl+D atau bisa juga exit
    Jangan lupa refres mysql
    Code:
    sudo /etc/init.d/mysqld stop
    sudo /etc/init.d/mysql start


    Setiap domain konfigurasi file ada di /home/nginx/domains/
    Konfig Vhost di: /usr/local/nginx/conf/conf.d/

    -----------------------------------------------------------------------------------------------------------------------------------
    ------------------------------------------------------------------------------------------------------------------------------------


    Untuk mempermudah pengeditan file, gunakan winscp atau sebangsa nya.
    Saya pakai nano jika blm terinstall ==> yum install nano

    Konfigurasi software

    Untuk upgrade/downgrade php pas pertanyaan php version, masukan sesuai versi lengkap, misal 5.6.24 atau 7.0.9 enter

    Reinstall Juga Memcahed

    Enable mod pagespeed

    putty:
    Code:
    cd /usr/local/nginx/conf/pagespeed.conf
    Line 1 pagespeed off;, ganti pagespeed on;

    Hilangkan tanda pagar # di line ini
    # pagespeed MemcachedThreads 1;
    # pagespeed MemcachedServers "localhost:11211";
    # pagespeed MemcachedTimeoutUs 100000;

    putty:
    Code:
    cd /usr/local/nginx/conf/conf.d/dek-lutfi.com.conf
    Hilangkan tanda pagar #
    Code:
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    Lakukan pada setiap domain


    Install Wordpress Sebagai Contoh

    Akses centmin menu kembali, lalu pilih no 2 2). Add Nginx vhost domain

    Lalu muncul
    1 Masukan domain
    ---------------------------------------------

    Enter vhost domain name to add (without www. prefix): dek-lutfi.com

    2 ssl ilih saja n, setup di lain waktu saja.
    Create a self-signed SSL certificate Nginx vhost? [y/n]: n

    3. Ftp
    Create FTP username for vhost domain (enter username): deklutfi

    4 ftp pass
    Auto generate FTP password (recommended) [y/n]:n
    Terus di minta masukin password

    Selesai, wordpress sudah siap, :doh: eh lupa permalink belum berjalan ding Tuan, harus edit vhost domain
    Edit Vhost di: /usr/local/nginx/conf/conf.d/dek-lutfi.com.conf

    Kemudian tambahin
    Code:
      location / {
      # Wordpress Permalinks
      try_files $uri $uri/ /index.php?q=$uri&$args;
    
      }
    Jadi seperti ini:

    Code:
    # Centmin Mod Getting Started Guide
    # must read http://centminmod.com/getstarted.html
    
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    # if unsure use return 302 before using return 301
    #server {
    #            listen   80;
    #            server_name wpfastest.com;
    #            return 301 $scheme://www.dek-lutfi.com$request_uri;
    #       }
    
    server {
      server_name wpfastest.com www.dek-lutfi.com;
    
    # Enabling ngx_pagespeed & ngx_pagespeed handler
    include /usr/local/nginx/conf/pagespeed.conf;
    include /usr/local/nginx/conf/pagespeedhandler.conf;
    include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/dek-lutfi.com/log/access.log combined buffer=256k flush=60m;
      error_log /home/nginx/domains/dek-lutfi.com/log/error.log;
    
      root /home/nginx/domains/dek-lutfi.com/public;
    
      location / {
    
      # Enables directory listings when index file not found
      #autoindex  on;
    
      # Wordpress Permalinks
      try_files $uri $uri/ /index.php?q=$uri&$args;
    
      }
      # Mengijinkan akses cloudflare
      location ~ \.(ttf|ttc|otf|eot|woff|font.css|css)$ {
               add_header Access-Control-Allow-Origin "*";
      }
    
    
    include /usr/local/nginx/conf/staticfiles.conf;
    include /usr/local/nginx/conf/php.conf;
    #include /usr/local/nginx/conf/phpstatus.conf;
    include /usr/local/nginx/conf/drop.conf;
    #include /usr/local/nginx/conf/errorpage.conf;
    include /usr/local/nginx/conf/vts_server.conf;
    }
    
    Jika ada problem wordpress minta ftp chmod aja:
    Code:
    chown -R nginx:nginx /home/nginx/domains/dek-lutfi.com/public
    
    chown -R nginx:nginx /home/nginx/domains/dek-lutfi.com/public/wp-content/
    
    kalau ada butuh akses ftp lagi tinggal lakukan lagi dengan target folder yg butuh ijin.


    Kontrol Panel Premium yang sudah saja uji+pakai directadmin konfigurasi sama hasil juga waw.
    -786MB Ram
    - Nginx 1.10.x
    - memcached
    - Google Pagespeed (Optional)
    - MariaDB
    - Php 5.6.24 kalau saya pakai php 7 wordpress mantap
    - Nginx MicroCache
    - Basic DDOS Protection

    Varnish cache masih oprek2 biar bisa menyatu ma SSL dengan baik, sementara bisa tp performa kurang greget.

    Setup emailnya pakai pihak ketiga, browsing aja ya tutornya. ini juga sambil setup vps klient.
    ------------------------------------------------------------------------------------------------------------------------------



    Selesai Tuan :43:, mohon maaf kalau ada kata yang salah atau kurang bermanfaat. :77:

    Monggo yang mau nambahin karena memang masih banyak kekurangan.
     
    Last edited: 13 Aug 2016
    BennyKusman and HostinganID like this.
  2. argon

    argon Poster 2.0

    Messages:
    106
    Likes Received:
    41
    Trophy Points:
    28
    Bagus share-nya. Thanks.
     
  3. Jawanet

    Jawanet Poster 2.0

    Messages:
    113
    Likes Received:
    18
    Trophy Points:
    18
    Tanks mas argon
     
  4. Jawanet

    Jawanet Poster 2.0

    Messages:
    113
    Likes Received:
    18
    Trophy Points:
    18
    Oya kalau cloudflare on tambahin ini setelah server {

    Code:
    # Cloudflare
    set_real_ip_from 103.21.244.0/22;
    set_real_ip_from 103.22.200.0/22;
    set_real_ip_from 103.31.4.0/22;
    set_real_ip_from 104.16.0.0/12;
    set_real_ip_from 108.162.192.0/18;
    set_real_ip_from 131.0.72.0/22;
    set_real_ip_from 141.101.64.0/18;
    set_real_ip_from 162.158.0.0/15;
    set_real_ip_from 172.64.0.0/13;
    set_real_ip_from 173.245.48.0/20;
    set_real_ip_from 188.114.96.0/20;
    set_real_ip_from 190.93.240.0/20;
    set_real_ip_from 197.234.240.0/22;
    set_real_ip_from 198.41.128.0/17;
    set_real_ip_from 199.27.128.0/21;
    real_ip_header CF-Connecting-IP;
    
    

    Perintah restart:
    Code:
    service nginx restart
    service php-fpm restart
    service mysql restart
    service memcached restart
     
  5. mustafaramadhan

    mustafaramadhan Hosting Guru

    Messages:
    3,237
    Likes Received:
    857
    Trophy Points:
    113
    RAM kurang dari 1GB pakai Varnish?.
     
  6. idnix

    idnix Hosting Guru

    Messages:
    1,003
    Likes Received:
    189
    Trophy Points:
    63
    high i/o itu berapa minimal yg disarankan? TS sendiri pakai vps apa?
     
  7. pangeran1995

    pangeran1995 Hosting Guru

    Messages:
    1,352
    Likes Received:
    105
    Trophy Points:
    63
    kalo saya si gimana agcnya. gimana settingan usernya dan gimana optimizenya
     
  8. Jawanet

    Jawanet Poster 2.0

    Messages:
    113
    Likes Received:
    18
    Trophy Points:
    18
    Apa mungkin karena ram 512 ya pak perform rada kurang greget, varnish nya ngambil dari Centos-webpanel tak coba ke centminmod. Kalau di CWP sendiri ram 512 pakai varnish jalan normal. Bingung saya, mungkin karena kurang pas di centmin nya.


    Diatas 100MB lebih baik Tuan

    kalau yang saya pakai ini:
    Code:
    System Info
    ---------------------
    Processor  : QEMU Virtual CPU version (cpu64-rhel6)
    CPU Cores  : 1
    Frequency  : 2099.998 MHz
    Memory  : 512 MB
    Swap  :  MB
    
    
    Speedtest (IPv4 only)
    ---------------------
    Your public IPv4 is 104.168.29.xx
    
    Location                Provider        Speed
    CDN                     Cachefly        97.7MB/s
    
    Atlanta, GA, US         Coloat          70.5MB/s
    Dallas, TX, US          Softlayer       96.1MB/s
    Seattle, WA, US         Softlayer       58.7MB/s
    San Jose, CA, US        Softlayer       71.2MB/s
    Washington, DC, US      Softlayer       69.5MB/s
    
    Tokyo, Japan            Linode          18.8MB/s
    Singapore               Softlayer       7.95MB/s
    
    Rotterdam, Netherlands  id3.net         55.38MB/s
    Haarlem, Netherlands    Leaseweb        37.0MB/s
    
    
    Disk Speed
    ----------
    I/O (1st run)   : 521 MB/s
    I/O (2nd run)   : 610 MB/s
    I/O (3rd run)   : 773 MB/s
    Average I/O     : 868 MB/s
    
    :16:



    Maksudnya settingan user? kan ini tutor personal Tuan hehehe

    Default seperti tutor sudah optimize Tuan, kalau di bikin wow lagi pagespeed on semua compresinya. Sama kompresi nginx naikin ke 9. Kalau sudah ada vps yg pakai bisa tanya di sini Tuan. Sama aktifkan dari menu centmin multi gzip

    Vps yg sya maentenan buat autoblog wallpaper ram terpakai 433MB stabil, dari 512MB, Visitor 6000-7000/hari dengan sett sama di atas.
     
  9. HostinganID

    HostinganID Apprentice 1.0

    Messages:
    339
    Likes Received:
    67
    Trophy Points:
    28
    Wah bagus sharingnya. Like dipencet :D
     
  10. mustafaramadhan

    mustafaramadhan Hosting Guru

    Messages:
    3,237
    Likes Received:
    857
    Trophy Points:
    113
Loading...
Thread Status:
Not open for further replies.

Share This Page

Loading...