follow http://www.cyberciti.biz/faq/set-date-time-network-time-protocol-ntp/
ntpdate -u pool.ntp.org
==================================
==================================
errro when set time using date command as “date: cannot set date: Operation not permitted”
solution:
http://www.linuxhelp.in/2011/09/date-cannot-set-date-operation-not.html
This post explains how to solve the following error while setting the time in a openvz container vps.
Error:
date: cannot set date: Operation not permitted
Reason:
Capability not set for the vps
Soultion:
On Openvz node:
Stop the vps
[root@test ~]# vzctl stop ID
set the parameter
[root@test ~]# vzctl set ID –save –capability sys_time:on
Saved parameters for CT ID
Start the vps
[root@test ~]# vzctl start ID
Enter into the vps
[root@test8 ~]# vzctl enter ID
entered into CT ID
[root@abc /]#
check date
[root@abc /]# date
Fri Sep 16 00:39:09 CST 2011
Change date
[root@abc /]# date -s “Tue Sep 27 00:39:09 CST 2011″
Tue Sep 27 00:39:09 CST 2011
check date again
[root@abc /]# date
Tue Sep 27 00:39:19 CST 2011
Thats it. Date has been changed.
================================
================================
CHANGE THE TIME ZONE IN THE SERVER
mv /etc/localtime /etc/localtime-old
ln -sf /usr/share/zoneinfo/EST localtime
No comments:
Post a Comment