Skip to content

Instantly share code, notes, and snippets.

View loinguyenduc101's full-sized avatar

Loi Nguyen loinguyenduc101

View GitHub Profile
@loinguyenduc101
loinguyenduc101 / Virtual IP Address Failover Using Keepalived.guide
Last active July 19, 2024 19:33
Configuring Simple Virtual IP Address Failover Using Keepalived
#### https://docs.oracle.com/cd/E37670_01/E41138/html/section_uxg_lzh_nr.html
Enable IP forwarding:
# echo "net.ipv4.ip_forward = 1" >> /etc/sysctl.conf
# sysctl -p
net.ipv4.ip_forward = 1
Add firewall rules to allow VRRP communication using the multicast IP address 224.0.0.18 and the VRRP protocol (112) on each network interface that Keepalived will control, for example:
# iptables -I INPUT -i eth0 -d 224.0.0.0/8 -p vrrp -j ACCEPT
# iptables -I OUTPUT -o eth0 -d 224.0.0.0/8 -p vrrp -j ACCEPT
# service iptables save
@loinguyenduc101
loinguyenduc101 / Installing VMware Tools.txt
Created October 23, 2016 06:34
Installing VMware Tools in a Linux virtual machine using a Compiler (1018414)
###https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1018414
To install VMware Tools in a Linux guest operating system using Compiler:
Ensure that your Linux virtual machine is powered on.
If you are running a GUI interface, open a command shell.
Note: Log in as a root user, or use the sudo command to complete each of these steps.
@loinguyenduc101
loinguyenduc101 / install python 2.7 on CentOS 6.x .txt
Last active October 23, 2016 08:15
install python 2.7 on CentOS 6.x
scl enable python27 bash
#yum install centos-release-SCL
#yum install python27
or make install from source
# wget https://www.python.org/ftp/python/2.7.12/Python-2.7.12.tgz
# tar xzf Python-2.7.12.tgz
# cd Python-2.7.12
# ./configure --prefix=/usr/local
@loinguyenduc101
loinguyenduc101 / IntelliJ IDEA 2016.2.5.txt
Created November 20, 2016 08:58
IntelliJ IDEA 2016.2.5.txt
43B4A73YYJ-eyJsaWNlbnNlSWQiOiI0M0I0QTczWVlKIiwibGljZW5zZWVOYW1lIjoibGFuIHl1IiwiYXNzaWduZWVOYW1lIjoiIiwiYXNzaWduZWVFbWFpbCI6IiIsImxpY2Vuc2VSZXN0cmljdGlvbiI6IkZvciBlZHVjYXRpb25hbCB1c2Ugb25seSIsImNoZWNrQ29uY3VycmVudFVzZSI6ZmFsc2UsInByb2R1Y3RzIjpbeyJjb2RlIjoiSUkiLCJwYWlkVXBUbyI6IjIwMTctMDItMjUifSx7ImNvZGUiOiJBQyIsInBhaWRVcFRvIjoiMjAxNy0wMi0yNSJ9LHsiY29kZSI6IkRQTiIsInBhaWRVcFRvIjoiMjAxNy0wMi0yNSJ9LHsiY29kZSI6IlBTIiwicGFpZFVwVG8iOiIyMDE3LTAyLTI1In0seyJjb2RlIjoiRE0iLCJwYWlkVXBUbyI6IjIwMTctMDItMjUifSx7ImNvZGUiOiJDTCIsInBhaWRVcFRvIjoiMjAxNy0wMi0yNSJ9LHsiY29kZSI6IlJTMCIsInBhaWRVcFRvIjoiMjAxNy0wMi0yNSJ9LHsiY29kZSI6IlJDIiwicGFpZFVwVG8iOiIyMDE3LTAyLTI1In0seyJjb2RlIjoiUEMiLCJwYWlkVXBUbyI6IjIwMTctMDItMjUifSx7ImNvZGUiOiJSTSIsInBhaWRVcFRvIjoiMjAxNy0wMi0yNSJ9LHsiY29kZSI6IldTIiwicGFpZFVwVG8iOiIyMDE3LTAyLTI1In0seyJjb2RlIjoiREIiLCJwYWlkVXBUbyI6IjIwMTctMDItMjUifSx7ImNvZGUiOiJEQyIsInBhaWRVcFRvIjoiMjAxNy0wMi0yNSJ9XSwiaGFzaCI6IjMzOTgyOTkvMCIsImdyYWNlUGVyaW9kRGF5cyI6MCwiYXV0b1Byb2xvbmdhdGVkIjpmYWxzZSwiaXNBdXRvUHJvbG9uZ2F0ZWQiOmZhbHNlf
@loinguyenduc101
loinguyenduc101 / ionic chrome.bat
Created January 15, 2017 08:50
ionic chrome.bat
TASKKILL /F /IM chrome.exe
start chrome.exe --args --disable-web-security --allow-file-access-from-files --user-data-dir
******************** các package nên được cài đặt sau khi cài centos 7 **********
Install epel repo
# yum install epel-release
các Development Tools group --> chứa các package cần thiết cho phép build source code
# yum group install "Development Tools"
Các tool cho phép tạo, check và monitor kết nối
#yum install net-tools
#yum install wget telnet curl nmap ftp
#1----------------------------------- check và enable network
show các Network interfaces trên máy
# ip addr show
để bring up hoặc take down một network interface ta sử dụng ifup/ifdown
#ifup XXX
#ifdown XXX
Nếu sử dụng Static IP == >config file tưởng tứng cho interface này (XXX là tên interface network)
#vi /etc/sysconfig/network-scripts/ifcfg-XXX
Note :
@loinguyenduc101
loinguyenduc101 / install IIB V10.txt
Last active February 20, 2017 04:06
install IIB V10
-------------------------------- install IBM Integration Bus
For Linux or UNIX systems:
- Security requirements:
+ single-user installation: thực hiện cài đặt trên home directory của user và chỉ user đó có quyền quản trị IIB
+ shared(multiple users) installation: dùng root hoặc super user đề cài(do write vào /var....), group mqbrkrs sẽ được tạo --> all user thuộc mqbrkrs sẽ có quyền quản trị IIB
ref:
https://www.ibm.com/support/knowledgecenter/en/SSMKHH_10.0.0/com.ibm.etools.mft.doc/bh26031_.htm
có thể convert từ single-user installation sang shared installaion
https://www.ibm.com/support/knowledgecenter/en/SSMKHH_10.0.0/com.ibm.etools.mft.doc/bh25994_.htm?view=kc
########
note : dùng Root or super user để cài
1. Setting up the user and group
https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_8.0.0/com.ibm.mq.ins.doc/q008500_.htm
Note: The only IBM MQ requirement, is that the mqm user should have the mqm group as its primary group.
- với Linux thì user mqm và group mqm sẽ được tự động tạo trong quá trình cài đặt rpm
eg:
@loinguyenduc101
loinguyenduc101 / IBM MQ Tunning.txt
Last active February 19, 2017 09:11
IBM MQ Tunning
#################################### V8.0 ###############################
##### sử dụng user thuộc mqm group để thao tác toàn bộ các lệnh #########
#1# validate config của MQ
#mqconfig -v 8.0
or
#MQ_CONFIG_OPTIONS="-v 8.0 -p group.mqm"
# . ./mqconfig
mqconfig: V3.7 analyzing CentOS Linux release 7.2.1511 (Core) settings