diff --git a/Auto-Builder-Server.md b/Auto-Builder-Server.md index 6de51e2..7561ac2 100644 --- a/Auto-Builder-Server.md +++ b/Auto-Builder-Server.md @@ -502,3 +502,90 @@ Auto-builder@Auto-builder:/$ sudo -u Auto-builder mail -s "test1" sxxu@linx-i ## 5 测试调试 基本配置如上所述。之后可进行git库更新测试调试。 + +## 6 后期使用添加补充 + +### 6.1 添加nbd模块加载 + +经测试调试,发现安装虚拟机会出错。原因是未加载nbd设备。导致配置已经初始化的kvm_install.img失败。 + +修改250服务器的rc.local,添加开机启动加载nbd设备,如下: + +``` +root@Auto-builder:~# cat /etc/modules +# /etc/modules: kernel modules to load at boot time. +# +# This file contains the names of kernel modules that should be loaded +# at boot time, one per line. Lines beginning with "#" are ignored. +# Parameters can be specified after the module name. + +loop +linx_sec +linx_sysinfo + +nbd max_part=8 + +``` + +### 6.2 出盘发布时间变化 + +多次出盘时间定在09:00左右。查看发现,编译虚拟机的时间不对。配置编译虚拟机的对时任务,配置250服务器的ntp对时服务。 + +虚拟机对时任务配置:(添加对时脚本,配置定时任务) + +``` +localhost:/var/log # ls /usr/sbin/update_time.sh -l +-rwxr-xr-x 1 sysadmin sysadmin 181 1月 29 11:53 /usr/sbin/update_time.sh +localhost:/var/log # cat /usr/sbin/update_time.sh +#!/bin/bash +NTPSERVER_A='172.16.0.250' +NTPSERVER_B='' +NTPDATE='/usr/sbin/ntpdate' +${NTPDATE} ${NTPSERVER_A} +#${NTPDATE} ${NTPSERVER_A} || ${NTPDATE} ${NTPSERVER_B} +/sbin/hwclock -w +localhost:/var/log # cat /etc/crontab +# +# Vixie cron /etc/crontab +# + +# globals +SHELL=/bin/bash +PATH=/bin:/sbin:/usr/bin:/usr/sbin +MAILTO="" + +0 20 * * * sysadmin /usr/sbin/runjobs /etc/cron/daily +5 20 * * mon sysadmin /usr/sbin/runjobs /etc/cron/weekly +10 20 1 * * sysadmin /usr/sbin/runjobs /etc/cron/monthly + +*/1 * * * * sysadmin /usr/sbin/update_time.sh + +``` + +服务器ntp对时服务配置:(ntp服务默认是开机启动) + +``` +root@Auto-builder:~# cat /etc/ntp.conf +# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help + +driftfile /var/lib/ntp/ntp.drift + + +# Enable this if you want statistics to be logged. +#statsdir /var/log/ntpstats/ + +statistics loopstats peerstats clockstats +filegen loopstats file loopstats type day enable +filegen peerstats file peerstats type day enable +filegen clockstats file clockstats type day enable + +server 172.31.255.8 iburst +server 172.31.255.9 iburst +server 172.17.0.240 iburst noselect +server 172.17.0.239 iburst noselect +server 172.17.0.235 iburst noselect + +``` + + +