随笔分类 -  Linux 服务器那些事

Ubuntu 和 Centos下常用命令。
Linux 版本百度网盘 BaiduPCS-Go
摘要:链接地址: https://github.com/qjfoidnh/BaiduPCS-Go 使用百度 BDUSS 来登录百度帐号: BaiduPCS-Go login -bduss=1234567 上传文件/目录 BaiduPCS-Go upload <本地文件/目录的路径1> <文件/目录2> < 阅读全文

posted @ 2025-02-12 14:23 星河赵 阅读(12) 评论(0) 推荐(0) 编辑

linux 卸载硬盘
摘要:Linux 通过umount 卸载硬盘 sudo umount /dev/vdb 报错:umount: /data2: target is busy. 1. 查找占用的进程 使用 lsof 或 fuser 来查找哪些进程正在占用挂载点: 方法 1:使用 lsof lsof +D /挂载点路径 这会列 阅读全文

posted @ 2025-01-20 18:13 星河赵 阅读(37) 评论(0) 推荐(0) 编辑

两台linux 服务器如何共享一个磁盘
摘要:两台linux服务器如何共享一个磁盘可以借用NFS工具 例如:服务端的系统是centos ip为101.0.3.3 客户端的系统是ubuntu ip为:101.0.3.13 如何通过nfs来共享服务端的/data目录? 要通过NFS在CentOS和Ubuntu之间共享 /data 目录,您需要在服务 阅读全文

posted @ 2024-12-04 18:12 星河赵 阅读(228) 评论(0) 推荐(0) 编辑

ubuntu 安装supervisor
摘要:在 Ubuntu 上安装 Supervisor 作为进程管理工具,可以通过以下步骤完成: 1. 更新系统包 首先更新系统的软件包列表: sudo apt update && sudo apt upgrade -y 2. 安装 Supervisor 通过 apt 安装 Supervisor: sudo 阅读全文

posted @ 2024-12-03 10:32 星河赵 阅读(324) 评论(0) 推荐(0) 编辑

ubuntu 安装redis
摘要:在 Ubuntu 上安装 Redis 可以通过以下步骤实现: 1. 更新系统包 在安装 Redis 之前,先更新系统的包列表: sudo apt update && sudo apt upgrade -y 2. 安装 Redis 使用 apt 安装 Redis: sudo apt install - 阅读全文

posted @ 2024-12-03 10:08 星河赵 阅读(539) 评论(0) 推荐(0) 编辑

Linux 系统修改主机名
摘要:更改主机名方法: 1.sudo vim /etc/hostname 更改此配置永久生效 2.sudo hostname ecsc2 使当前窗口生效 重新登录服务器即可。 阅读全文

posted @ 2024-11-07 09:55 星河赵 阅读(3) 评论(0) 推荐(0) 编辑

如何下载youtube 视频
摘要:推荐工具:yt-dlp youtube-dl 已经不更新,推荐使用yt-dlp 安装方法: pip install yt-dlp 下载方法 -o 指定下载目录 以及对文件进行重命名 yt-dlp -o dst/123.mp4 https://www.youtube.com/watch?v=DwLXV 阅读全文

posted @ 2024-10-22 10:16 星河赵 阅读(367) 评论(0) 推荐(0) 编辑

如何使用postman 请求websocket
摘要:要使用 Postman 调试和调用 Socket.IO 服务器,可以按照以下步骤进行。这里我们假设你的 Socket.IO 服务器在 ws://localhost:3000/socket.io/ 上运行。 步骤一:安装或打开 Postman 确保你已经安装了最新版本的 Postman。如果还没有安装 阅读全文

posted @ 2024-06-26 15:20 星河赵 阅读(4343) 评论(0) 推荐(0) 编辑

Ubuntu 修改静态ip地址
摘要:打开文件地址:sudo vim /etc/netplan/01-network-manager-all.yaml # Let NetworkManager manage all devices on this system network: version: 2 renderer: NetworkM 阅读全文

posted @ 2024-03-14 11:57 星河赵 阅读(51) 评论(0) 推荐(0) 编辑

Linux 开机自动挂载硬盘
摘要:1. 查看磁盘分区 sudo fdisk -l 2. 创建挂载目录 sudo mkdir /data 3. 挂载磁盘sda1 sudo mount /dev/sda /data 4. 查询挂载磁盘的UUID sudo blkid /dev/sda 参考如何对硬盘格式化分区 https://www.c 阅读全文

