麒麟操作系统安装手册 联系客服

发布时间 : 星期三 文章麒麟操作系统安装手册更新完毕开始阅读7ec9b3f659f5f61fb7360b4c2e3f5727a5e92405

# Permit time synchronization with our time source, but do not # permit the source to query or modify the service on this system. #restrict default kod nomodify notrap nopeer noquery #restrict -6 default kod nomodify notrap nopeer noquery

# Permit all access over the loopback interface. This could # be tightened as well, but to do so would effect some of # the administrative functions. restrict 127.0.0.1 #restrict -6 ::1

# Hosts on local network are less restricted.

#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap #restrict 192.168.10.0 mask 255.255.255.0nomodify notrap #设置只允许192.168.10.0网段的客户机进行时间同步

# Use public servers from the pool.ntp.org project. # Please consider joining the pool (http://www.pool.ntp.org/join.html). #server 0.pool.ntp.org #server 1.pool.ntp.org #server 2.pool.ntp.org

server 192.168.10.2 iburst

#设置此服务器用上层服务器做时间同步的IP地址,也可以是本机地址 #通俗的话就是该节点去找谁对时,如果是本机不是时钟源,那么需要将下面蓝色字体那一行注释掉

#broadcast 192.168.1.255 autokey # broadcast server #broadcastclient # broadcast client #broadcast 224.0.1.1 autokey # multicast server #multicastclient 224.0.1.1 # multicast client #manycastserver 239.255.254.254 # manycast server #manycastclient 239.255.254.254 autokey # manycast client # Undisciplined Local Clock. This is a fake driver intended for backup # and when no outside source of synchronized time is available. server 127.127.1.0 # local clock #fudge 127.127.1.0 stratum 10

#设置此服务器做时间同步的源,如果不是用本机做时间源,将这两行去掉

或用#注释掉。

# Enable public key cryptography. #crypto

37 / 47

includefile /etc/ntp/crypto/pw # Key file containing the keys and key identifiers used when operating # with symmetric key cryptography. keys /etc/ntp/keys

# Specify the key identifiers which are trusted. #trustedkey 4 8 42

# Specify the key identifier to use with the ntpdc utility. #requestkey 8

2) 重启动ntp服务

重启ntp服务:[root@smart etc]#service ntpd restart 查看ntp服务状态:[root@smart etc]#service ntpd status

设置开机自启动:[root@smart etc]#chkconfig --level 35 ntpd on

4.8.2 Ntp客户端配置

1) 手工执行 ntpdate 来同步 2) 利用crontab来执行

crontab –e

0-59/10 * * * * /usr/sbin/ntpdate 192.168.10.2 >> /root/ntpdate.log 2>&1

#红色“10”表示每隔10分钟同步一次时间,可以修改该数字以灵活配置时间

4.9 版本库服务配置

注意事项:该配置仅在版本库服务器上执行

4.9.1 创建svn版本库

1、 创建svn仓库(以襄阳主站为例,在scada2机器上创建,凝思V6.0系统/银河麒

麟系统)

进入root用户,创建 #cd /home/

#mkdir svn_wx (wx是无锡的首字母简写,根据工程名称相应填写) #chown -R smart:smart svn_wx 切换至smart用户

$ svnadmin create /home/svn_wx/smartsys (创建smartsys仓库)

仓库创建成功以后,会出现一个仓库名字的文件夹 文件夹下面有以下几个文件和目录 conf db format hooks locks README.txt,其中conf文件夹下面包含三个重要文件 authz, passwd, svnserve.conf

如下图所示:

38 / 47

2、 修改配置文件

在smart用户下修改三个配置文件:passwd,svnserve.conf,authz 1) 配置用户文件passwd

$ cd /home/svn_wx/smartsys/conf $ vi passwd

passwd的配置非常简单 语法格式: 用户名=密码 在最后一行增加smart = smart

2) 配置启动项参数svnserve.conf

$ vi svnserve.conf

改为如下图红框标注所示:

39 / 47

3) 增加用户权限authz $ vi authz

改为如下图红框标注所示:

40 / 47