Postingan

Menampilkan postingan dari Desember, 2018

Haproxy https backend

Berikut adalah contoh script haproxy https bagian backend backend tkj-id-backend  balance roundrobin  server tkj-id-srv01 10.20.30.40:443 check ssl verify none  server tkj-id-srv02 10.20.30.41:443 check ssl verify none Tentu script diatas hanya sebagai clue yang terdiri dari syntax/directive masih membutuhkan directive frontend agar bisa menjadi layanan yang ingin dibuat. Dalam programmer,sysops,devops,netdevops,sysadmin,dll banyak terdiri dari syntax,command,directive untuk mencapai project yang diminta/diinginkan. Seiring berjalannya perkembangan software maka perlu dicek juga script terbaru dari website resminya. Dalam mencari script inilah para pekerja IT perlu belajar dari berbagai website mulai dari blog sampai website dokumentasi resmi dari bahasa pemrograman,pembuat software. Butuh waktu, kesungguhan, kesabaran untuk mengumpulkan script. Dalam perusahaan besar yang sudah menyusun script sedemikian rupa sehingga menjadi software yang bermanfaat bagi banyak orang. 

Zabbix_server [788]: cannot open log: cannot create semaphore set: [28] No space left on device

The zabbix shared memory error is as follows: Zabbix_server [788]: cannot open log: cannot create semaphore set: [28] No space left on device Reason for error: The kernel.sem parameter is set too small. Shared memory: You can view the current system shared memory parameter limit by using the ipcs -lm command. #ipcs -lm ------ Shared Memory Limits -------- Max number of segments = 4096 Max seg size (kbytes) = 67108864 Max total shared memory (kbytes) = 18014398442373116 Min seg size (bytes) = 1 View current coexistence memory parameters: #cat /proc/sys/kernel/sem 250 32000 32 128 Change parameters: #vim /etc/sysctl.conf Kernel.sem =5010 641280 5010 128 #sysctl -p /etc/sysctl.conf //Settings take effect immediately 5010 SEMMSL max semaphores per array signal set accommodates the maximum number of signals 641280 SEMMNS max semaphores system wide Maximum number of all signals 5010 SEMOPM max ops per semop call Calls the maximum number of signals in a single si

Zabbix: increase-cachesize-configuration-parameter

To find the zabbix_server.conf: find / -name zabbix_server.conf Edit the CacheSize from default to 32M . Then check Monitoring -> Graphs -> Zabbix server -> Zabbix Cache usage graph.

Konfigurasi new virtualhost nginx

[root@sysops-test5 nginx]# cp nginx.conf conf.d/ [root@sysops-test5 nginx]# cd conf.d/ [root@sysops-test5 conf.d]# ls nginx.conf [root@sysops-test5 conf.d]# mv nginx.conf sysops.net.conf edit sysops.net.conf example: server {         listen       8000;         server_name  sysops.net;         root         /usr/share/nginx/html/dashboard2/public;         index index.php index.html index.htm;         # Load configuration files for the default server block.         include /etc/nginx/default.d/*.conf;          location / {          try_files $uri $uri/ /index.php$is_args$args;     }         #try_files $uri $uri/ /index.php?$query_string;         error_page 404 /404.html;             location = /40x.html {         }         error_page 500 502 503 504 /50x.html;             location = /50x.html {         }     location ~ \.php$ {         try_files $uri =404;         fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;         fastcgi_index index.php;    

Basic Git Cheat Sheet

Gambar
https://rubygarage.org/blog/most-basic-git-commands-with-examples

Laravel: Specified key was too long error

Edit AppServiceProvider.php as follows: use Illuminate\Support\Facades\Schema; public function boot() {     Schema::defaultStringLength(191); } Reference:  https://laravel-news.com/laravel-5-4-key-too-long-error

Increasing Attachment Size in Posfix

Postfix by default restrict attachment size to approx 10MB i.e. 10240000 bytes. You can check it using following command: postconf | grep message_size_limit To change attachment-size to say 50 MB, run a command like: postconf -e message_size_limit=52428800 https://easyengine.io/tutorials/mail/postfix-attachment-size/

Increase Bash History Size

Increase HISTSIZE – the number of commands to remember in the command history (the default value is 500). #export HISTSIZE=10000 Increase HISTFILESIZE – the maximum number of lines contained in the history file (the default value is 500). #export HISTFILESIZE=10000 #source ~/.bashrc https://www.shellhacks.com/tune-command-line-history-bash/

Laravel view error

Problem: Laravel view error Solution: chmod –R  755 /var/ww/laravelapp/storage

Basic laravel virtualhost nginx configuration

server {     listen   80 default_server;     root /var/www/laravel/public/;     index index.php index.html index.htm;     location / {          try_files $uri $uri/ /index.php$is_args$args;     }     # pass the PHP scripts to FastCGI server listening on /var/run/php5-fpm.sock     location ~ \.php$ {             try_files $uri /index.php =404;             fastcgi_pass unix:/var/run/php5-fpm.sock;             fastcgi_index index.php;             fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;             include fastcgi_params;     } }

Catatan sysops/sysadmin

Ketika ada sistem yang belum pernah dikonfigurasi maka sysops/sysadmin akan mencari tutorial dalam bentuk buku, ebook atau website resmi/blog untuk memahami konsep dan konfigurasi. System yang ingin dikonfigurasi terkadang tidak cukup pada satu tutorial, perlu beberapa referensi untuk menjadikan system yang di inginkan, disinilah sysadmin membutuhkan kesabaran untuk memahami setiap baris konfigurasi dan pengaruh nya pada system. Sysadmin juga perlu rajin untuk melihat log access maupun error. Terkadang system yang tidak jalan ada pesan di log. Sysadmin juga perlu memastikan apakah sistem yang dibangun kompatibel dengan sistem lain dan apakah terdapat bug pada system. Membaca dan menulis dokumentasi menjadi penting. Kategori permasalahan bisa pada: 1. Misconception 2. Misconfiguration 3. Incompatible 4. Bug

Contoh self signed certificate dengan powershell

Ketika sedang dalam proses development terkadang ingin membutuhkan certificate dengan cepat maka bisa memakai self signed terlebih dahulu, berikut adalah contoh membuat self signed certificate dengan powershell: New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname company.co.nz, mycompany.co.nz, minecompany.co.nz -notafter $extended_date -KeyLength 4096 berikut untuk cara export ke pfx, untuk kemudian bisa di import ke pc/server lain $pwd = ConvertTo-SecureString -String ‘password1234’ -Force -AsPlainText $path = ‘cert:\localMachine\my\’ + $cert.thumbprint Export-PfxCertificate -cert $path -FilePath c:\junk\certificate\powershellcert.pfx -Password $pwd Selengkapnya bisa dilihat di  https://medium.com/the-new-control-plane/generating-self-signed-certificates-on-windows-7812a600c2d8