💻准备本地建好的博客(默认Node环境配置完成)GIT基础环境搭建完成(宝塔面板)的腾讯云(轻量)服务器域名(非必须)🌐参考链接[宝塔Linux面板安装教程](https://www.bt.cn/bbs/thread-19376-1-1.html) ⚙️步骤本地生成ssh秘钥git config --global user.name "GitHub用户名" git config --global user.email "GitHub的邮箱" ssh-keygen -t rsa -C "GitHub的邮箱"如有可跳过😂,获取公匙命令如下cat ~/.ssh/id_rsa.pub连接服务器终端宝塔面板用户可直接左侧导航栏终端登录(如图)切换到 root 账号sudo su root⚠️宝塔默认是root账号安装 gityum install git这里宝塔可能已经默认安装git,腾讯轻量服务器 —– 宝塔定制版已经内置确认git环境与版本git -v创建 Git 账户创建 Git 账户并赋予权限adduser git chmod
hexo作为一款优秀的静态博客生成器有着一些显著的优点如免费快速简洁轻量,但也存在一些明显的缺点例如更换电脑不便需要重新安装环境,无法在线写文章(修改文章),随着文章和插件的增加hexo三连的速度会越来越慢,使用github actions集成化部署再配合hexoplusplus可以在很大程度上改善hexo的使用体验。 个人服务器是自建了 git 库,利用 hook 钩子发布到网站根目录。所以这篇教程最终是利用 hexo deploy 进行上传到服务器操作。获取token获取token是为了保证上传到GitHub公开的网站仓库(编译后的静态页面存放的仓库)有足够的权限可以上传,如果你只是要部署到服务器不同步到GitHub page可以忽略这一步。登录GitHub点击该链接再点击generate new token,创建token名称可以随意填写,但是必须勾选全部的repo,其他权限不用勾选。必须勾选全部的repo生成token后请复制保存到安全的地方确保已经正确记录token因为token只会显示这一次,如果忘记了只能重新生成,这样做也是为了保护账号安全防止被人盗取token为所欲为。
项目目的:解决无法脱离PC办公,搭建云端Vscode。项目环境:腾讯云轻量服务器1h2g6m宝塔面板amd架构x64centos7.9效果展示:搭建步骤:1、下载code-server源代码https://github.com/coder/code-server/releases/tag/v4.12.0tips:注意云服务器系统架构和类型2.创建域名这里宝塔面板创建域名是为了方便访问服务,如果没有域名可跳过此步骤。无域名在 /www/wwwroot 目录下新建一个文件夹用于放置代码文件,便于规范管理。3.上传下载的文件到服务器将下载的压缩包文件上传到之前建的网站目录下;接着解压重命名为codeserver(这个名字自定义,只是为了方便记忆)4.运行code-server直接在解压的文件夹内点击终端输入以下代码:./bin/code-server --host 0.0.0.0 --port 8080--host 0.0.0.0 表示允许公网访问--port 8080 表示服务端口是8080(这里可以自定义合适的端口)终端输出以下提示即表示服务启动成功进入浏览器,输入服务器公网ip,加上刚
zain
不会前端的测试不是好开发