0%

  • 系统:腾讯云 Ubuntu20.04.1 LTS
  • 软件:Nvm v0.40.1

安装 Nvm

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
sudo apt update

# 无法访问github,使用gitee镜像git仓库
# git clone https://github.com/nvm-sh/nvm.git
git clone https://gitee.com/taohel/nvm.git

# 进入目录并安装
cd nvm

./install.sh

# 应用环境变量
source ~/.bashrc

# 安装完成
nvm -v
阅读全文 »

  • 主题:NexT 7.8.0

写在前面

装系统、下软件、改配置,这些操作每次都是重复的,但是每次都要重新去找,所以要记录一下。也顺便记录下每次的各种坑,和我的解决方案。为了尽量避免这些坑,我也会记录下每次操作的环境、版本、时间。所以搭建了这个博客,就从博客配置开始吧。

站点配置

站点配置文件地址 /themes/next/_config.yml

代码复制按钮

1
2
3
copy_button:
enable: true
show_result: true
阅读全文 »

  • 系统:阿里云 Ubuntu20.04.1 LTS

写在前面

将服务器的公钥放在 Github/Gitee 上,实现免密拉取。然后在服务器上配置 Webhook,当仓库有更新时,Webhook 就会自动拉取代码并部署。

安装并配置 Webhook

1
apt install webhook
阅读全文 »

  • 软件:MongoDB 3.6.8

数据库管理

数据库导出

1
mongodump -h 127.0.0.1:27017 -d dataname -o ./dataname

数据库导入

1
mongorestore -h 127.0.0.1:27017 -d dataname ./dataname

数据库导入(身份验证)

1
mongorestore -h 127.0.0.1:27017 -u username -p password -d dataname ./dataname/ --authenticationDatabase admin

  • 系统:腾讯云 Ubuntu22.04 LTS
  • 软件:PHP 7.4
  • 软件:nginx 1.18.0

写在前面

本来打算用 PHP8.1 来安装 opencart4,可是 opencart4 的主题太少,又看了看 opencart3 的主题和生态。主题更多、生态更好、用户也更多。 加上opencart3 推荐 PHP7.4。

虽说woocommerce基于wordpress过于臃肿,可是比起前面两个,也有自己的优势。而且 wordpress 也推荐使用 PHP7.4,所以:

阅读全文 »

  • 设备:树莓派4B 8G
  • 系统:Ubuntu Server 22.04.2 LTS
  • 语言:Python3.10.6

安装环境和依赖

安装 ffmpeg 推流

1
sudo apt-get install ffmpeg 

首次运行可能需要安装 pip3

1
sudo apt install python3-pip

安装 opencv

1
pip3 install opencv-contrib-python -i https://mirrors.aliyun.com/pypi/simple/
阅读全文 »