Semoga bermanfaat.
Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts
Wednesday, November 11, 2015
Video Instalasi SuSE Linux Enterprise Server 12
Berikut step by step video instalasi SuSE Linux Enterprise Linux 12 (the latest version).
Semoga bermanfaat.
Semoga bermanfaat.
Friday, August 16, 2013
Configure NTP clients under AIX and RHEL to syncronize with NTP server
This tutorial explains how to configure NTP on client with a NTP
server. In all below examples we have two NTP servers ntp01 and ntp02.
Here one as a primary and other one is secondary if primary fails
secondary will take it up.
Step 1 : Verify that you have a server suitable for synchronization by using below command
Step 2: Specify your xntp servers in /etc/ntp.conf . Comment out the “broadcastclient” line (if applicable )and add server ip.address/name of NTP server
# vi /etc/ntp.conf
Example for Linux
Step 3 : Start the xntpd/nfsd daemon:
AIX : Uncomment xntpd from /etc/rc.tcpip so it will start on a reboot.
Step 5 :Verify that the client is synched.
AIX Steps:
Linux Steps
The ntpq utility program (both for Linux and AIX )is used to monitor NTP daemon ntpd operations and determine performance and -p Print a list of the peers known to the server as well as a summary of their state
Step 1 : Verify that you have a server suitable for synchronization by using below command
# ntpdate -d ip.address.of.server ( Both for AIX and Linux )
Example
[root@webmanual01 ~]# ntpdate -d ntp01.webmanual.com
17 Jan 06:44:16 ntpdate[31056]: ntpdate 4.2.2p1@1.1570-o Wed Sep 3 14:28:30 UTC 2008 (1)
Looking for host ntp01.webmanual.com and service ntp
host found :ntp01.webmanual.com
transmit(10.88.36.2)
receive(10.88.36.2)
transmit(10.88.36.2)
receive(10.88.36.2)
transmit(10.88.36.2)
receive(10.88.36.2)
transmit(10.88.36.2)
receive(10.88.36.2)
transmit(10.88.36.2)
server 10.88.36.2, port 123
stratum 3, precision -17, leap 00, trust 000
refid [10.88.36.2], delay 0.02718, dispersion 0.00005
transmitted 4, in filter 4
reference time: d2bfeb7d.3713f077 Tue, Jan 17 2012 6:43:41.215
originate timestamp: d2bfeba1.0dc1b541 Tue, Jan 17 2012 6:44:17.053
transmit timestamp: d2bfeba1.055a2941 Tue, Jan 17 2012 6:44:17.020
filter delay: 0.02785 0.02718 0.02722 0.02733
0.00000 0.00000 0.00000 0.00000
filter offset: 0.032242 0.031947 0.031990 0.031962
0.000000 0.000000 0.000000 0.000000
delay 0.02718, dispersion 0.00005
offset 0.031947 17 Jan 06:44:17 ntpdate[31056]: adjust time server 10.88.36.2 offset 0.031947 sec
The offset must be less than 1000 seconds for xntpd to synch. If the
offset is greater than 1000 seconds, change the time manually on the
client and run the ntpdate -d again.17 Jan 06:44:16 ntpdate[31056]: ntpdate 4.2.2p1@1.1570-o Wed Sep 3 14:28:30 UTC 2008 (1)
Looking for host ntp01.webmanual.com and service ntp
host found :ntp01.webmanual.com
transmit(10.88.36.2)
receive(10.88.36.2)
transmit(10.88.36.2)
receive(10.88.36.2)
transmit(10.88.36.2)
receive(10.88.36.2)
transmit(10.88.36.2)
receive(10.88.36.2)
transmit(10.88.36.2)
server 10.88.36.2, port 123
stratum 3, precision -17, leap 00, trust 000
refid [10.88.36.2], delay 0.02718, dispersion 0.00005
transmitted 4, in filter 4
reference time: d2bfeb7d.3713f077 Tue, Jan 17 2012 6:43:41.215
originate timestamp: d2bfeba1.0dc1b541 Tue, Jan 17 2012 6:44:17.053
transmit timestamp: d2bfeba1.055a2941 Tue, Jan 17 2012 6:44:17.020
filter delay: 0.02785 0.02718 0.02722 0.02733
0.00000 0.00000 0.00000 0.00000
filter offset: 0.032242 0.031947 0.031990 0.031962
0.000000 0.000000 0.000000 0.000000
delay 0.02718, dispersion 0.00005
offset 0.031947 17 Jan 06:44:17 ntpdate[31056]: adjust time server 10.88.36.2 offset 0.031947 sec
Step 2: Specify your xntp servers in /etc/ntp.conf . Comment out the “broadcastclient” line (if applicable )and add server ip.address/name of NTP server
# vi /etc/ntp.conf
Example for Linux
[root@web-manual01 ~]# cat /etc/ntp.conf
server ntp01.webmanual.com
server ntp02.webmanual.com
driftfile /var/lib/ntp/drift
authenticate yes
Example for AIXserver ntp01.webmanual.com
server ntp02.webmanual.com
driftfile /var/lib/ntp/drift
authenticate yes
#broadcastclient
driftfile /etc/ntp.drift
tracefile /etc/ntp.trace
server ntp01.webmanual.com
server ntp02.webmanual.com
Leave the driftfile and tracefile at their defaults.driftfile /etc/ntp.drift
tracefile /etc/ntp.trace
server ntp01.webmanual.com
server ntp02.webmanual.com
Step 3 : Start the xntpd/nfsd daemon:
# startsrc -s xntpd (AIX )
# service ntpd start (Linux)
Step 4: Making ntpd to start on reboot # service ntpd start (Linux)
AIX : Uncomment xntpd from /etc/rc.tcpip so it will start on a reboot.
# vi /etc/rc.tcpip
Uncomment the following line
start /usr/sbin/xntpd “$src_running”
Linux : Run the command ” chkconfig ntpd on” so it will start on a reboot.Uncomment the following line
start /usr/sbin/xntpd “$src_running”
Step 5 :Verify that the client is synched.
AIX Steps:
# lssrc -ls xntpd
Example
lssrc -ls xntpd
Program name: /usr/sbin/xntpd
Version: 3
Leap indicator: 00 (No leap second today.)
Sys peer: ntp01.webmanual.com
Sys stratum: 5
Sys precision: -17
Debug/Tracing: DISABLED
Root distance: 0.029816
Root dispersion: 0.043655
Reference ID: 10.160.14.46
Reference time: d2bff453.c0f33000 Tue, Jan 17 2012 7:21:23.753
Broadcast delay: 0.003906 (sec)
Auth delay: 0.000122 (sec)
System flags: pll monitor filegen
System uptime: 707799 (sec)
Clock stability: 0.000107 (sec)
Clock frequency: 0.000000 (sec)
Peer: ntp01.webmanual.com
flags: (configured)(sys peer)
stratum: 4, version: 3
our mode: client, his mode: server
Peer: ntp01.webmanual.com
flags: (configured)(sys peer)
stratum: 4, version: 3
our mode: client, his mode: server
Subsystem Group PID Status
xntpd tcpip 13162 active
NOTE: Sys peer should display the IP address or name of your xntp server. This process may take up to 15 minutes. Program name: /usr/sbin/xntpd
Version: 3
Leap indicator: 00 (No leap second today.)
Sys peer: ntp01.webmanual.com
Sys stratum: 5
Sys precision: -17
Debug/Tracing: DISABLED
Root distance: 0.029816
Root dispersion: 0.043655
Reference ID: 10.160.14.46
Reference time: d2bff453.c0f33000 Tue, Jan 17 2012 7:21:23.753
Broadcast delay: 0.003906 (sec)
Auth delay: 0.000122 (sec)
System flags: pll monitor filegen
System uptime: 707799 (sec)
Clock stability: 0.000107 (sec)
Clock frequency: 0.000000 (sec)
Peer: ntp01.webmanual.com
flags: (configured)(sys peer)
stratum: 4, version: 3
our mode: client, his mode: server
Peer: ntp01.webmanual.com
flags: (configured)(sys peer)
stratum: 4, version: 3
our mode: client, his mode: server
Subsystem Group PID Status
xntpd tcpip 13162 active
Linux Steps
The ntpq utility program (both for Linux and AIX )is used to monitor NTP daemon ntpd operations and determine performance and -p Print a list of the peers known to the server as well as a summary of their state
ntpq -p
Example (Linux)
[root@webmanual01 sysconfig]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*ntp01.webmanual.com 169.254.0.1 3 u 70 128 377 2.043 -0.053 1.619
+ntp02.webmanual.com 169.254.0.1 3 u 52 128 377 1.934 -0.294 1.908
remote refid st t when poll reach delay offset jitter
==============================================================================
*ntp01.webmanual.com 169.254.0.1 3 u 70 128 377 2.043 -0.053 1.619
+ntp02.webmanual.com 169.254.0.1 3 u 52 128 377 1.934 -0.294 1.908
Tuesday, January 15, 2013
Set your hardware and system clocks with the date and hwclock commands
Today we’re looking at the date and hwclock commands to set your system and hardware clocks.
Have you ever put a server into production only to realize that you had not set the hardware clock to UTC or any other time? When you’ve already put the machine into production it’s pretty difficult to go to your manager and tell him that you need to shut the machine down to set the hardware clock. Using the date and hwclock commands will allow you to set both clocks with shutting down you machine.
Computer systems, administrators and users all rely on the correct date and time to function properly or make their jobs go smoother. The system uses cron to execute programs at a certain time. As an administrator you need the correct time when checking logs and looking for problems. If the system clock is off see how long it takes your users to start calling about incorrect dates and times on their documents. In short things are not going to go smoothly if the date and time is wrong on the system.
The most likely scenario is that your system clock is off because it is relying on your hardware clock for the correct time. Here is how we correct this. First you need to set the correct time for the system with the date command. Type the date command to see the date and time format of the string:
[root@virtual-host ~]# date
Sun Nov 16 16:51:53 EST 2008
[root@virtual-host ~]#
We want to use this exact type of string to set our system clock:
date --set=Sat Nov 15 18:49:00 EST 2008
Ok now we are going to set our hardware clock to this date:
hwclock --systohc --utc
That’s it. Now your hardware clock is set and your system clock can now keep the correct time by referring to it. You can also set your system clock from your hardware clock with the following command:
hwclock --hctosys
Both of these can be particularly important if you are trying to set up the ntp daemon to an internet time source and your system clock is off by more than a 1000 seconds. The ntp daemon will not work under these conditions so you must correct them.
Hope this helps you keep your systems on time!
Have you ever put a server into production only to realize that you had not set the hardware clock to UTC or any other time? When you’ve already put the machine into production it’s pretty difficult to go to your manager and tell him that you need to shut the machine down to set the hardware clock. Using the date and hwclock commands will allow you to set both clocks with shutting down you machine.
Computer systems, administrators and users all rely on the correct date and time to function properly or make their jobs go smoother. The system uses cron to execute programs at a certain time. As an administrator you need the correct time when checking logs and looking for problems. If the system clock is off see how long it takes your users to start calling about incorrect dates and times on their documents. In short things are not going to go smoothly if the date and time is wrong on the system.
The most likely scenario is that your system clock is off because it is relying on your hardware clock for the correct time. Here is how we correct this. First you need to set the correct time for the system with the date command. Type the date command to see the date and time format of the string:
[root@virtual-host ~]# date
Sun Nov 16 16:51:53 EST 2008
[root@virtual-host ~]#
We want to use this exact type of string to set our system clock:
date --set=Sat Nov 15 18:49:00 EST 2008
Ok now we are going to set our hardware clock to this date:
hwclock --systohc --utc
That’s it. Now your hardware clock is set and your system clock can now keep the correct time by referring to it. You can also set your system clock from your hardware clock with the following command:
hwclock --hctosys
Both of these can be particularly important if you are trying to set up the ntp daemon to an internet time source and your system clock is off by more than a 1000 seconds. The ntp daemon will not work under these conditions so you must correct them.
Hope this helps you keep your systems on time!
Subscribe to:
Comments (Atom)