服务器的安装与配置v_第1页
服务器的安装与配置v_第2页
服务器的安装与配置v_第3页
服务器的安装与配置v_第4页
服务器的安装与配置v_第5页
已阅读5页,还剩38页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、TMS 服务器的安装与配置1.CentOS 安装CentOS 操作系统是商业版Red Hat Enterprise Linux(RHEL)的版,是架构 LAMP 的理想操作系统,稳定性非常好,和 Ubuntu 不同的是,CentOS 主要用于服务器而不是桌面环境,不少大型的商业都使用CentOS 操作系统。截止目前 CentOS 6.x 最新版本为 CentOS 6.5,下面介绍 CentOS 6.5 的具体安装配置过程服务器相关设置如下:操作系统:CentOS 6.5 64 位IP 地址:29网关:DNS:备注:Ce

2、ntOS 6.5 系统镜像有 32 位和 64 位两个版本,生产服务器如果是大内存(4G 以上内存)建议安装 64 位版本 CentOS-6.5-x86_64-bin-DVD1.iso附:CentOS 6.5地址32 位:64 位:1、CentOS 6.5 系统镜像有两个,安装系统只用到第一个镜,即 CentOS-6.5-i386-bin-DVD1.iso(32 位)或者 CentOS-6.5-x86_64-bin-DVD1.iso(64 位),第二个镜像是系统自带软件安装包;2、安装 CentOS 6.5 系统的计算机内存必须等于或者大于 628M(最小内存 628M),才能启用图形安装模式

3、;3、CentOS 6.5 文本安装模式不支持自定义分区,建议使用图形安装模式安装;4、CentOS 6.5 的系统安装方式分为:图形安装模式和文本安装模式;5、CentOS 6.5 的系统运行方式分为:带图形界面、可以用鼠标操作的图形化不带图形界面、直接用命令行操作的文本方式(具体的系统运行方式,可以在系统安装的过程中自定义选择);。安装步骤:CD 或 DVD 盘,选择光驱启动,用光盘引导系统,会出现下面的界面1.【界面说明】:Install or upgrade an existing system 安装或升级现有的系统driver 安装过程中采用 基本的显卡驱动install syste

4、m with basicRescue installed system 进入系统修复模式安装从硬盘启动Boot from local driveMemory test 内存检测这里选择第一项,安装或升级现有的系统,。2. 弹出“是否对 CD进试”的提问,这里选择“Skip”跳过测试。3. 进入安装欢迎界面,如下图:点击next 进入4. 在弹出的语言选择界面中选择简体中文,点击next 进入5. 在弹出的键盘选择界面中选择“美国英语式”,点击next 进入。6. 选择安装到哪一个设备,我们没有特别的要求就选择基本设备就可以了。提示我们是否要保留硬盘里的数据,选择第一项:是,忽略所有数据,如果需

5、要保留数据,则选:否,保留所有数据。7. 接下来设置系统的主机名,输入主机名为:tmsserver,点“8. 在弹出的设置时区窗口中,选择:亚洲/上海,并在“系统时钟用户 UTC 前面打勾, 使用 UTC 时间,点击:9. 在弹出的设置窗口中,设置root为:YHN9ij,点击:。注意:如果你使用的过于简单,系统会自动提示:您的不够安全,过于简单化/系统化,这里选择“Use Anyway 无论如何都使用。但是,在生产环境必须设置强壮复杂的10. 在弹出的分区设置界面中,选择“使用所有空间“,如果对于分区有特殊要求,则选择”创建自定义布局“,点击。将要安装系统的盘选中移动到右边,其他硬盘留在左边

6、不动。挂载分区 (点Create 创建一个分区,默认选择 Stantard Partition(标准分区),选择挂载点、分区大小即可创建分区)下面是分区方式(不同的用途可以选择不同的分区,最后不要忘记swap 分区哦),点Next,选择 Format(格式化),再选 Write Change to disk(把分区表写入硬盘)分别设置nnn/boot 分区为 200Mswap 分区为内存的两倍(若内存为 2G,则 swap 分区为 4096M)/分区为:剩余所有选择 sdb 点击【Create】按钮,将剩余的几个 T,挂载到/data 下组后分区结果如下:安装 装载引导程序(默认即可)点击“将

