Wednesday, October 30, 2024

配置域控制器与外部NTP服务器时间同步

net stop w32time
w32tm /unregister
w32tm /register
net start w32time
w32tm.exe /config /manualpeerlist:ntp.aliyun.com,ntp.tencent.com /syncfromflags:manual /reliable:YES /update
net stop w32time
net start w32time

 

注意:

1. 以上命令必须以管理员权限执行

2. 此域控制器必须作为fsmo的PDC角色


参考:

https://serverfault.com/questions/1054012/best-practice-for-external-ntp-server-on-windows-ad-network

Wednesday, October 16, 2024

华为S5720交换机把syslog输出到日志主机

# 启用信息管理功能
info-center enable

# 指定模块、通道名称、日志级别 (default指所有模块)
info-center source default channel 2 log level warning

# 指定日志输出源接口
info-center loghost source Vlanif1

# 指定要接收的日志主机,时间戳使用本地时间(默认为UTC)
info-center loghost 10.77.11.38 local-time

# 连续重复日志的统计抑制(可选)
info-center statistic-suppress enable 


# 过滤LLDP模块的RATEEXCESSIVE日志(举例)
info-center filter-id bymodule-alias LLDP RATEEXCESSIVE


参考:

https://support.huawei.com/enterprise/zh/doc/EDOC1100333362/336bd2ec
https://support.huawei.com/enterprise/zh/doc/EDOC1100407649/88520120
https://zhuanlan.zhihu.com/p/282797056


Friday, October 11, 2024

CentOS7 snmp 配置

1. 安装 snmp

yum install net-snmp

如果系统版本较老,可修改yum源为阿里云的镜像源(参考下面链接)


2. 备份 snmpd 配置文件

cp /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak

 

3. 修改 snmpd 配置文件

vi  /etc/snmp/snmpd.conf

以下为参考截图


 

4. 启动 snmpd 服务,并设置为开机启动

systemctl start snmpd

systemctl enable snmpd



firewalld 开放端口 161-162/udp

firewall-cmd --zone=public --add-port=161-162/udp --permanent

firewall-cmd --reload

firewall-cmd --list-all


snmpwalk 命令参考

snmpwalk -v 2c -c community字符串  ip地址   .1.3.6.1.4



参考:

https://www.alibabacloud.com/help/en/ecs/support/the-yum-command-fails-with-the-http-error-404-not-found-trying-other-mirror-prompt

https://blog.csdn.net/weixin_44112083/article/details/141128069 

https://www.cnblogs.com/lewisat/p/17939890

 


 

一些有用的网站

Windows系统安装界面认不到硬盘,加载RST驱动: https://iknow.lenovo.com.cn/detail/419926.html 纯净版Flash: https://gitlab.com/cleanflash/installer/-/releases    ...