Skip to content

Instantly share code, notes, and snippets.

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

Dao Huy Hoang hoangdh

🏠
Working from home
View GitHub Profile
yum update -y
yum install -y epel-release wget
wget https://mathias-kettner.de/support/1.2.8p21/check-mk-raw-1.2.8p21-el7-44.x86_64.rpm
yum install -y check-mk-raw-1.2.*
omd create site1
omd start site1
## Open port 80 for httpd
check_fw=`rpm -qa | grep firewalld`
setenforce 0
apt-get update
apt-get install wget gdebi-core -y
wget https://mathias-kettner.de/support/1.2.8p21/check-mk-raw-1.2.8p21_0.xenial_amd64.deb
echo y | gdebi check-mk-raw-1.2.8p21_0.xenial_amd64.deb
omd create site1
omd start site1
check_fw=`ufw status | grep -w "active"`
if [ -n "$check_fw" ]
then
@hoangdh
hoangdh / MaxScale-C7.md
Last active May 19, 2017 02:53
Cài đặt Maxscale cho MariaDB trên CentOS 7

Cau hinh maxscale tren CentOS 7

  • Tren Galera, them user:

Quan tri tu xa

CREATE USER 'root'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
FLUSH PRIVILEGES;
@hoangdh
hoangdh / nginx.conf
Last active June 4, 2017 11:18
File cấu hình nginx có status.
#user nobody;
worker_processes auto;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
@hoangdh
hoangdh / set-nguong-rabbitmq.md
Last active April 26, 2022 04:22
Set Ngưỡng cảnh báo cho RabbitMQ

Một vài ghi chép về set ngưỡng cho plugin giám sát RabbitMQ

Trước khi thực hiện, vui lòng tham khảo những bài viết sau:

@hoangdh
hoangdh / set-nguong-mysql.md
Created June 7, 2017 11:08
Ghi chép về set ngưỡng cảnh báo cho MariaDB/MySQL

Một vài ghi chép về set ngưỡng cho plugin giám sát MySQL/MariaDB

Trước khi thực hiện, vui lòng tham khảo những bài viết sau:

@hoangdh
hoangdh / omd-sms_notify
Last active October 20, 2017 03:32
OMD_SMS-Notify for check_mk
#!/bin/bash
# SMS Notify
#######
#
# Register free account: http://nexmo.com/
#
########
KEY="XXXXXXXX"
SECRET="XXXXXXXXXXXXXXX"
# System authorization information
auth --enableshadow --passalgo=sha512
# Use network installation
url --url="http://172.16.1.1/images/centos7_x64"
# Install/upgrade in graphic/text mode
install
graphical
# Fix your url into command
url --url http://172.16.1.1/images/ubuntu16_x64/

Site to site - OpenVPN

Site1

Setup, gen key

11  yum install -y epel-release
   12  yum -y install openvpn easy-rsa
   13  cd /usr/share/doc/openvpn-*/sample/sample-config-files/