posted @ 2024-03-14 11:01 星河赵 阅读(734) 评论(0) 推荐(0) 编辑

Nginx location 匹配规则
摘要:匹配模式及顺序 = 用于标准uri前,需要请求字串与uri完全匹配,如果匹配成功就停止向下匹配并立即处理请求。~ 区分大小写~* 不区分大写 ^~ 开头对URL路径进行前缀匹配,并且在正则之前 !~ 区分大小写不匹配!~* 不区分大小写不匹配^ 匹配正则开头$ 匹配正则结尾\ 转义字符。可以转. * 阅读全文

posted @ 2024-03-07 09:47 星河赵 阅读(139) 评论(0) 推荐(0) 编辑

nginx 配置下载apk 页面
摘要:nginx 代理apk文件下载 server { listen 80; server_name app.com.cn; location /app { alias /var/www/app; autoindex on; default_type application/octet-stream; } 阅读全文

posted @ 2024-02-29 17:54 星河赵 阅读(849) 评论(0) 推荐(0) 编辑

使用openssl将RSA的X.509公钥转成PKCS#1标准
摘要:1.确定RSA公钥标准 假如公钥是以X.509标准导出,以PEM格式存储,那么形式如下: BEGIN PUBLIC KEY ... END PUBLIC KEY 假如公钥是以PKCS#1标准导出,以PEM格式存储,那么形式如下: BEGIN RSA PRIVATE KEY ... END RSA P 阅读全文

posted @ 2023-12-29 18:31 星河赵 阅读(179) 评论(0) 推荐(0) 编辑

nginx部署vue编译项目刷新页面404
摘要:原因:nginx配置错误。 因为vue打包输出的是单页网页应用,只有一个index.html入口,其他路径是由前端路由去跳转的,服务器目录下没有对应物理路径,所以就会报404。 这样的nginx配置会出现该问题。 location / { alias /home/vue/dist/; index i 阅读全文

posted @ 2023-12-26 16:45 星河赵 阅读(229) 评论(0) 推荐(0) 编辑

CentOS 7下安装配置Nginx
摘要:本文基于 CentOS 7 下安装配置 Nginx 操作实践记录整理。 一、配置 EPEL 源 sudo yum install -y epel-release sudo yum -y update 二、安装 Nginx sudo yum install -y nginx 安装成功后,默认的网站目录 阅读全文

posted @ 2023-11-09 22:25 星河赵 阅读(188) 评论(0) 推荐(0) 编辑

Python打开https链接报错:unable to get local issuer certificate
摘要:Python打开https链接报错:unable to get local issuer certificate 或安装Python3.10以上版本,需要openssl 1.1.1以上版本,会导致openssl 下面缺少证书,记录下安装方法 问题描述: 当使用urllib.urlopen打开一个 h 阅读全文

posted @ 2023-11-03 10:38 星河赵 阅读(1197) 评论(0) 推荐(0) 编辑

安装Supervisor 配置开机启动
摘要:centos安装supervisor详细教程 安装supervisor 使用yum命令安装 $ sudo su - #切换为root用户 yum install epel-release yum install -y supervisor systemctl enable supervisord # 阅读全文

posted @ 2023-10-30 10:25 星河赵 阅读(286) 评论(0) 推荐(0) 编辑

Linux 查看日志的常用命令
摘要:1.查询最近多少条日志: tail -n 100 default.log 2.根据关键字查询日志: cat -n default.log |grep 'error' 3.根据关键字查出后多少行的日志 tail -n 100 file.log | grep "关键字" 4.根据关键字查出后100行中包 阅读全文

posted @ 2023-05-04 11:00 星河赵 阅读(918) 评论(0) 推荐(0) 编辑

Ubuntu20.04如何更换国内源
摘要:1.打开终端。 2.输入以下命令备份原来的源。 sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak 3.再输入以下命令打开sources.list配置文件更换源。 sudo vim /etc/apt/sources.list 配置内容如下 阅读全文

posted @ 2023-02-24 10:27 星河赵 阅读(13927) 评论(0) 推荐(1) 编辑

docker 操作笔记
摘要:1.Docker 创建ubuntu系统更换 apt-get源 创建Dockerfile并且更新apt源 在Dockerfile中添加如下两句代码: RUN sed -i s@/archive.ubuntu.com/@/mirrors.aliyun.com/@g /etc/apt/sources.li 阅读全文

posted @ 2023-02-23 18:05 星河赵 阅读(121) 评论(0) 推荐(0) 编辑

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示