2
0
Files
build.wfc/docs/99-reference/tips.md
2025-04-12 16:03:11 +08:00

83 lines
2.3 KiB
Markdown

# Tips list
## git tips
git clone by ssh
```sh
git clone ssh://git@192.168.2.166:3122/WFC/build.wfc.git
git remote set-url origin git@192.168.2.166:3122/zhangsz/WFC/be.wfc.git
```
## docker tips
使用 Docker 日志清理工具
你可以使用 Docker 提供的 docker system prune 命令来清理未使用的数据,包括日志文件:
```sh
docker system prune -a
```
## java
安装 java 1.8
```sh
sudo apt update
sudo apt install openjdk-8-jdk
java -version
sudo update-alternatives --config java # 选择当前默认的java版本
```
## mongodb
安装mongodb, omada sdn controller 和依赖
```sh
wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
sudo apt update
sudo apt install -y mongodb-org
sudo systemctl start mongod
sudo systemctl enable mongod
sudo systemctl status mongod
sudo dpkg -i omada_v5.15.6.7_linux_x64_20241128140044_1733188152890.deb
sudo apt install --fix-broken
```
## devices
ap sn: 22475N7000767 mac: B0-19-21-7E-27-40
omada link
curl --location --request POST 'https://aps1-omada-northbound.tplinkcloud.com/openapi/authorize/token?grant_type=client_credentials' \
--header 'Content-Language: en-US' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'Host: aps1-omada-northbound.tplinkcloud.com' \
--header 'Connection: keep-alive' \
--data-raw '{
"omadacId": "10ccde5bfee5142b28a07f6146f41056",
"client_id": "48b3be2083dd4fbdb5f7cfd5c3a4abb6",
"client_secret": "2556dfcafe6d4288b3f0921aa6391c76"
}'
curl --location --request POST 'https://192.168.2.249:8043/openapi/authorize/token?grant_type=client_credentials' \
--header 'Content-Language: en-US' \
--header 'User-Agent: Apifox/1.0.0 (https://apifox.com)' \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--header 'Host: 192.168.2.249:8043' \
--header 'Connection: keep-alive' \
--data-raw '{
"omadacId": "f3aa6e479b94222581523710cc2c2a9d",
"client_id": "5036e77c81a74008821c694a715fe2b8",
"client_secret": "29faa06fb7f244b094377b48eb3083a7"
}'
## compile
mvn clean compile
mvn clean package -P prod