hoangdh / ghichep-ha Goto Github PK
View Code? Open in Web Editor NEWGhi chép tổng quan về giải pháp High Availability cho Web Server, Databases,...
Ghi chép tổng quan về giải pháp High Availability cho Web Server, Databases,...
Quan tri tu xa
CREATE USER 'root'@'%' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%';
FLUSH PRIVILEGES;
User cho maxscale
CREATE USER 'maxscale'@'%' IDENTIFIED BY 'you-password-here';
GRANT SELECT ON mysql.db TO 'maxscale'@'%';
GRANT SELECT ON mysql.user TO 'maxscale'@'%';
GRANT SHOW DATABASES ON *.* TO 'maxscale'@'%';
wget https://downloads.mariadb.com/MaxScale/latest/centos/7/x86_64/maxscale-2.0.5-1.centos.7.x86_64.rpm
yum install -y maxscale-*
Cau hinh
mv /etc/maxscale.cnf /etc/maxscale.cnf.bk
vi /etc/maxscale.cnf
Noi dung file cau hinh
[maxscale]
threads=4
syslog=0
maxlog=1
log_to_shm=1
log_warning=1
log_notice=1
log_info=0
log_debug=0
[Galera Monitor]
type=monitor
module=galeramon
servers=server1,server2,server3
user=maxscale
passwd=you-password-here
monitor_interval=2000
disable_master_failback=1
available_when_donor=1
[qla]
type=filter
module=qlafilter
options=/tmp/QueryLog
[fetch]
type=filter
module=regexfilter
match=fetch
replace=select
[RW Split Router]
type=service
router=readwritesplit
servers=server1,server2,server3
user=maxscale
passwd=you-password-here
max_slave_connections=100%
max_slave_replication_lag=30
[CLI]
type=service
router=cli
[RW Split Listener]
type=listener
service=RW Split Router
protocol=MySQLClient
port=3306
[CLI Listener]
type=listener
service=CLI
protocol=maxscaled
address=127.0.0.1
port=6603
[server1]
type=server
address=192.168.100.140
port=3306
protocol=MySQLBackend
[server2]
type=server
address=192.168.100.141
port=3306
protocol=MySQLBackend
[server3]
type=server
address=192.168.100.142
port=3306
protocol=MySQLBackend
https://linoxide.com/cluster/configure-mariadb-maxscale-galera-cluster/
pcs resource create vip2 ocf:heartbeat:IPaddr2 ip="X.X.X.X" cidr_netmask="24" nic="ethX" op monitor interval="30s"
Thêm tùy chọn nic="ethX": Chỉ định NIC lắng nghe
pcs resource master vip2-clone vip2 master-max=1 master-node-max=1 clone-max=2 clone-node-max=1 notify=true
pcs resource update vip2 IPAddr ip=192.168.2.200 cidr_netmask=24 op monitor interval=30s
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.