2
0
Files
build.wfc/docs/03-configuration/03-wfc-quickstart.md
2024-12-17 09:35:52 +08:00

133 lines
3.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# WANFi Control & Billing System
## 准备工作
```text
Linux >= Ubuntu 22.04
JDK >= 1.8 (Recommended version 1.8)
docker >= 24.0.7, build 24.0.7-0ubuntu2~22.04.1
docker-compose >= 1.29.2
```
## 获取安装包
安装包名: wfc-1.0.2-20241212.tar.gz
说明:
* 版本号: 1.0.2
* 构建日期20241212
## 安装和配置软件
* 创建安装目录
```sh
sudo mkdir /opt/wfc
```
* 解压软件包至安装目录
```sh
sudo tar xvfz wfc-1.0.2-20241212.tar.gz -C /opt/wfc
```
* 安装后目录树
```text
/opt/wfc # work root directory
├── bin # shell script and binary file
├── docker # docker compose work directory
│   ├── env # default docker environment file, will be copy to docker compose work directory
│   ├── mysql # mysql database container directory
│   │   ├── conf
│   │   ├── data
│   │   ├── db
│   │   ├── logs
│   │   └── tmp
│   ├── nacos # nacos container directory
│   │   ├── conf
│   │   └── logs
│   ├── nginx # nginx container directory
│   │   ├── conf
│   │   ├── conf.d
│   │   ├── html
│   │   │   └── dist
│   │   │   ├── sys # system portal
│   │   │   └── u # user portal
│   │   └── logs
│   ├── redis # redis container directroy
│   │   ├── conf
│   │   └── data
│   └── wfc # wfc container root directory
│   ├── auth # auth root directory
│   │   └── jar
│   ├── gateway # gateway root directory
│   │   └── jar
│   ├── modules # modules root directory
│   │   ├── file
│   │   │   └── jar
│   │   ├── gen
│   │   │   └── jar
│   │   ├── job
│   │   │   └── jar
│   │   ├── payment
│   │   │   └── jar
│   │   ├── system
│   │   │   └── jar
│   │   └── user
│   │   └── jar
│   ├── upload # file upload directory
│   └── visual
│   └── monitor
│   └── jar
└── systemd # system service daemon filewill be copy to /etc/systemd/system
└── system
```
* 配置软件
```sh
cd /opt/wfc/bin
sudo ./wfcsetup.sh all 192.168.13.128 #宿主机IP地址
```
* 修改docker环境参数
根据实际环境修改如下环境参数配置, 以下IP地址已经在上面配置过程被替换
```sh
cd /opt/wfc/docker
cat .env
MYSQL_ROOT_PASSWORD=123456
MYSQL_DATABASE=wfc_system_db
WFC_CONFIG_DATABASE=wfc_config_db
WFC_SYSTEM_DATABASE=wfc_system_db
WFC_USER_DATABASE=wfc_user_db
MYSQL_USER=mysql
MYSQL_PASSWORD=
NACOS_SERVER_ADDR=192.168.13.128:8848
NACOS_NAME_SPACE=wfc-prod
GATEWAY_ADDR=192.168.13.128:8080
```
* 启动/查看/停止/版本软件
```sh
cd /opt/wfc/bin
sudo ./wfccontrol.sh start/restart/status/stop/version
```
## 通过浏览器访问客户平台和用户平台
* 客户平台门户地址:
```url
http://192.168.13.128/sys
```
* 用户平台门户地址:
```url
http://192.168.13.128/u
```