Skip to content

Instantly share code, notes, and snippets.

View loinguyenduc101's full-sized avatar

Loi Nguyen loinguyenduc101

View GitHub Profile
@loinguyenduc101
loinguyenduc101 / Uninstalling IBM MQ V8 on Linux.txt
Last active February 18, 2017 17:59
Uninstalling IBM MQ on Linux
------------------------ Uninstalling IBM MQ on Linux
1. Stop toàn MQ applications
login với user trong group mqm
stop toàn bộ các QM và listner tương ứng của QM đang running
#. MQ_INSTALLATION_PATH/bin/setmqenv -s
#dspmq -o installation -s
#endmqm QMgrName
@loinguyenduc101
loinguyenduc101 / administer IBM MQ v8.txt
Last active February 18, 2017 18:06
administer IBM MQ v8
Show all các QM
#dspmq -o installation -s
Tạo QM
#crtmqm QMA
Start/Stop QM
#strmqm QMA
#endmqm QMA
Các lệnh thao tác trên môi trường MQSC
#runmqsc QMA --start MQSC
#end --stop MQSC
@loinguyenduc101
loinguyenduc101 / administer IIB V10 via CLI.txt
Last active February 20, 2017 04:06
administer IIB V10 via CLI
-------- Setting up a command environment
#. install_dir/server/bin/mqsiprofile
NOTE:
- để run các command mqsi* thì bắt buộc phải chạy mqsiprofile để init environment.
- workpath của IIB sau khi cài là /var/mqsi/. Chứa toàn bộ các config và resource được deploy xuống integration node/server.
--------- kiểm tra phiên bản, verify node
#./iib version
or
#mqsiservice -v
@loinguyenduc101
loinguyenduc101 / config NFS on CentOS 7.txt
Last active May 16, 2023 10:17
config NFS on CentOS 7
+----------------------+ | +----------------------+
| [ NFS Server ] | 192.168.146.128 | 192.168.146.129 | [ NFS Client ] |
| iib01 +-----------------+-----------------+ iib02 |
| | | |
+----------------------+ +----------------------+
NOTE:
NFS chỉ hỗ trợ đồng bộ một chiều từ Client --> Server.
Step 1,2,3 thực hiện đồng thời trên NFS Server/Client
1. Install NFS trên cả server/client
@loinguyenduc101
loinguyenduc101 / Create JDBC Provider.txt
Created February 21, 2017 18:22
Create JDBC Provider [Tested on IIB 10.0.0.7, Oracle 12c]
1. xóa đi nếu có
#mqsideleteconfigurableservice IBNODE1 -c JDBCProviders -o ABB_DB
2. Tạo JDBCProviders với tên và các tham số tương ứng cho từng db
#mqsicreateconfigurableservice IBNODE1 -c JDBCProviders -o ABB_DB -n type4DatasourceClassName,type4DriverClassName,databaseType,jdbcProviderXASupport,portNumber,connectionUrlFormatAttr5,connectionUrlFormatAttr4,serverName,connectionUrlFormatAttr3,connectionUrlFormatAttr2,connectionUrlFormatAttr1,environmentParms,maxConnectionPoolSize,description,jarsURL,databaseName,databaseVersion,securityIdentity,connectionUrlFormat,databaseSchemaNames -v "oracle.jdbc.xa.client.OracleXADataSource","oracle.jdbc.OracleDriver","Oracle","true","1521","","","192.168.2.106","","","orcl","default_none","20","default_Description","/opt/ibm/iib/lib","default_Database_Name","default_Database_Version","default_User@default_Server","jdbc:oracle:thin:[user]/[password]@[serverName]:[portNumber]:[connectionUrlFormatAttr1]","useProvidedSchemaNames"
NOTE: Ta có thể lấy các đối số của
@loinguyenduc101
loinguyenduc101 / JDBC Failover - Highly Available Oracle Databases.txt
Last active March 2, 2017 07:57
JDBC Failover - Highly Available Oracle Databases ( TNSPing ).txt
jdbc:oracle:thin:@(DESCRIPTION=(FAILOVER=on)(LOAD_BALANCE=on)(CONNECT_TIMEOUT=3)(RETRY_COUNT=3)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.32.11.44)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=10.32.11.45)(PORT=1521)))(CONNECT_DATA=(SERVER=share)(SERVICE_NAME=pdb1)))
########## Spring Boot Actuator 1.5.2
## Overview
- là một sub-project của spring boot, và chỉ sử dụng với ứng dụng spring boot
- cung cấp một số features cho giúp monitor và manage ứng dụng spring boot.
- có thể sử dụng HTTP Endpoints, JMX, Remote shell ( SSH or Telnet) để thực hiện monitor và manage
## Features: các tính năng sẽ tự động được apply vào ứng dụng spring boot
+ Endpoints: eg health information
+ Audit
+ Metrics: Thực hiện đo và đếm các thông tin system, http request ....
@loinguyenduc101
loinguyenduc101 / spring-bad request response json.txt
Created April 9, 2017 16:08
spring-bad request response json
{
"timestamp": 1491753977762,
"status": 400,
"error": "Bad Request",
"exception": "org.springframework.web.bind.MethodArgumentNotValidException",
"errors": [
{
"codes": [
"NotBlank.loginRequest.password",
"NotBlank.password",
@loinguyenduc101
loinguyenduc101 / Restful API Versioning.txt
Created April 10, 2017 04:15
Restful API Versioning
################ Restful API Versioning
1. URL based
/v1/users
/v2/users
2. Custom HTTP header
make request /v1/users with custome request header:
X-API-Version: 1.0
X-API-Version: 2.0
@loinguyenduc101
loinguyenduc101 / Transmission - BitTorrent client.txt
Last active May 18, 2017 07:10
Transmission - BitTorrent client
### https://transmissionbt.com/
### https://github.com/transmission/transmission/wiki/Configuration-Files
### https://github.com/transmission/transmission/wiki/Editing-Configuration-Files
### bao gồm
1. transmission-daemon: dạng service
systemctl start transmission-daemon.service
systemctl enable transmission-daemon.service
help:
#transmission-daemon --help