7、修改写入磁盘“11. 、接下来格式化硬盘分区12. 然后进入安装界面,这里选择:桌面。在生产的系统里,可以最小化安装之后再进行处理。但不要安装没有必要的软件。然后选“现在自定义“,选择安装需要的开发工具包软件。(也可以选以后自定义,也可以在需要的时候通过 yum 源、rpm 或者编译来安装软件包。)在自定义几面中做如下选择:n 在“可扩展文件系统“中:选择所有的包n 在“基本系统“中选择:u Java 平台默认u 基本-默认uuuuuuu打印客户端-默认台互联网工具:选 ftp-0.17智能卡-默认目录客户端-默认网络文件系统客户端-默认联网工具-默认调试工具-默认nn在“应用程序“中选择:默

8、认在“开发 “中选择:uuu开发工具除 cvs_inetd 其他全选服务器平台开发-默认附加开发-全选nn在“数据库“中选择:mysql 服务器-默认在“服务器“中选择:u 服务器平台-默认u 系统管理工具全选在“桌面“中选择:默认在“系统管理“中选择:u SNMP全选u 系统管理-默认nn13. 安装完成后,点击“重新引导“,会重启,能启动起来则省去这 1 步,启动不起来则按下面步骤执行:14.系统重新启动后,按 F2 键,进入系统设置界面选择:System BIOS Processor Settings 将 Virtualization Technology 设置为 Disabled。然后

9、点击“exitSaving Changes选Yesreboot选 Yes”,重新启动。15. 系统重新启动后,欢迎界面,鼠标单击“前进”按钮继续证信息,必须选“是,我同意该证协议”鼠标单击“前进”按钮继续。16.17. 创建新用户和(tms/TmsUser),鼠标单击“前进”按钮继续18. 时间设置可以联网同步或手工设置,鼠标单击“前进”按钮继续。19. Kdump 选择不启用,鼠标单击“完成”按钮继续;就可看到Linux 系统登录界面了。2.服务器网络设置:1. 点击:系统首选项网络连接2. 选中要操作的网卡,点击编辑3. 选中“自动连接”,选择 IPv4 设置,将方法选为“手动”,然后点击

10、“添加”,依次输入地址、子网掩码、网关,DNS; 选择“对所有用户可用“,然后点”应用“即可。4.若配置完成后还是连接不通,则在命令行中执行如下命令: roottmsserver#ifconfig eth0 downroottmsserver#ifconfig eth0 up3.设置对 NTFS 格式硬盘的支持:Centos 默认不支持 NTFS 格式的文件需要安装和配置。【安装步骤】:1. 软件的包:从最新()rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm 并拷贝到要安装的的某个目录下(例子中是拷贝到/home 目录下)2. 软件安装:进入 rpmfor

11、ge-release-0.5.3-1.el6.rf.x86_64.rpm 所在的目录,安装,如下:roottmsserver# rpm -ivh rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm3. 安装安装 ntfs-3groottmsserver# yum install fuse-ntfs-3gLoaded plugins: fastestmirror, refresh-packagekitLoading mirror speeds from cached hostfile* base: * extras: ftp.nara.wide.ad.jp* r

12、pmforge: apt.sw.be* updates: rpmforgerpmforge/primary rpmforgeSetting up Install Process| 1.1 kB| 1.3 MB 3921/392100:0001:22Package fuse-2.8.3-1.el6.i686 already installed and latest versionResolving Dependencies Running transaction check Package fuse-ntfs-3g.i686 0:2010.10.2-1.el6.rf set to be upda

13、ted Finished Dependency Resolution Dependencies Resolved=PackageArchVersionRepositorySize=Installing:fuse-ntfs-3gi6862010.10.2-1.el6.rfrpmforge637 kTransaction Summary=InstallUpgrade1 Package(s)0 Package(s)Total download size: 637 kInstalled size: 1.4 M Is this ok y/N: yDownloading Packages:fuse-ntf

14、s-3g-2010.10.2-1.el6.rf.i686.rpm Running rpm_check_debugRunning Transaction Test Transaction Test Succeeded Running TransactionWarning: RPMDB altered outside of yum.| 637 kB00:35InstallingInstalled: fuse-ntfs-3g-2010.10.2-1.el6.rf.i6861/1fuse-ntfs-3g.i686 0:2010.10.2-1.el6.rfComplete!安装,将 NTFS 格式的移动

