LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-04-2009, 02:45 PM   #1
invader44
Member
 
Registered: Dec 2008
Location: America
Distribution: Ubuntu 11.04
Posts: 64

Rep: Reputation: 15
setting the date on slackware


I am currently running slackware 12.1 with apache,squid,dansguardian. I have looked at the time of the server and it is set an hour ahead and now daylight savings time is coming upon us. How do I set this so it automatically syncs with a clock. Don't really want a reply of read the man pages. If I understood the man page of changing the date I probably wouldn't ask the question.
Thanks in advance.

vadder
 
Old 03-04-2009, 03:07 PM   #2
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 231Reputation: 231Reputation: 231
One way is to use ntpdate.

Just set up a cron job to sync once per day or even once per week if your clock is fairly accurate.

It's as simple as 'ntpdate timeserver.isp.com'

A list of servers can be found here http://support.ntp.org/bin/view/Servers/WebHome

Using NTP is the proper way to do it but since you don't want to RTFM I won't bore you with the details.
 
Old 03-04-2009, 03:58 PM   #3
invader44
Member
 
Registered: Dec 2008
Location: America
Distribution: Ubuntu 11.04
Posts: 64

Original Poster
Rep: Reputation: 15
Unhappy

thanks for the quick reply. I am new to slackware I understand how cronjobs work but how would I write one to sync to server somewhere? Could you give me an example? Have a lot of server and the time is one hour ahead. I just want to be able to have all servers with the right time. Without having to type date MMDDHHMMYYYYSS in all of them. Is there a directory in slackware that I can go to and find a config file to do this also?

vadder
 
Old 03-04-2009, 04:15 PM   #4
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
In Slackware, the typical method for setting the system clock is as root run the timeconfig utility. From there you can configure the system clock and time zone.

Be sure to have the latest timezone package patches installed as they contain the information needed for all the various time zones.

If you run KDE, then after running timeconfig, open the KDE Control Center, select System Administration, then select Date & Time. Select the Administrator Mode button and then configure the date and clock. The utility should already be synced with the settings created by the timeconfig utility. However, there is a check box in the KDE utility to automatically set the clock. You can use that option to keep the system clock synced. Yet if you are running the box as a server, then as suggested by mRgOBLIN, use ntpdate to keep your clock synced. Or run the ntp daemon.

Regardless of how you choose to sync the clock, you should first run timeconfig.
 
Old 03-04-2009, 04:40 PM   #5
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 231Reputation: 231Reputation: 231
Good point Woodsman. It is important that you set the timezone correctly and a good idea to manually set the clock before setting up something automatic.

Code:
ntpdate pool.ntp.org
will get your clock synced once the TimeZone is correct.

If you have lots of servers then you should really set up one that syncs to an outside source and set all the others to sync from that.
I guess a HowTo on setting up NTP would be useful... I'll put it on my ToDo list.
 
Old 03-04-2009, 06:14 PM   #6
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Quote:
I guess a HowTo on setting up NTP would be useful... I'll put it on my ToDo list.
Perhaps the following will help?

Configuring the NTP Daemon

 
Old 03-04-2009, 06:45 PM   #7
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 231Reputation: 231Reputation: 231
Damn no strikethrough option in the bbcode here
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting system date and time affecting the clock and date on BIOS satimis Ubuntu 7 09-21-2007 08:02 AM
Setting to a previous date pwnd Linux - Newbie 5 07-13-2006 03:12 AM
Setting date namit Linux - Newbie 3 04-03-2006 11:02 PM
setting date and time lynger Linux - Software 2 05-21-2004 12:10 AM
setting the date Nyc0n Linux - General 2 05-24-2002 02:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration