先自我介绍一下,小编浙江大学毕业,去过华为、字节跳动等大厂,目前阿里P7
深知大多数程序员,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年最新软件测试全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上软件测试知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
如果你需要这些资料,可以添加V获取:vip1024b (备注软件测试)
正文
1、安装ntpddate
如果你的Linux系统中没有安装,你可以通过如下命令进行安装:
#centos,redhat系列
yum install ntpdate
#debian,ubuntu系列
apt install ntpdate
#archlinux系列
pacman -S ntpdate
2、通过ntpdate命令从时钟服务器同步
我们这里选用中国ntp服务器cn.pool.ntp.org来作为时钟同步的来源。为能正常访问到cn.pool.ntp.org,你的Linux系统应该能访问外网才行。
执行命令如下:
ntpdate cn.pool.ntp.org
3、配置crontab自动执行同步
如果每次手动执行,显然是很麻烦的。这里,我们使用crontab定时任务来定期执行ntpdate同步命令,例如我们每10分钟或一小时执行一次,可以通过以下方式实现。
首先在命令终端中输入crontab -e命令,然后输入如下命令保存即可。
crontab -e
开始编辑文件内容,输入定时执行命令:
#每10分钟执行一次
*/10 * * * * /usr/sbin/ntpdate cn.pool.ntp.org
或者
#每一个小时执行一次
0 * * * * /usr/sbin/ntpdate cn.pool.ntp.org
四、如何搭建时钟服务器(NTP Server)
1、安装NTP服务
一条命令即可安装,这里以centos7下安装为例。
yum install -y ntp ntpdate
2、配置NTP服务
ntp配置文件的路径是/etc/ntp.conf,修改改配置文件时先进行备份。
cp /etc/ntp.conf /etc/ntp.conf.bak #备份
vim /etc/ntp.conf #vim编辑文件
配置文件中,增加如下内容:
Hosts on local network are less restricted.
restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
这个是用来允许192.168.1.*这个网段的服务器都可以使用该ntp服务器同步时间。这里可以根据你实际情况来设定网段。
同时添加指定一台内网服务器作为本地时钟服务器用于无法链接外网时,其它服务器同步时间是以该服务器为准。
server 192.168.1.2
整体配置后的文件,主要内容如下:
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
Use public servers from the pool.ntp.org project.
Please consider joining the pool (http://www.pool.ntp.org/join.html).
#定义上游使用的ntp服务器
server cn.pool.ntp.org prefer
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
#外部时间服务不可用时,以本地时间作为服务
server 192.168.1.2
fudge 192.168.1.2 stratum 10
#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
Enable public key cryptography.
#crypto
includefile /etc/ntp/crypto/pw
…
3、启动NTP服务
配置文件配置好保存后,我们可以通过以下命令来启动ntp服务。
systemctl start ntpd
服务启动后可以通过ntpstat命令来验证服务是否正常。
[root@localhost ~]# ntpstat
synchronised to NTP server (162.159.200.123) at stratum 4
time correct to within 227 ms
polling server every 1024 s
4、客户端同步时间
客户端同步时间的方式可以以第三部分中讲到的方式进行同步,即通过ntpdate命令同步。
ntpdate 192.168.1.2
可以将该命令作为crontab任务进行定时运行即可完成客户端机器的时间同步。
Ubuntu时间同步
dpkg-reconfigure tzdata
选择 Asia
选择 Shanghai或Chongqing
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
需要这份系统化的资料的朋友,可以添加V获取:vip1024b (备注软件测试)
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。**
需要这份系统化的资料的朋友,可以添加V获取:vip1024b (备注软件测试)
[外链图片转存中…(img-BQsGmc48-1713332907280)]
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!