15、硬盘USB 口,可以自动挂载并识别出来。4.FTP 服务器的安装:这里,我们安装的 FTP 服务器为:ProFTPD 服务器。ProFTPD 是一个 Unix 平台上或是类 Unix 平台上(如 Linux, FreeBSD 等)的 FTP 服务器程序。proftpd:Professional FTP daemon 是Wu-FTP 的弱项而开发的,除了改进的安全性,还具备许多 Wu-FTP 没有的特点,能以 Stand-alone、xinetd 模式运行等。ProFTP 已经成为继Wu-FTP 之后最为流行的 FTP 服务器软件,越来越多的站点选用它构筑安全高效的 FTP 站点,ProFTP

16、配置方便,并有 MySQL 和 Quota 模块可供选择,利用它们的完美结合可以实现非系统账号的管理和用户磁盘的限制。【安装步骤】:软件:从proftpd-1.3.5.tar.gz 并拷贝到要安装的的某个目录下(例4.子中是拷贝到/home 目录下)软件安装:进入 proftpd-1.3.5.tar.gz 所在的目录,解压并安装,如下:roottmsserver# cd /home roottmsserver# tar zxvf proftpd-1.3.5.tar.gz roottmsserver# cd proftpd-1.3.5roottmsserver proftpd-1.3.5# ./

17、configure -prefix=/usr/local/proftpd roottmsserver proftpd-1.3.5# makeroottmsserver proftpd-1.3.5# make install5.修改配置文件#备份原来的配置文件roottmsserver# cd /usr/local/proftpd/etc/ roottmsserveretc# cp proftpd.conf proftpd_conf_bak #修改配置文件:将配置文件内容修改如下roottmsserveretc# vim proftpd.conf#1ServerName TMS FTP Serv

18、er6.ServerType standalone # 以DefaultServer onPort 21 # FTP 端口进程方式运行#2Umask 002 # 权限,建议设置为 002DNS 反查DNS 反查UseReverseDNS off #IdentLookups off #ServerIdent off # 隐藏软件版本信息断点续传AllowRetrieveRestart on #AllowStoreRestart on # 上传断点续传#3# 虚拟用户认证信息AuthOrder mod_auth_file.c # 只虚拟用户登陆AuthUserFile /usr/local/pro

19、ftpd/etc/ftp.usersAuthGroupFile /usr/local/proftpd/etc/ftp.group DefaultRoot # 将用户限定在根目录下#4PassivePorts 20000 30000 #模式端口段SystemLog /var/log/proftpd/proftpd.log # 软件日志TransferLog /var/log/proftpd/proftpd.xfer.logLogFormat default %h %u %t %D %r %s %b # 日志格式ExtendedLog /var/log/proftpd/access.log WRI

20、TE,READ default #日志最大连接MaxInstances 250 #MaxClients 20 # 最大用户数MaxLoginAttempts 3 # 最大尝试连接次数验证超时TimeoutLogin 30 #TimeoutIdle 120 # 发呆超时TimeoutNoTransfer 300 # 无数据传输超时User nobody # 定义ftp 以哪个用户Group nobody # 定义 ftp 以哪个用户组运行运行#5 AllowOverwrite on #写入覆盖 # 设置虚拟用户读权限AllowALL# # 设置 omd 用户所限#Order allow,deny

21、 AllowUser omd DenyALL#7. 生成KDM 目录和日志目录roottmsserveretc# mkdir -p /data/dcps/kdmroottmsserveretc# mkdir -p /var/log/proftpd8. 添加虚拟用户和组#添加虚拟用户dcps 用户,并生成用户文件roottmsserver#-home=/data/dcps/usr/local/proftpd/bin/ftpasswd-passwd-name=dcps-uid=2001-gid=2000-shell=/sbin/nologin-file=/usr/local/proftpd/etc

22、/ftp.users#在弹出的 password 中输入为:dcps#添加虚拟用户组 tmsftp 用户组,并将 dcps 用户添加到组里,并生成用户组文件roottmsserver# /usr/local/proftpd/bin/ftpasswd -group -name=tmsftp -gid=2000-member=bsmp -file=/usr/local/proftpd/etc/ftp.group设置 FTP 目录权限9.roottmsserver# chown -R 2001:2000 /data/dcps/#roottmsserver# chown -R 2001:2000 /d

