分类 系统相关 下的文章 - 第 2 页 - This-PC
首页
文章归档
Search
1
在VPS上安装飞牛OS
59 阅读
2
Linux使用群晖的ABB套件进行整机备份
23 阅读
3
VPS初始设置
21 阅读
4
Windows10没有休眠选项解决办法
18 阅读
5
Python利用OpenHardwareMonitorLib获取硬件信息
17 阅读
系统相关
Windows
Linux
虚拟化NAS
群晖
PVE
VMware
飞牛
编程相关
Python
Docker
登录
找到
10
篇与
系统相关
相关的结果
- 第 2 页
2025-01-26
Windows10没有休眠选项解决办法
解决办法:以管理员身份运行命令提示符,运行命令:powercfg -h on。启用休眠以后,你再重新进入更改当前不可用的设置,就可以看到“启用快速启动”和“休眠”选项 .
系统相关
Windows
# Windows
904666888
1月26日
0
18
0
2025-01-25
Docker进入容器
进入容器 在使用 -d 参数时,容器启动后会进入后台。 某些时候需要进入容器进行操作,包括使用 docker attach 命令或 docker exec 命令,推荐大家使用 docker exec 命令,原因会在下面说明。 attach 命令 下面示例如何使用 docker attach 命令。 $ docker run -dit ubuntu 243c32535da7d142fb0e6df616a3c3ada0b8ab417937c853a9e1c251f499f550 $ docker container ls CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 243c32535da7 ubuntu:latest "/bin/bash" 18 seconds ago Up 17 seconds nostalgic_hypatia $ docker attach 243c root@243c32535da7:/#注意: 如果从这个 stdin 中 exit,会导致容器的停止。 exec 命令 -i -t 参数 docker exec 后边可以跟多个参数,这里主要说明 -i -t 参数。 只用 -i 参数时,由于没有分配伪终端,界面没有我们熟悉的 Linux 命令提示符,但命令执行结果仍然可以返回。 当 -i -t 参数一起使用时,则可以看到我们熟悉的 Linux 命令提示符。 $ docker run -dit ubuntu 69d137adef7a8a689cbcb059e94da5489d3cddd240ff675c640c8d96e84fe1f6 $ docker container ls CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 69d137adef7a ubuntu:latest "/bin/bash" 18 seconds ago Up 17 seconds zealous_swirles $ docker exec -i 69d1 bash ls bin boot dev ... $ docker exec -it 69d1 bash root@69d137adef7a:/#如果从这个 stdin 中 exit,不会导致容器的停止。这就是为什么推荐大家使用 docker exec 的原因
系统相关
904666888
1月25日
0
9
0
2025-01-24
Python-IP归属地查询
百度API API:https://opendata.baidu.com/api.php?query=113.89.235.182&co=&resource_id=6006&oe=utf8 API1:https://opendata.baidu.com/api.php?co=&resource_id=6006&oe=utf8&query=113.89.235.182 响应json: { "status": "0", "t": "", "set_cache_time": "", "data": [ { "ExtendedLocation": "", "OriginQuery": "113.89.235.182", "appinfo": "", "disp_type": 0, "fetchkey": "113.89.235.182", "location": "广东省深圳市 电信", "origip": "113.89.235.182", "origipquery": "113.89.235.182", "resourceid": "6006", "role_id": 0, "shareImage": 1, "showLikeShare": 1, "showlamp": "1", "titlecont": "IP地址查询", "tplt": "ip" } ] }本地数据库 Ip2region GitHub地址 官方示例 # Copyright 2022 The Ip2Region Authors. All rights reserved. # Use of this source code is governed by a Apache2.0-style # license that can be found in the LICENSE file. # from xdbSearcher import XdbSearcher def searchWithFile(): # 1. 创建查询对象 dbPath = "../../data/ip2region.xdb" searcher = XdbSearcher(dbfile=dbPath) # 2. 执行查询 ip = "1.2.3.4" region_str = searcher.searchByIPStr(ip) print(region_str) # 3. 关闭searcher searcher.close() def searchWithVectorIndex(): # 1. 预先加载整个 xdb dbPath = "../../data/ip2region.xdb" vi = XdbSearcher.loadVectorIndexFromFile(dbfile=dbPath) # 2. 使用上面的缓存创建查询对象, 同时也要加载 xdb 文件 searcher = XdbSearcher(dbfile=dbPath, vectorIndex=vi) # 3. 执行查询 ip = "1.2.3.4" region_str = searcher.search(ip) print(region_str) # 4. 关闭searcher searcher.close() def searchWithContent(): # 1. 预先加载整个 xdb dbPath = "../../data/ip2region.xdb"; cb = XdbSearcher.loadContentFromFile(dbfile=dbPath) # 2. 仅需要使用上面的全文件缓存创建查询对象, 不需要传源 xdb 文件 searcher = XdbSearcher(contentBuff=cb) # 3. 执行查询 ip = "1.2.3.4" region_str = searcher.search(ip) print(region_str) # 4. 关闭searcher searcher.close() if __name__ == '__main__': searchWithContent()
系统相关
Python
编程相关
# Python
# API
904666888
1月24日
0
10
0
2025-01-21
Linux使用zip
安装ZIP apt install zip -y压缩 zip -r filename.zip ./*-r 选项是指递归地 (recursively) 压缩指定目录 (./ 当前目录) 中的所有文件和文件夹 zip -r filename.zip file1 file2 file3 /path 把 file1、file2、 file3、以及 /path 目录的内容 (假设这个目录存在) 压缩起来,然后放入 filename.zip 文件中 options 参数选项: -r:递归压缩目录及其子目录中的所有文件。 -e:为压缩文件设置密码保护。 -q:静默模式,不显示压缩过程。 -v:显示详细的压缩过程。 -x:排除某些文件或目录,不进行压缩。 -m:压缩后删除原始文件。 -0 到 -9:指定压缩级别,-0 表示存储不压缩,-9 表示最高压缩率,默认是 -6。 -d: 删除zip压缩包里的文件 zip -d filename.zip file.txt-m: 向zip压缩包里添加文件 zip -m filename.zip ./file.txt解压缩 unzip命令 unzip -o -d /path filename.zip-o: 不提示的情况下覆盖文件; -d: -d /path 指明将文件解压缩到/path目录下; 如果不指定则解压缩到当前目录下
系统相关
# Linux
904666888
1月21日
0
15
0
2025-01-21
VPS初始设置
SSH软件推荐Finalshell和WindTerm 新手最好用FinalShell ,熟悉了再用 WindTerm 1:DD一个原版系统 DD系统有可能造成VPS以后升级硬盘容量不显示 DD脚本 GitHub wget --no-check-certificate -qO InstallNET.sh 'https://raw.githubusercontent.com/leitbogioro/Tools/master/Linux_reinstall/InstallNET.sh' && chmod a+x InstallNET.sh使用方法 bash InstallNET.sh -debian 12 --nomemcheck -mirror "http://mirrors.ustc.edu.cn/debian/" -pwd 'password'默认密码 LeitboGi0ro 旧的DD脚本 #更新系统 #Debian/Ubuntu: apt-get update #RedHat/CentOS: yum update #安装依赖 #Debian/Ubuntu: apt-get install -y xz-utils openssl gawk file #RedHat/CentOS: yum install -y xz openssl gawk file ##DD Linux脚本 wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/installNET/master/Install.sh" && chmod +x Install.sh && ./Install.sh ls #DD Windows+Linux脚本 wget --no-check-certificate -qO InstallNET.sh 'https://sunpma.com/other/oss/InstallNET.sh' && bash InstallNET.sh -dd '[Windows DD包直链地址]'如果出现grub错误,可以尝试下面代码 mkdir /boot/grub2 && grub-mkconfig -o /boot/grub2/grub.cfg2:系统设置 安装常用软件 apt update -y && apt upgrade -y && apt dist-upgrade -y apt install wget curl sudo vim git -y修改VPS时区 timedatectl set-timezone Asia/Shanghai开启Debian11自带bbr echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf sysctl -p sysctl net.ipv4.tcp_available_congestion_control3: docker 安装docker wget -qO- get.docker.com | bash systemctl enable docker修改docker日志占用空间并开启ipv6 先获取本机IP6地址 ip -f inet6 addr show eth0 #eth0换成本机网卡进行修改,替换成上面获取的ipv6地址 cat > /etc/docker/daemon.json <<EOF { "log-driver": "json-file", "log-opts": { "max-size": "20m", "max-file": "3" }, "ipv6": true, "fixed-cidr-v6": "fd00:dead:beef:c0::/80", "experimental":true, "ip6tables":true } EOF或没有IPv6 cat > /etc/docker/daemon.json <<EOF { "log-driver":"json-file", "log-opts": {"max-size":"20m", "max-file":"3"} } EOF重启一下docker systemctl restart docker安装docker-compose curl -L https://github.com/docker/compose/releases/latest/download/docker-compose-Linux-x86_64 > /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose安装docker管理平台 portainer-ce汉化版 docker run -d --restart=always --name="portainer" -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock 6053537/portainer-ceportaier默认地址是VPS的IP:9000 3:一些常用脚本 如果想测试VPS性能,可以使用性能测试脚本 curl -L https://github.com/spiritLHLS/ecs/raw/main/ecs.sh -o ecs.sh && chmod +x ecs.sh && bash ecs.sh或 wget git.io/vpstest && bash vpstest常用的工具箱脚本 搭建测速平台 docker run -d -p 9898:80 -it badapple9/speedtest-x搭建完成后输入VPS的IP:9898就可以测速了 综合工具箱 wget -O box.sh https://raw.githubusercontent.com/BlueSkyXN/SKY-BOX/main/box.sh && chmod +x box.sh && clear && ./box.sh #综合工具箱带宝塔欢乐版 wget -N --no-check-certificate https://raw.githubusercontent.com/wxfyes/bt/master/kuaijie.sh && bash kuaijie.sh #bench wget -qO- bench.sh | bash魔改XUI bash <(curl -Ls https://raw.githubusercontent.com/FranzKafkaYu/x-ui/master/install.sh)
系统相关
Linux
# VPS
# Linux
904666888
1月21日
0
21
0
上一页
1
2
易航博客