Taskflow

To be continue…

四月 16, 2025 · (updated 四月 26, 2025) · Luke Fang

set up a Git Server

打算搭建一个自己的git 服务器

四月 16, 2025 · Luke Fang

Zabbix

my plan: 用zabbix来监控的这个网站的机器状态 Zabbix 7.0 LTS source: https://cdn.zabbix.com/zabbix/sources/stable/7.0/zabbix-7.0.11.tar.gz user manual: https://www.zabbix.com/documentation/current/zh/manual Zabbix agent v7.0.10 pre-compiled Zabbix agent binaries https://cdn.zabbix.com/zabbix/binaries/stable/7.0/7.0.10/zabbix_agent-7.0.10-linux-3.0-amd64-static.tar.gz

四月 16, 2025 · (updated 四月 26, 2025) · Luke Fang

记录一些命令的使用语法

记录一些自己经常用到的又时常忘记的linux command Conda conda env list //当前有哪些环境 conda deactivate //退出当前环境 conda list //当前环境安装了哪些package conda remove -n xxx --all //删除xxx环境 conda create -n xxxx //新建一个环境 conda activate xxx //激活某个环境 python venv 新增一个名称为ai_env环境(会在当前目录下新建一个ai_env目录) python3 -m venv /home/fangqing/ai_env 激活环境 source ~/ai_env/bin/activate 此时shell会出现一个ai_env环境的前缀 fangqing@spark-dec6:~$ source ~/ai-env/bin/activate (ai-env) fangqing@spark-dec6:~$ 退出环境 deactivate venv 是 Python 自带轻量环境,conda 是跨语言全能环境,日常小项目用 venv,数据科学 / 深度学习用 conda。 venv 只能用当前系统的python 版本, conda可以随便装python版本,能换python版本 systemctl 用systemctl对服务进行管理(以nginx为例) systemctl restart nginx //重启nginx systemctl status nginx //查看nginx状态 systemctl show nginx //查看nginx配置文件 nginx nginx -T //测试nginx配置文件 nginx -s reload //重新加载nginx配置文件 nginx的主配置在: /etc/nginx/nginx.conf 该文件会include 其他的子配置,如: include /etc/nginx/modules-enabled/*.conf; include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; fangqing@e470c:/etc/nginx/sites-enabled$ ls -al drwxr-xr-x 2 root root 4096 4月 3 2025 . drwxr-xr-x 8 root root 4096 3月 11 06:14 .. lrwxrwxrwx 1 root root 34 2月 18 2025 default -> /etc/nginx/sites-available/default 修改default 中的`root`值为本地website所在的文件路径 用户管理 增加用户:useradd useradd fqtest 删除用户:userdel userdel fqtest

四月 10, 2025 · (updated 四月 8, 2026) · Luke Fang

the NGG library

NNG(nanomsg-next-gen) is lightweight messaging library, https://github.com/nanomsg/nng, offering a simple API to solve common recurring messaging problems. NGG is implemented in C, requuring only C99 and CMake to build. To be continue…

四月 10, 2025 · (updated 四月 26, 2025) · Luke Fang

使用frp 和 nginx 进行反向穿透

我有一台空闲的2017年的ThinkPad E470C笔记本,在安装win10系统反复出现蓝屏后,换成ubuntu系统当服务器。在公司环境中,我希望可以远程登录到家里的E470C上做一些实验。我需要买一个有独立IP的外网虚拟主机,虚拟主机上部署frp server 服务,在E470C上部署frp client服务. see: https://gofrp.org/zh-cn/docs/ 步骤 godaddy上买个域名(fangqing.org) 买个虚拟主机,买香港的,不用备案,速度还不错(2G memory,2CPU),有独立IP(x.x.x.x) cloudflare 里注册账号,将域名的解析迁移过去,新增以下域名解析record: 1 2 3 CNAME www fangqing.org A fangqing.org x.x.x.x //具体的IP A *.fangqing.org x.x.x.x //泛域名解析 虚拟主机 安装ubuntu系统, ubuntu中安装nginx,fprs(做内网穿透用),用systemctl将nginx和frps增加到开机自启服务中 fprs配置:启动8080端口做http转发 1 2 3 4 5 6 7 vhostHTTPPort=8080 bindPort = 7000 subdomainHost = "fangqing.org" webServer.addr = "0.0.0.0" webServer.port = 7500 webServer.user = "xxxx" webServer.password = "xxxxx" nginx里新增配置 将对blog.fangqing.org域名的访问forward到frps的8080端口上 ,frps的8080端口会forward到家中内网机器上 1 2 3 4 5 6 7 8 9 10 11 12 server { listen 80; server_name blog.fangqing.org; location / { proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://localhost:8080; } } 家中内网主机 部署nginx(默认80端口) frpc服务配置里增加ssh 和http 服务 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 serverAddr = "x.x.x.x" serverPort = 7000 [[proxies]] name = "ssh" type = "tcp" localIP = "127.0.0.1" localPort = 22 remotePort = 6000 #通过域名 blog.fangqing.org 访问 [[proxies]] name = "web" type = "http" localPort = 80 subdomain = "blog" #这种方式是直接通过 IP+端口的方式访问(X.X.X.X:8888) [[proxies]] name = "nginx" type = "tcp" localIP = "127.0.0.1" localPort = 80 remotePort = 8888 这样,可以通过x.x.x.x:6000端口ssh到家中的内网主机上,内网主机也给外网主机提供http服务 如此,所有的工作都可以在内网主机上完成 ...

四月 3, 2025 · (updated 一月 23, 2026) · Luke Fang