Skip to content

Instantly share code, notes, and snippets.

@budiantoip
budiantoip / monit.md
Last active September 24, 2024 04:49
Monit

How to set up monit on domain.com

vim /etc/monit/monitrc

set daemon  30

set mailserver smtp.gmail.com port 587              # primary mailserver
username "tester@gmail.com" password "my_password"
using tls
with timeout 30 seconds
@budiantoip
budiantoip / How to update PHP version on CentOS 7.md
Created August 3, 2024 04:42
How to update PHP version on CentOS 7
sudo yum install yum-utils -y
sudo yum-config-manager --disable remi-php74
sudo yum-config-manager --enable remi-php82
sudo yum install php php-cli php-fpm php-json php-common php-mysqlnd php-xml php-gd php-mbstring php-intl php-opcache -y
@budiantoip
budiantoip / Linux compute stress script.md
Created July 17, 2024 01:08
Linux compute stress script
#! /bin/sh
# set -x

stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 360s
@budiantoip
budiantoip / CentOS 7 Archive Repo.md
Last active July 22, 2024 08:18
CentOS 7 Archive Repo

CentOS 7

/etc/yum.repos.d/CentOS-Base.repo

[base]
name=CentOS-$releasever - Base
baseurl=http://vault.centos.org/centos/$releasever/os/$basearch
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
@budiantoip
budiantoip / Calculate Processes.md
Last active August 19, 2024 07:34
Calculate Processes

Calculate processes given a specific process name

Let's start with listing the processes of a php5-fpm:

ps -C php5-fpm

Display the process size:

ps -C php5-fpm -o rss=
@budiantoip
budiantoip / Remix Cheatsheet.md
Last active April 27, 2024 09:08
Remix Cheatsheet
@budiantoip
budiantoip / Learn ReactJS.md
Last active March 20, 2024 04:50
Learn ReactJS
@budiantoip
budiantoip / How to update CA certificates.md
Last active March 1, 2024 01:38
How to update CA certificates

Ubuntu:

  • Copy the cert files to /etc/ssl/certs
  • Run update-ca-certificates

CentOS:

  1. Run update-ca-trust force-enable
  2. Copy CA certificate files to /etc/pki/ca-trust/source/anchors
  3. Run update-ca-trust
  4. Restart any web engine service
@budiantoip
budiantoip / Apache Cheatsheet.md
Created August 25, 2023 04:21
Apache Cheatsheet

Limit HTTP method based on IPs

<Limit POST PUT DELETE>
 order deny,allow
 deny from all
 #allow from localhost
 #allow from 127.0.0.1
 allow from xxx.xxx.xx.xx
</Limit>
@budiantoip
budiantoip / Traefik.md
Last active August 21, 2023 03:35
Traefik

Traefik Use Cases

  • Reverse Proxy
  • API Gateway
  • Load Balancing
  • Certificate Management
  • Kubernetes Ingress

Traefik Providers

  • a provider links an infrastructure component (Orchestrator, Container Engine, Key-Value store, or File to Traefik)
  • Configure Traefik to connect to the Provider