Thứ Năm, 20 tháng 7, 2017

[IBM AIX] How to configure the NTP Client (The same for NTP Server) in AIX servers.

1. Stop the ntp services
          #stopsrc –s xntpd
2. Sync the time with ntp, login as root, type
          #ntpdate <ip_address of the NTP server>
          #ntpdate –d <ip_address of the NTP server>
3. Make a copy of the file /etc/ntp.conf
          #cp /etc/ntp.conf /etc/ntp.conf_bak
4. Edit file /etc/ntp.conf and append
          #broadcastclient --Comment out
          server <ip_address of the NTP server> prefer
server <ip_address of the NTP server>
          driftfile /etc/ntp.drift
          tracefile /etc/ntp.trace

6. Create the file /etc/ntp.drift with the following entry:
          0.0
7. After creating the drift file, ensure that it has the right ownership and permissions:
          -rw-r--r-- 1 ntp ntp 6 Mar 2 11:09 drift
8. Start the NTP sercice
          #startsrc –s xntpd

NOTE: If the server runs databases, use the -x flag to prevent the clock from changing in a negative direction. Enter the following
           # startsrc -s xntpd -a "-x"

9. Take backup and uncomment xntpd from /etc/rc.tcpip. so it will start on a reboot.
          #cp –p /etc/rc.tcpip /etc/rc.tcpip_bak
          #vi /etc/rc.tcpip
          Uncomment the following line
          Start /usr/sbin/xntpd “$src-running”
10. Verify that the server is synched.
          #lssrc -ls xntpd
          ntpdate –q <ntpserver> should not show the time difference more than 1 sec.

Reference:



broadcastclient
Specifies that the local server listen for broadcast messages on the local network in order to discover other servers on the same subnet. When the local server hears a broadcast message for the first time, it measures the nominal network delay using a brief client/server exchange with the remote server, then enters the broadcastclient mode, where it listens for and synchronizes to succeeding broadcast messages.

Chủ Nhật, 16 tháng 7, 2017

[ORACLE - GRID] How to create an app HA on GRID


1/ Create VIP IP

/u01/app/grid/bin/appvipcfg create -network=1 -ip=192.168.0.220 -vipname=ggate_vip -user=root

2/ Set Grid can manage VIP IP


/u01/app/grid/bin/crsctl setperm resource ggate_vip -u user:oracle:r-x


3/ Start VIP IP


/u01/app/grid/bin/crsctl start resource ggate_vip

4/ Create Script Manage Resource


/u01/app/grid/bin/crsctl add resource ggate_mgr -type cluster_resource -attr "ACTION_SCRIPT=/u01/app/grid/crs/script/GoldenGate_action.scr, CHECK_INTERVAL=30, START_DEPENDENCIES='hard(ggate_vip,ora.racdb.db) pullup(ggate_vip)'STOP_DEPENDENCIES='hard(ggate_vip)' SCRIPT_TIMEOUT=300, RESTART_ATTEMPTS=6"


5/ set Permisssion


/u01/app/grid/bin/crsctl setperm resource ggate_mgr -o ggate


6/ Stop ggs and start ggs by grid command


GGSCI> STOP MGR

/u01/app/grid/bin/crsctl start resource ggate_mgr