23、ata/dcps/kdm/ 修改 hosts,设置计算机名 tmsserver 与 ip 的对应关系roottmsserver# vi /etc/hosts#添加一行,内容为: tmsserver将 proftpd 添加到系统服务10.11.roottmsserver#/etc/rc.d/init.d/proftpdcp/home/proftpd-1.3.5/contrib/dist/rpm/proftpd.init.d#修改 proftpd 文件roottmsserver# vim /etc/rc.d/init.d/proftpd#将 proftpd 中的全部内容替换为如

24、下内容:#!/bin/sh# Startup script for ProFTPD # chkconfig: - 85 15# description: ProFTPD is an enhanced FTP server with a focus towards # # # #simplicity, security, and ease of configuration. It features a very Apache-like configuration syntax, and a highly customizable server infrastructure, including

25、support for multiple virtual FTP servers, anonymous FTP, and permission-based directory visibility.# processname: proftpd# config: /etc/proftpd.conf# pidfile: /var/run/proftpd/proftpd.pid# BEGIN INIT INFO# Provides: proftpd ftpserver# Required-Start: $local_fs $network $named $remote_fs # Required-S

26、top: $local_fs $network $named $remote_fs # Default-Stop: 0 1 6# Short-Description: ProFTPd FTP Server# Description: ProFTPd is an enhanced FTP server with a focus towards# #simplicity, security, and ease of configuration.It features a very Apache-like configuration syntax, and a highly customizable

27、 server infrastructure,#including support for multiple virtual FTP servers,anonymous FTP, and permission-based directory visibility.# END INIT INFO#PATH=$PATH:/usr/local/proftpd/sbin # Source function library. /etc/rc.d/init.d/functions# Source networking configuration.#. /etc/sysconfig/network# Sou

28、rce ProFTPD configuration.#PROFTPD_OPTIONS=#if -f /etc/sysconfig/proftpd ; then#fi. /etc/sysconfig/proftpd# Check that networking is enabled.# $NETWORKING = no & exit 1# Make sure the binary is present.# -x /usr/sbin/proftpd | exit 5RETVAL=0prog=proftpdstart() echo -n $Starting $prog: #daemon proftp

29、d $PROFTPD_OPTIONS 2/dev/nulldaemon /usr/local/proftpd/sbin/proftpd -c /usr/local/proftpd/etc/proftpd.conf RETVAL=$?echo $RETVAL -eq 0 & touch /var/lock/subsys/proftpdstop() echo -n $Shutting down $prog: killproc proftpdRETVAL=$?echo $RETVAL -eq 0 & rm -f /var/lock/subsys/proftpd# See how we were ca

30、lled.case $1 instart)start;stop)stop;restart)stop start;*)echo Usage: $prog start|stop|restart exit 2esac#exit $RETVALroottmsserver# chmod 755 /etc/rc.d/init.d/proftpdroottmsserver# chkconfig -add proftpd roottmsserver# chkconfig proftpd on roottmsserver# chkconfig -list proftpdproftpd 0:关闭 1:关闭 2:启

31、用 3:启用 4:启用5:启用 6:关闭设置:只主动模式添加下面的第、条,只模式添加下12.面的、条,两种模式都添加下面、条roottmsserver# /sbin/iptables -I INPUT -p tcp -dport 20 -j ACCEPTroottmsserver# /sbin/iptables -I INPUT -p tcp -dport 21 -j ACCEPT roottmsserver# /sbin/iptables -I INPUT -p tcp -dport 20000:30000 -j ACCEPT roottmsserver# service iptables

32、saveroottmsserver# service iptables restart启动,proftpd 服务roottmsserver# service proftpd start13.正在启动 proftpd: 安装完毕,测试 ftp确定14.通过 ftp 客户端连接此 FTP server 验证可以连接和传送数据,即可。5.MySQL 数据库配置:安装 centos 后,mysql 已经安装完毕,这里我们需要对他进行配置。一数据库配置【配置步骤】:1. 查看 Mysql 是否安装,服务是否已启动roottmsserver# servicemysqld 已停mysqldstatus#若状

