# apisixWeb
**Repository Path**: amigo2008/apisixWeb
## Basic Information
- **Project Name**: apisixWeb
- **Description**: apisixWeb是一个Apisix的webui界面,该项目使用apisix的管理API(即数据面API)实现了对apisix实例的业务操作!
- **Primary Language**: Unknown
- **License**: Apache-2.0
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 20
- **Created**: 2023-07-02
- **Last Updated**: 2023-07-02
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# apisixWeb
## description
apisixWeb is a webui interface of Apisix. This project uses the management API of apisix (that is, the data plane API) to realize the business operation of the apisix instance!
## build
```bash
git clone git@gitee.com:dyrnq/apisixWeb.git
cd apisixWeb
./mvnw -s ./settings.xml clean package -Dmaven.test.skip=true
```
## run
### install jdk
Ubuntu
```bash
apt update
apt install openjdk-8-jdk -y
# apt install openjdk-11-jdk -y
```
Centos
```bash
yum install -y java-1.8.0-openjdk
# yum install -y java-11-openjdk
```
### install apisix
### run apisixWeb
```bash
wget https://a.dyrnq.com/apisixWeb/f/latest/apisixWeb.jar
```
```bash
java -jar apisixWeb.jar
```
run with more cmd-opts
```bash
java \
-server \
-Xms512m \
-Xmx512m \
-Djava.awt.headless=true \
-Dfile.encoding=UTF-8 \
-Duser.timezone=Asia/Shanghai \
-Djava.net.preferIPv4Stack=true \
-jar apisixWeb.jar \
--server.port=3333 \
--server.session.timeout=172800
```
run with systemd
```bash
vim /etc/systemd/system/apisixWeb.service
```
```bash
[Unit]
Description=apisixWeb
After=syslog.target network.target
[Service]
Type=simple
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/java/bin"
TimeoutStartSec=30
TimeoutStopSec=20
ExecStart=/usr/bin/java \
-server \
-Xms512m \
-Xmx512m \
-Dfile.encoding=UTF-8 \
-Duser.timezone=Asia/Shanghai \
-Djava.net.preferIPv4Stack=true \
-jar /data/apisixWeb/apisixWeb.jar \
--server.port=3333 \
--server.session.timeout=172800
ExecStop=/bin/kill -s TERM $MAINPID
Restart=always
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TasksMax=infinity
[Install]
WantedBy=multi-user.target
```
```bash
systemctl daemon-reload
if systemctl is-active apisixWeb &>/dev/null; then
systemctl restart apisixWeb
else
systemctl enable --now apisixWeb
fi
systemctl status -l apisixWeb --no-pager
```
Change default session jwt secret
```bash
java -cp apisixWeb.jar cli jwt
```
Then pass `--server.session.state.jwt.secret=your-secret` to `java -jar`.
Parameter description (all are optional)
| Parameter | Meaning | Default |
|------------------------------|------------------------------------------------|-----------------|
| --server.port | http server port | 8080 |
| --project.home | project home dir, storing db, cert, logs, etc. | $HOME/apisixWeb |
| --spring.database.type | optional mysql,sqlite,postgresql | h2 |
| --spring.datasource.url | datasource url | |
| --spring.datasource.username | datasource username | |
| --spring.datasource.password | datasource password | |