Just Another Blog

👋 欢迎来到我的博客

未标题的文章

正文 MSR-1 首先进入系统视图: <H3C>SYS System View: return to User View with Ctrl+Z. [H3C]sysname MSR-1 为路由器配置IP: [MSR-1]int 0/0 [MSR-1]ip add 192.168.1.1 24 [MSR-1]qu 然后启用ssh: [MSR-1]ssh server enable [MSR-1] 设置用于SSH的用户: [MSR-1]local-user WLJDKS123 class manage [MSR-1-luser-manage-WLJDKS123]password-control length 9 [MSR-1-luser-manage-WLJDKS123]undo password-control complexity user-name check [MSR-1-luser-manage-WLJDKS123]password simple WLJDKS123 [MSR-1-luser-manage-WLJDKS123]service-type ssh [MSR-1-luser-manage-WLJDKS123]authorization-attribute user-role network-admin [MSR-1-luser-manage-WLJDKS123]quit [MSR-1] 配置同时可登录的最大数量: [MSR-1]user-int vty 0 4 [MSR-1-line-vty0-4]authentication-mode scheme [MSR-1-line-vty0-4]qu [MSR-1] SW-1 首先进入系统视图: <H3C>sys System View: return to User View with Ctrl+Z. [H3C]sysname SW-1 [SW-1] 为交换机配置IP: [SW-1]int g 1/0/1 [SW-1-GigabitEthernet1/0/1]port link-mode route The configuration of the interface will be restored to the default. Continue? [Y/N]:y [SW-1-GigabitEthernet1/0/1]%May 16 11:04:37:748 2025 H3C IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/1 changed to down. %May 16 11:04:37:748 2025 H3C IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/1 changed to down. %May 16 11:04:39:784 2025 H3C IFNET/3/PHY_UPDOWN: Physical state on the interface GigabitEthernet1/0/1 changed to up. %May 16 11:04:39:785 2025 H3C IFNET/5/LINK_UPDOWN: Line protocol state on the interface GigabitEthernet1/0/1 changed to up. [SW-1-GigabitEthernet1/0/1] ip add 192.168.1.2 24 [HSW-13C-GigabitEthernet1/0/1] undo shutdown [SW-1-GigabitEthernet1/0/1] quit [SW-1] SW-1 (user) 在SW-1切换到用户视图,然后尝试连接到MSR-1: ...

五月 16, 2025 · 2 分钟 · 237 字 · Me

About

十一月 17, 2024 · 2 字 · Me

关于 Proxmox 自身研究

前言 本处用于记载本人对 ProxmoxVE 虚拟化系统 的一些研究 部分内容可能来自互联网、群友、朋友 ProxmoxVE 更换主机名 在本例中主机名从 s3 迁移到 tc-s3-pve 首先修改主机名 只有主机名有关,域名后面的部分都无所谓 hostnamectl set-hostname xxx-pve.mihari.top # 一样可以 hostnamectl set-hostname xxx-pve 还需要编辑 hosts 保证解析 !!!! 注意拼写 不要打错 !!!! 123.123.123.123 xxx-pve.mihari.top xxx-pve 先备份整个 pmxcfs cp -R /etc/pve ./pve 或者你更愿意打包备份 # 打包为当前 年-月-日-时-分-秒 的压缩包 tar -zcvf pve-config-backup-$(date +%Y-%m-%d-%H-%M-%S).tar.gz /etc/pve 然后在 pmxcfs 里面搬配置文件 这里只迁移了 qemu-server cd /etc/pve mv nodes/s3/qemu-server/* nodes/tc-s3-pve/qemu-server 接下来重启 pve-cluster 服务保证所有文件正确链接 还需要重新 pveproxy 保证访问正常 最后重启 pvestatd 来保证状态收集正常 ...

十一月 17, 2024 · 1 分钟 · 109 字 · Me

关于 Docker 自身研究

前言 本处用于记载本人对docker的一些研究 部分内容可能来自互联网、群友、朋友 docker-args | Docker 启动参数 为了避免/etc/docker/daemon.json中的设置与/usr/lib/systemd/system/docker.service中的启动参数冲突,安插一个服务覆盖将其清理,所有配置来自于JSON,即单一事实来源理论 cat /etc/systemd/system/docker.service.d/90-no-args.conf [Service] # 此处需要先清理一下,才能做到覆盖 ExecStart= ExecStart=/usr/bin/dockerd% docker-logrotate | Docker 日志滚动 默认情况下, 容器的 stdout 和 sdterr 写在 /var/lib/docker/containers/[container-id]/[container-id]-json.log 中的 json 中, 没有维护的情况下将会占用大量的磁盘空间 所以需要做日志 rotation , 修改配置文件 /etc/docker/daemon.json { "log-driver": "json-file", "log-opts": { "max-size": "50m", "max-file": "5" } } 然后重启应用 $ systemctl daemon-reload $ systemctl restart docker

十一月 17, 2024 · 1 分钟 · 54 字 · Me