Linux 时间同步配置
一. 使用 Network Time Protocol (NTP) 服务器
1.1 服务器可链接外网时
# crontab -e
加入一行:
*/1 * * * * ntpdate 210.72.145.44
210.72.145.44 为中国国家授时中心服务器地址,这样该机每隔1分重就可以与国家授时中心进行同步了。
注意: 在使用ntpdate 命令时, ntpd 服务必须是关闭的, 否则会报the NTP socket is in use, exiting 错误。
关闭 ntpd 服务命令如下:
[root@node2 init.d]# /etc/init.d/ntpd stop
Shutting down ntpd: [ OK ]
1.2. 架设本地时间服务器
需要修改 /etc/ntp.conf文件里的几个配置就可以了,比如本地时间服务器IP 为 10.85.10.119, 配置如下:
server 210.72.145.44 prefer (中国国家授时中心服务器地址 prefer表示优先 注意把默认的server更改成这样)
server 127.127.1.0 (本地时间)
restrict 10.85.10.0 mask 255.255.255.0 nomodify (允许10..85.10.* 的IP 使用该时间服务器)
restrict 0.0.0.0 mask 0.0.0.0 nomodify notrap noquery notrust (屏蔽其他IP过来更新时间)
其他的保持默认不动。
使NTP服务可以在系统引导的时候自动启动,执行:
# chkconfig ntpd on
启动/关闭/重启NTP的命令:
# /etc/init.d/ntpd start
# /etc/init.d/ntpd stop &nbs
相关文档:
本原创文章属于《Linux大棚》博客,博客地址为http://roclinux.cn。文章作者为rocrocket。
启动第一步--加载BIOS
当你打开计算机电源,计算机会首先加载BIOS信息,BIOS信息是如此的重要,以至于计算机必须在最开始就找到它。这是因为BIOS中包含了CPU的相关信息、设备启动顺序信息、硬盘信息、内存信息、时钟信息、PnP特 ......
bool RemoveNode(string& szFileName)
{
TiXmlDocument myDocument(szFileName);
bool loadOkay = myDocument.LoadFile();
if(loadOkay == false)
return false;
//获得根元素
TiXmlElement *rootElemen ......
装完
NeoShine
Linux 4.0
后,插上耳机后,耳机和喇叭同时发声。
要解决这个故障, 关键问题在于找到文件
ALSA-Configuration.txt
。
这个文件里有声卡类型与
model
(模块)的对照表。
下面是操作的正确步骤:
1
、下载声卡驱动程序、库文件、工具,下面是目前最新的驱动程序,下载网址:
驱动程序:
ftp: ......
bool InstertNode(string& szFileName)
{
TiXmlDocument myDocument(szFileName);
bool loadOkay = myDocument.LoadFile();
if(loadOkay == false)
return false;
//获得根元素
TiXmlElement *r ......
< id="MediaPlayerObject" style="visibility: hidden;" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="0" height="0" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701">
1. 创建目录
mkdir
......