33、态为已停,则启动roottmsserver# service正在启动 mysqld:mysqldstart确定2. 设置root:因 mysql 默认root 用户无,因此要为 root 设置,操作如下roottmsserver# mysqladmin -u root password !#123qwe3. 设置 mysql 开机自启动#1. 查看 mysql 是否在自启动列表中,如果在则显示 mysqld 的状态。roottmsserver# chkconfig-list mysqldmysqld0:关闭 1:关闭 2: 关闭 3: 关闭 4: 关闭 5: 关闭 6:关闭#如果没有则不显示,

34、需要执行下列操作将 mysqld 服务添加到自启动列表中roottmsserver #chkconfig-add mysqld#2.设置 mysql 开机自启动roottmsserver #chkconfig mysqld on roottmsserver #chkconfig list mysqldmysqld0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭4. 设置字符集:将 mysql 的字符集设置为 UTF8 roottmsserver # vi /etc/f#1.在mysqld下增加: default-character-set=utf8init_connect=

35、SET NAMES utf8#2.在最后一行增加数据面默认关闭连接的时间,见如下两行: wait_timeout=388000interactive_timeout=388000#3.保存后重新启动 mysql: roottmsserver # service mysqld restart5. 设置,mysql 端口roottmsserver # /sbin/iptables -I INPUT -p tcp -dport 3306 -j ACCEPTroottmsserver # service iptables saveIptables: 将规则保存到 /etc/sysconfig/ipta

36、bles:确定roottmsserver # service iptables restart6. 设置 mysql 可以roottmsserver # mysql -u root -pmysqlgrant all privileges on *.* to root% identified by !#123qwe with grant option; query OK 0 rows affectedmysqlflush privileges;query OK 0 rows affectedmysql exitBye二. 创建数据库及数据表1. 创建数据库#登录到 mysqlroottmsser

37、ver # mysql -u root p#查看要创建的数据库是否存在mysql show databases;+| database+|+| information_schema| mysql| test+#创建数据库mysql create database tms;Query OK, 1 row affected (0.00 sec)2. 创建数据表,导入初始化数据#进入刚创建的数据库mysql use tms;Databasechanged#导入初始化数据mysql exit;roottmsserver #mysql -uroot -p -default-character-set=u

38、tf8 tms use tms;mysql show tables;+| tables_in_tms+| tmsspl| tmsdevice| .|+能够显示表,说明导入三Mysql 断电,自启动不了解决方法roottmsserver # /usr/libexec/mysqld -basedir=/usr -datadir=/var/lib/mysql -user=mysql-log-error=/var/log/mysqld.log-socket=/var/lib/mysql/mysql.sock-pid-file=/var/run/mysqld/mysqld.pidroottmsserve

39、r # service mysqld start6.USBKey 驱动安装与配置:USBKey 驱动的安装与配置步骤如下:将有驱动程序的目录及文件(这里目录是 pcsc_xh_20140721)拷贝到要安装的的某个目录下(例子中是拷贝到/home 目录下)软件安装:进入 pcsc_xh_20140721 所在的目录,解压并安装,如下:#1.安装库roottmsserver# cd /home/pcsc_xh_201407211.2.roottmsserver pcsc_xh_20140721# tar -jxvf libusb-1.0.8.tar.bz2libusb-1.0.8/ libusb

40、-1.0.8/sh.roottmsserver pcsc_xh_20140721# cd libusb-1.0.8roottmsserver libusb-1.0.8# ./configureCheck for a BSD-Compatible install.roottmsserver libusb-1.0.8# make makeall-recursive.make1: Entering directory.roottmsserver libusb-1.0.8# make installMaking install in libusbmake1: Entering directory .#

41、2.安装 pcseroottmsserver libusb-1.0.8# cd /home/pcsc_xh_20140721roottmsserver pcsc_xh_20140721# tar -jxvf pcse-1.7.4.tar.bz2pcspcse-1.7.4/e-1.7.4/shroottmsserver pcsc_xh_20140721# cd pcse-1.7.4roottmsserverpcse-1.7.4#./configure-disable-libudev-enable-libusbLIBUSB_CFLAGS=-I/usr/local/include/libusb-1.

