因为阿里云服务器太贵,迁移到腾讯云
ssh 密钥配置
直接从本地复制写到 ~/.ssh/authorized_keys里
apt update
sudo apt update
miniconda
https://docs.conda.io/projects/miniconda/en/latest/index.html#quick-command-line-install
1 | mkdir -p ~/miniconda3 |
nvm
1 | curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash |
github ssh key 配置
ssh-keygen -t ed25519 -C "your_email@example.com"
https://github.com/settings/keys
nginx 配置
安装
https://nginx.org/en/linux_packages.html#Ubuntu
vi /etc/nginx/nginx.conf
总之就把之前的挪过来。
acme
chmod 600 ./aliyun_credentials.ini
sudo certbot certonly --authenticator=dns-aliyun --dns-aliyun-credentials='/home/ubuntu/aliyun_credentials.ini' -d "*.strawberrytree.top,strawberrytree.top"
sudo certbot certonly --authenticator=dns-aliyun --dns-aliyun-credentials='/home/ubuntu/aliyun_credentials.ini' -d "*.sc-viewer.top,sc-viewer.top"
业务迁移
nginx service.sc-viewer.top
(之后需要加cdn和serverless function)
mongodb 安装
https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/
注意设置 ulimit -n 64000。然后pin一下版本,没什么了。可以用mongosh测试一下是否安装成功。
git 服务器迁移
在我的原有服务器上,配置了 git 服务器,在古老时代用来做博客的自动化部署。这次考虑了一下要不要使用 vercel 来自动化部署,想想暂时还是维持原样比较好。
参考(https://www.liaoxuefeng.com/wiki/896043488029600/899998870925664)。
简单地把原有用户下的文件打包成压缩文件,然后扔到新机器去了。扔过去之后发现有403 forbidden,于是切了一下root用户。
docker
docker理论上是要安装的,这次先不管。
定期任务
可以通过crontab -e 编辑。将之前的搬过来即可。
其他项目迁移
确认一下还在run的项目有哪些