Site, Server Genel » Genel Makaleler

Linux sistem saatini otomatik duzeltmek

http://forum.whmdestek.com/

Go Back   WHM/cPanel Support Platform » Türkçe » Site, Sunucu Sorunlarınız ve Çözümleri » Site, Server Genel » Genel Makaleler
 


Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 12.07.08, 15:28
Banned
 
Join Date: Mar 2008
Location: Turkiye
Age: 21
Posts: 116
Rep Power: 0
asker is on a distinguished road
Send a message via MSN to asker Send a message via Skype™ to asker
Linux sistem saatini otomatik duzeltmek

Bazen, her nedense, serverimizin saati geri kalir yada ileri gider.

Bir kac saniye bile olsa bu fark bazen sorun yaratabilir, ornegin replication yapilan 2 server icin zamanin ayni olmasi onemlidir.

Bu script ile sistem saatinizi otomatik olarak dogru bir sekilde kurabilirsiniz.

Scripti crontab ile her gun belli bir saatte calistirarak bu islemi otomatik hale getirmis olursunuz.

Bu islemleri root kullanicisi ile yapiniz.

1. asagidaki satirlari saatkur.sh adli dosyaya kaydedin, bunun icin ssh de pico yada vi kullanabilirsiniz. Yada PC nizde dosyaya atarak FTP ile makinaniza aktarabilirsiniz.


Quote:
/usr/bin/rdate -s time-a.nist.gov
if [ $? -ne 0 ]; then /usr/bin/rdate -s time-b.nist.gov; fi
if [ $? -ne 0 ]; then /usr/bin/rdate -s time-a.timefreq.bldrdoc.gov; fi
if [ $? -ne 0 ]; then /usr/bin/rdate -s time-b.timefreq.bldrdoc.gov; fi
if [ $? -ne 0 ]; then /usr/bin/rdate -s time-c.timefreq.bldrdoc.gov; fi
if [ $? -ne 0 ]; then /usr/bin/rdate -s tick.ucla.edu; fi
if [ $? -ne 0 ]; then /usr/bin/rdate -s utcnist.colorado.edu; fi
if [ $? -ne 0 ]; then /usr/bin/rdate -s nist.expertsmi.com; fi
/sbin/hwclock --systohc --utc
2.
Programi calisir hale getirin. Bunu FTP programi (or. WS_FTP) araciligi ile yapabileceginiz gibi, shell ortaminda
Quote:
chmod 755 saatkur.sh
komutu da isinizi gorecektir.

3.
Programin tam dizininin /root/saatkur.dh oldugunu varsayalim.

Quote:
crontab -e
komutu ile cronu acip bu satiri ekleyin

Quote:
3 0 * * * /root/saatkur.sh> /dev/null 2>&1
ve crontabi kaydedip cikin.

Bu satir her gun gece yarisini 3dk gece sistem saatini duzeltecektir.

4.
Programin test etmek icin asagidaki komutlari calistirin:

Quote:
date;/root/saatkur.sh;date
ilk tarih ile ikinci tarih arasinda buyuk fark var ise program sistem saatiniz duzeltmis demektir.
Fark yok ise sistem saatiniz zaten dogruymus demektir.
İyi Çalışmalar
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old 12.07.08, 20:46
Onur's Avatar
SysAdmin
 
Join Date: Jun 2007
Location: Karaman
Age: 20
Posts: 866
Rep Power: 1013
Onur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond reputeOnur has a reputation beyond repute
Send a message via MSN to Onur
http://forum.whmdestek.com/9759-post35.html
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old 12.07.08, 21:48
Banned
 
Join Date: Mar 2008
Location: Turkiye
Age: 21
Posts: 116
Rep Power: 0
asker is on a distinguished road
Send a message via MSN to asker Send a message via Skype™ to asker
anaa valla haberim yokdu görmedim :S aradım bulamadım :S
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old 14.07.08, 15:10
HoST13's Avatar
Athlon Dual Core
 
Join Date: Jan 2008
Location: Trabzon
Age: 19
Posts: 331
Rep Power: 1
HoST13 will become famous soon enough
Send a message via MSN to HoST13
neyse o kopyalarken güzel kopyılayamamış:p
__________________
WHMCS Destek | MyBB Destek
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old 14.07.08, 18:37
Banned
 
Join Date: Mar 2008
Location: Turkiye
Age: 21
Posts: 116
Rep Power: 0
asker is on a distinguished road
Send a message via MSN to asker Send a message via Skype™ to asker
Quote:
Originally Posted by HoST13 View Post
neyse o kopyalarken güzel kopyılayamamış:p
eyvallah sagol
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old 14.07.08, 21:55
Banned
 
Join Date: Apr 2008
Location: ABD
Posts: 181
Rep Power: 0
gunes788 has a little shameless behaviour in the past
Send a message via MSN to gunes788 Send a message via Skype™ to gunes788
Güzel paylaşim tşk
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
nix sistem sunucuda HDD(Harddisk) tanımlamak(mount) CaLViN Genel Makaleler 7 21.11.08 03:13
Sosyal güvenlikte yeni sistem darkwinter Güncel 0 20.05.08 14:05
Linux sistem saatinin değiştirilmesi.. sinangunay Site, Server Genel 2 20.02.08 19:56
Sistem Mail Göndermiyor RAMBilisim AWBS Destek 4 06.10.07 08:48
Sistem Güvenliği Nasıl Sağlanır? CaLViN Genel Makaleler 0 19.06.07 17:14


Sign up for PayPal and start accepting credit card payments instantly.

Navigasyon
Menü