Margrop
Articles158
Tags353
Categories21
1password AC AP API AppDaemon Aqara Cron Date Diagrams.net HA HADashboard HomeAssistant IP IPv4 Java LVM‑Thin Linux MacOS MySQL NAS PPPoE PostgreSQL ProcessOn Proxmox VE SSL Shell TTS TimeMachine UML Uptime Kuma Web Windows activate ad adb adblock agent aligenie aliyun alpine annotation aop authy autofs backup baidupan bash bitwarden boot brew browser caddy2 cdn centos cert certbot charles chat chrome classloader client clone closures cloudflare cmd command commit container crontab ctyun ddsm demo dependency deploy developer devtools dll dns docker domain download draw drawio dsm dump dylib edge exception export fail2ban feign firewall-cmd flow frp frpc frps fuckgfw function gcc gfw git github golang gperftools gridea grub gvt-g hacs havcs heap hello hexo hibernate hidpi hoisting homeassistant hosts html htmlparser https idea image img img2kvm import index install intel io ios ip iptables iptv ipv6 iso java javascript jetbrains jni jnilib jpa js json jsonb jupter jupyterlab jvm k8s kernel key kid kms kodi koolproxy koolproxyr kvm lan lastpass launchctl learning lede letsencrypt linux live low-code lvm lxc m3u8 mac macos mariadb markdown maven md5 microcode mirror modem modules monitor mount mstsc mysql n2n n5105 nas network nfs node node-red nodejs nohup notepad++ npm nssm ntp oop openfeign openssl os otp ovz packet capture pat pdf pem perf ping pip plugin png powerbutton print pro proxy pve pvekclean python qcow2 qemu qemu-guest-agent rar reboot reflog remote remote desktop renew repo resize retina root route router rule rules runtime safari sata scipy-notebook scoping scp server slmgr so socks source spk spring springboot springfox ssh ssl stash string supernode svg svn swagger sync synology systemctl tap tap-windows tapwindows telecom template terminal tls token totp tvbox txt ubuntu udisk ui undertow uninstall unlocker upgrade url v2ray vhd vim vlmcsd vm vmdk web websocket wechat windows with worker wow xiaoya xml yum zip 中国电信 云电脑 交换机 光猫 公网IP 内存 内网IP 升级 启动 夏令时 天猫精灵 天翼云 安装 容器 导入 小米 常用软件 广告屏蔽 序列号 应用市场 异常 抓包 描述文件 时区 显卡虚拟化 智能家居 智能音箱 梯子 模块 流程 流程图 浏览器 漫游 激活 火绒 电信 画图 直播源 续期 网关 网络风暴 群晖 腾讯 虚拟机 证书 路由 路由器 软件管家 软路由 运维监控 镜像 镜像源 门窗传感器 防火墙 阿里云 阿里源 集客

Hitokoto

Archive

gitlab-ci-yml配置说明(官方文档翻译)

gitlab-ci-yml配置说明(官方文档翻译)

重要的内置变量

CI_COMMIT_REF_NAME: The branch or tag name for which project is built.
CI_CONFIG_PATH: The path to the CI/CD configuration file. Defaults to .gitlab-ci.yml. Read-only inside a running pipeline.
CI_PROJECT_PATH: The project namespace with the project name included.
CI_BUILDS_DIR: The top-level directory where builds are executed.
CI_PROJECT_DIR: The full path the repository is cloned to, and where the job runs from. If the GitLab Runner builds_dir parameter is set, this variable is set relative to the value of builds_dir. For more information, see the Advanced GitLab Runner configuration.

常用Github开源项目推荐

常用Github开源项目推荐

BBDown

一款命令行式哔哩哔哩下载器. Bilibili Downloader.
https://github.com/nilaoda/BBDown

iOS日历增强——中国节假日补班日历

中国节假日补班日历
https://github.com/lanceliao/china-holiday-calender

CPU单核跑分天梯图

本图收集了常见CPU型号单核跑分图,包括英特尔 酷睿(Intel Core)桌面处理器系列, 英特尔 酷睿(Intel Core)移动处理器系列和AMD 锐龙(Ryzen)处理器系列。
https://github.com/mediv01/CPU-Single-Core-Benchmark