42、0 LIBUSB_LIBS=-lusb-1.0Check for a BSD-Compatible install.roottmsserver pcse-1.7.4#makeroottmsserver pcse-1.7.4#make install#3.安装 ccid roottmsserver pcse-1.7.4# cd /home/pcsc_xh_20140721roottmsserver pcsc_xh_20140721# tar -jxvf ccid-1.4.4.tar.bz2ccid-1.4.4.tar.bz2/ ccid-1.4.4.tar.bz2/sh.roottmsserve

43、r pcsc_xh_20140721# cd ccid-1.4.4roottmsserverccid-1.4.4.#./configurePCSC_CFLAGS=-I/usr/local/include/PCSCPCSC_LIBS=-lpcseLIBUSB_CFLAGS=-I/usr/local/include/libusb-1.0LIBUSB_LIBS=-lusb-1.0-enable-usbdropdir=/usr/local/lib/pcsc/driversCheck for a BSD-Compatible install.roottmsserver ccid-1.4.4#makero

44、ottmsserver ccid-1.4.4#make install#4.拷贝配置文件roottmsserver ccid-1.4.4# cd /home/pcsc_xh_20140721roottmsserver pcsc_xh_20140721# cp pcscd.conf /etc/ld.so.conf.d3.设置roottmsserver #find / -name Info.plist/opt/cisc/ccid-1.4.4/src/Info.plist/usr/local/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist/u

45、sr/lib64/pcsc/drivers/openct-ifd.bundle/Contents/Info.plist/usr/lib64/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plistroottmsserver #cd /usr/local/lib/pcsc/drivers/ifd-ccid.bundle/Contentsroottmsserver Contents#vi Info.plist #找到,如下内容ifdVendorID#加入一行:0xFFFF#找到,如下内容ifdProductID加入一行:0x9004#找到,如下内容ifdFr

46、iendlyName加入一行:BSD USBKEY4. 安装测试工具并测试#4.1 安装测试工具roottmsserver pcsc_xh_20140721# cd /homeroottmsserver home # tar -zxvf opensc-0.12.2.tar.gzroottmsserver home # cd opensc-0.12.2roottmsserver opensc-0.12.2 # cp /usr/local/include/PCSC/* /usr/include/roottmsserver opensc-0.12.2 # ./configureroottmsserv

47、er opensc-0.12.2 #makeroottmsserver opensc-0.12.2 #make installroottmsserveropensc-0.12.2#exportLD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/:/usr/local/lib64/#4.2 测试#USBKey#执行如下命令,如果有结果则表明 USBKey 驱动安装roottmsserver opensc-0.12.2 # opensc-tool roottmsserver opensc-0.12.2 # opensc-tool info roottms

48、server opensc-0.12.2 # opensc-tool serialroottmsserver opensc-0.12.2 # opensc-tool -nameroottmsserver opensc-0.12.2 # opensc-tool -iroottmsserver opensc-0.12.2 # opensc-tool -a7.NTP Server 的配置:CentOS 6.5 系统一般已经自带了 NTPD 服务,一般默认是安装了的,如果没有安装,先检查下,然后用 yum 方式安装下就 OK,具体如下:#1.查看 NTPD 服务是否安装roottmsserver #

49、rpm -q ntp/ 这表示已安装了,如果没有安装,这是空白。ntp-4.2.6p5-1.el6.centos.x86_64#2.若没有安装,则按照如下安装roottmsserver # yum install ntp.#3.安装完成后,将 NTP 服务为配置自启动roottmsserver# chkconfig -lisntpd0:关闭 1:关闭 2: 关闭pd3: 关闭 4: 关闭 5: 关闭 6:关闭roottmsserver# chkconfigntpdonroottmsserver# chkconfig -lispdntpd0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用

50、 6:关闭#4. 在配置前,先使用 ntpdate 手动同步下时间,免得本机与外部时间服务器时间差距太大, 让 ntpd 不能正常同步。roottmsserver# ntpdate -u 622 Dec 16:52:38 ntpdate6400: adjust time server 6 offset 0.012135 sec#5. 配置内网NTP Server#先备份 ntp server 原来的配置文件roottmsserver#vim/etc/ntp.conf /etc/ntp_conf_bak#修改 ntp server 的配置文件,红色

51、加黑部分是修改的内容,其他的是默认roottmsserver#vim/etc/ntp.conf# For more information about this file, see the man pages# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).driftfile /var/lib/ntp/drift# 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 noqueryrestrict -6 default kod nomodify notrap

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论