Skip to content

Instantly share code, notes, and snippets.

View linuxmalaysia's full-sized avatar
🏠
Working from home

Harisfazillah Jamel linuxmalaysia

🏠
Working from home
View GitHub Profile
@linuxmalaysia
linuxmalaysia / rsynctoserver.sh
Last active May 15, 2024 23:27
Old School Backup Using Rsync - Yeahhh on SCO Unix (BSD Style) - Convert to Linux Bash
#!/bin/bash
# Script to transfer directories from a remote server using rsync over SSH
# Harisfazillah Jamel (LinuxMalaysia)
# Circa 2006 For SCO Unix and BSD
# Adjust for Bash Linux 16 Mei 2024
# Target remote server details
# User need to be create and remote backup dir need to own by the user
# RADD can be local or remote IP
@ApOgEE
ApOgEE / podman-survival.md
Created December 9, 2023 02:17
Buat Service Supaya Podman Survive Reboot

Podman Survive Reboot

Docker adalah service dalam server manakala podman pula bukan service. Perbezaan antara Docker dan Podman dalam situasi ini ialah apabila kita reboot server.

Bila kita guna Docker, semua container yang run sebelum reboot akan run balik bila kita reboot server dan service docker kembali running. Tapi ini tak berlaku bila kita guna podman sebab podman bukanlah service.

Oleh itu, kita kena jadikan podman sebagai service.

@linuxmalaysia
linuxmalaysia / clustercontrol-podman-setup-20231209.md
Last active May 12, 2024 00:58
Clustercontrol v2 in Podman

Podman Container Configuration for ClusterControl with Custom User and SSH

This document outlines how to configure a Podman container for ClusterControl with a custom user and SSH access.

1. Pulling the Image:

podman pull docker.io/severalnines/clustercontrol:latest
@linuxmalaysia
linuxmalaysia / improve-mariadb-galera.md
Last active November 29, 2023 22:31
Setting for MariaDB Gcache

Instructions for configuring MariaDB and MySQL performance :-

  1. File Modification:

    • Open the /etc/mysql/mariadb.cnf or my.cnf file (note that my.cnf is a soft link to mariadb.cnf).
    • Add the following configuration options:
    # Provider specific configuration options
    wsrep_provider_options="gcache.size=1024M;gmcast.segment=0;gcache.recover=yes"
@linuxmalaysia
linuxmalaysia / kill-idle-transaction-pg.sh
Last active December 28, 2021 09:10
Idle In Transaction Problem - Postgresql
#!/bin/bash
# Harisfazillah Jamel - 20211216
# Part of script from https://wiki.lyrasis.org/display/DSPACE/Idle+In+Transaction+Problem
# Idle In Transaction Problem
pgprocess_array=( $( /usr/bin/pgrep -f 'idle in transaction' ) )
/usr/bin/pgrep -f 'idle in transaction' | wc -l | logger
for r in "${pgprocess_array[@]}"; do
@linuxmalaysia
linuxmalaysia / clustercontrol-centos8-podman.txt
Created June 28, 2021 10:19
Cluster Control On Centos 8 Using Podman
Cluster Control On Centos 8 Using Podman
https://severalnines.com/download-clustercontrol-database-management-system
https://severalnines.com/docs/user-guide/ui.html#import-existing-server-cluster
https://severalnines.com/docs/installation.html
https://severalnines.com/product/clustercontrol/clustercontrol-community-edition
@linuxmalaysia
linuxmalaysia / MySQL-Directory-Move-Into-New-Partition.md
Created November 24, 2020 05:50
MySQL / MariaDB / Percona Server For MySQL Directory Move Into New Partition (Example /home)

MySQL Directory Move Into New Partition (Example /home)

Login as root or any user that NOT using /home stop mariadb service such as systemctl stop MariaDB

Make sure SELINUX is permissive mode. View file /etc/selinux/config

Step 1 - Copy /home Contents

To backup the contents of /home, do the following:

@linuxmalaysia
linuxmalaysia / Installing-And-Setup-Streamsets-Using-Podman-For-Centos-8.md
Last active November 14, 2020 00:28
Installing And Setup Streamsets Data Collector Using Podman For Centos 8

Installing And Setup Streamsets Using Podman For Centos 8

StreamSets Data Collector is open source software for building dataflows quickly and easily, spanning on-premises, multi-cloud and edge infrastructure.

It has an advanced and easy to use User Interface that allows data scientists, developers and data infrastructure teams easily create data pipelines in a fraction of the time typically required to create complex ingest scenarios.

To learn more, check out https://github.com/streamsets/datacollector

@linuxmalaysia
linuxmalaysia / Filebeat For Iptables Centos 7 And Iptables using UFW For Ubuntu 18.04.txt
Created May 7, 2020 04:35
Filebeat For Iptables Centos 7 And Iptables using UFW For Ubuntu 18.04
Filebeat For Iptables Centos 7 And Iptables using UFW For Ubuntu 18.04
1) Enable firewalld log
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/configuring_logging_for_denied_packets
firewall-cmd --get-log-denied
off
firewall-cmd --set-log-denied=all
@linuxmalaysia
linuxmalaysia / Demo use case: integrating a COVID-19 tracker API with the Elastic Stack plus story telling with Kibana.txt
Last active May 7, 2020 04:37
Demo use case: integrating a COVID-19 tracker API with the Elastic Stack plus story telling with Kibana
Demo use case: integrating a COVID-19 tracker API with the Elastic Stack plus story telling with Kibana
https://medium.com/@quoeamaster/use-case-integrating-a-covid-19-tracker-api-with-the-elastic-stack-plus-story-telling-with-kibana-8805cb67678
Create the pipeline in the Elasticsearch before start the filebeat.
=== Update for filebeat
filebeat.inputs:
- type: log