Linux Slackware
Linux Slackware 15.0 comes with the “NTPD” daemon as standard, which is a full-featured client and server for time synchronization.
By default, it is not enabled, our task is to configure “NTPD” and provide autorun
To do this, on the desktop, at the bottom left, click “Kmenu”
Menu will appear
Go to the “System” section, then “Konsole”
Launching the terminal
We see a black screen and the command interpreter “Bash”
A prompt ending with a “$” means that we are in the console as a user with limited rights
You need to elevate your privileges in order to be able to edit system files
To do this, execute the command “su”, and enter the password of the superuser “root”
After successfully changing the user, the prompt icon will change to “#”, which means we have superuser rights
Run the file manager “Midnight Commander” with the command “mc”
In the program that opens, write the command to go to the directory with the settings files
We enter the command “cd /etc“
After executing the command, look for the file “ntp.conf“
Rename the original file with a keyboard shortcut “SHIFT+F6“
as a result:
Open a new empty file with the command “mcedit ntp.conf“
After executing the command, the editor window will open
We enter lines with parameters:
server pool1.ntp.od.ua
tinker panic 0
restrct default noquery nomodify
restrict 127.0.0.1
restrict pool1.ntp.od.ua
After completion, press the button on the keyboard “F2” and agree to save the file “Save”
Next, we will return to the file manager again.
writing a command “cd rc.d“
In the rc.d directory we find the file “inet1.conf“
Open it in edit mode with the key “F4“
Assuming you are using a DHCP client and getting network settings from a DHCP server
You may also be given the settings of the time server of your network, so that these settings do not overlap your changes in the file, you must prohibit modifying them
To do this, in the file for the “eth0” network card, add the line ” DHCP_KEEPNTP[0]=”yes” “ if your network card has a different name, then take this into account when changing
Save the changes with “F2” and confirm with “Save”
Next, in the file manager in the same directory, we find the file “rc.ntpd“
It currently does not have the execute bit set, which means it will not run when the system is turned on.
We fix this behavior with the command “chmod 755 rc.ntpd“
After executing the command, the file will change color and will have a symbol at the beginning “* звездочки“
Exit the file manager with the keyboard key “F10“
At the command line, enter the command to start the time synchronization daemon “/etc/rc.d/rc.ntpd start“
The completed launch looks like this
Checking the synchronization status with the command “ntpq -pn 127.0.0.1“
Execution result shown pool as time source
After a while, an IP address from the pool will be added
After another time against the selected time source, “* asterisk” will appear
Setup completed.
Leave a Reply