记录一些命令的使用语法

常用命令 Conda conda env list //当前有哪些环境 conda deactivate //退出当前环境 conda list //当前环境安装了哪些package conda remove -n xxx --all //删除xxx环境 conda create -n xxxx //新建一个环境 conda activate xxx //激活某个环境 systemctl systemctl restart nginx systemctl status nginx systemctl show nginx nginx nginx -T To be continue…

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

使用frp 和 nginx 进行反向穿透

创建这个website的初衷 记录一些东西 想把家里空闲的PC(一台ThinkPad E470C,安装了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: 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转发 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到家中内网机器上 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 服务 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 四月 26, 2025)

My First Post

简介 yes,this website work now. Hello! 👋😀

四月 3, 2025 · (updated 四月 16, 2025)