Homebrew国内快速安装

https://github.com/ineo6/homebrew-install

使用 v2ray 配置内网访问——基于公网IP

使用 v2ray 配置内网访问——基于公网IP

前提条件:

  • 有公网IP

需求

  • 需要进行安全的内网访问
  • 需要加密流量
  • 支持 TCP / UDP
Ubuntu / CentOS 磁盘根目录在线扩容 & 修改分区 inode 数量

Ubuntu / CentOS 磁盘根目录在线扩容 & 修改分区 inode 数量

Ubuntu 作为服务器系统使用的时候,系统盘的空间可能并不是很充裕,apt apt 着,根目录就满了。诚然,增加磁盘 / 分区并挂载是一个方案,但并不能解决所有问题(例如 apt)。同时,一些跑在云平台上的服务器并没有很好的离线操作磁盘的手段,这时候在线扩容就显得极为必要了。

数据无价!对磁盘进行任何操作前,请务必做好备份!

0. 简要操作步骤

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#系统分区扩容
parted -l
fdisk -l
cfdisk

#扩容块(sda3)
lsblk
pvresize /dev/sda3
lsblk

#扩容lv和vg(Ubuntu)
lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv
resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
df -h

#扩容lv和vg(CentOS)
lvextend -l +100%FREE /dev/mapper/centos-root
resize2fs /dev/mapper/centos-root
df -h

1. 磁盘根目录在线扩容

操作环境:Proxmox VE 虚拟化 / Ubuntu 22.04.5 LTS / GPT 分区表 / ext4 分区

PVE对特定容器定时重启

PVE对特定容器定时重启

背景

  • 由于观测到HomeAssistant这台VM的内存占用总是随着时间的推移而增加,然后最终会OOM,且无论升级了多少个版本也是如此,推测HomeAssistant有内存泄漏问题

解决方案

  • 在虚拟机层面,对该VM进行定期重启(每天一次)
  • 登录到PVE所在的服务器
  • 执行crontab -e,并输入下面命令
    1
    2
    3
    PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin

    0 12 * * * qm stop 2007 ; sleep 10 ; qm start 2007
  • 注:命令中的2007是vmid,即VM的全局唯一ID
【转】iptables持久化方案

【转】iptables持久化方案

debian若没有安装iptables,使用以下命令安装

1
apt-get install iptables

清除已有规则

1
iptables -F;iptables -X;iptables -Z

开放端口

允许本地回环接口(即运行本机访问本机) && 允许已建立的或相关连的通行

1
iptables -A INPUT -i lo -j ACCEPT;iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
点读笔资源大全——百度云

点读笔资源大全——百度云

Ubuntu 22.04 通过ufw / iptables 开放指定端口——20230715更新

Ubuntu 22.04 通过ufw / iptables 开放指定端口——20230715更新

Ubuntu22.04 新增防火墙端口

查看防火墙状态

1
ufw status

开放22端口

1
ufw allow 22

添加完成,查看防火墙状态

1
ufw status
Proxmox VE 8.2 日常维护,去掉未订阅的提示,和设置国内源——2024年6月4日更新

Proxmox VE 8.2 日常维护,去掉未订阅的提示,和设置国内源——2024年6月4日更新

移除未使用的Linux内核

  • 若不存在pvekclean,请先安装
    1
    2
    3
    git clone https://github.com/jordanhillis/pvekclean.git
    cd pvekclean
    chmod +x pvekclean.sh
    安装完成后执行pvekclean即可
    1
    ./pvekclean.sh

日常软件更新命令:

1
apt update -y && apt dist-upgrade -y

更新PVE,并安装常用软件

1
apt-get update && apt-get install vim lrzsz unzip net-tools curl screen uuid-runtime git -y && apt dist-upgrade -y
CentOS7 开机自动添加N2N的路由表

CentOS7 开机自动添加N2N的路由表

1. 编辑 systemctl 自启动文件

1
vim /etc/systemd/system/n2route.service