原创作品,允许转载,转载时请务必以超链接形式标明文章
原始出处 、作者信息和本声明。否则将追究法律责任。
http://dgd2010.blog.51cto.com/1539422/1603972
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#syslog-->Rsyslog-->journald
# enable syslog for haproxy
sed
-i
's/SYSLOGD_OPTIONS=""/SYSLOGD_OPTIONS="-r"/g'
/etc/sysconfig/rsyslog
cat
>
/etc/rsyslog
.d
/haproxy
.conf<<eof
# Log haproxy(local2.*) stuff
\$ModLoad imudp
\$UDPServerRun 514
local2.*
/var/log/haproxy
.log
eof
chown
-R --reference=
/etc/rsyslog
.d
/listen
.conf
/etc/rsyslog
.d
/haproxy
.conf
chcon -R --reference=
/etc/rsyslog
.d
/listen
.conf
/etc/rsyslog
.d
/haproxy
.conf
systemctl restart rsyslog.service
# enable syslog for keepalived
sed
-i
's/KEEPALIVED_OPTIONS="-D"/KEEPALIVED_OPTIONS="-D -S 0"/g'
/etc/sysconfig/keepalived
cat
>
/etc/rsyslog
.d
/keepalived
.conf<<eof
# Log keepalived(local0.*) stuff
\$ModLoad imudp
\$UDPServerRun 514
local0.*
/var/log/keepalived
.log
eof
chown
-R --reference=
/etc/rsyslog
.d
/listen
.conf
/etc/rsyslog
.d
/keepalived
.conf
chcon -R --reference=
/etc/rsyslog
.d
/listen
.conf
/etc/rsyslog
.d
/keepalived
.conf
systemctl restart rsyslog.service
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
[root@controllernode1 ~]
# delsc /etc/my.cnf.d/galera.cnf
[mysqld]
binlog_format=ROW
default-storage-engine=innodb
innodb_autoinc_lock_mode=2
innodb_locks_unsafe_for_binlog=1
query_cache_size=0
query_cache_type=0
bind-address=0.0.0.0
wsrep_provider=
/usr/lib64/galera/libgalera_smm
.so
wsrep_provider_options=
"pc.wait_prim=no; pc.bootstrap=true;"
wsrep_cluster_name=
"wsrep_cluster"
wsrep_cluster_address=
"gcomm://"
wsrep_slave_threads=1
wsrep_certify_nonPK=1
wsrep_max_ws_rows=131072
wsrep_max_ws_size=1073741824
wsrep_debug=0
wsrep_convert_LOCK_to_trx=0
wsrep_retry_autocommit=1
wsrep_auto_increment_control=1
wsrep_drupal_282555_workaround=0
wsrep_causal_reads=0
wsrep_notify_cmd=
wsrep_sst_method=
rsync
wsrep_sst_auth=root:password
[root@controllernode1 ~]
#
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
[root@controllernode2 ~]
# delsc /etc/my.cnf.d/galera.cnf
[mysqld]
binlog_format=ROW
default-storage-engine=innodb
innodb_autoinc_lock_mode=2
innodb_locks_unsafe_for_binlog=1
query_cache_size=0
query_cache_type=0
bind-address=0.0.0.0
wsrep_provider=
/usr/lib64/galera/libgalera_smm
.so
wsrep_provider_options=
"pc.wait_prim=no; pc.bootstrap=true;"
wsrep_cluster_name=
"wsrep_cluster"
wsrep_cluster_address=
"gcomm://192.168.21.11"
wsrep_slave_threads=1
wsrep_certify_nonPK=1
wsrep_max_ws_rows=131072
wsrep_max_ws_size=1073741824
wsrep_debug=0
wsrep_convert_LOCK_to_trx=0
wsrep_retry_autocommit=1
wsrep_auto_increment_control=1
wsrep_drupal_282555_workaround=0
wsrep_causal_reads=0
wsrep_notify_cmd=
wsrep_sst_method=
rsync
wsrep_sst_auth=root:wd2015
[root@controllernode2 ~]
#
|