安装依赖环境:

CentOS系统

yum install -y java-1.8.0-openjdk unzip

Debian 9 / Ubuntu 14+

apt update
apt install -y openjdk-8-jre-headless unzip

Debian 10 (Buster) 系统

apt update && apt install -y apt-transport-https software-properties-common ca-certificates dirmngr gnupg
wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | apt-key add -
add-apt-repository --yes https://adoptopenjdk.jfrog.io/adoptopenjdk/deb/
apt update && apt install -y adoptopenjdk-8-hotspot-jre

如为更新程序, 则请先执行 ~/zfile/bin/stop.sh && rm -rf ~/zfile 清理旧程序. 首次安装请忽略此选项.

下载项目:

cd ~
wget https://c.jun6.net/ZFILE/zfile-release.war
mkdir zfile && unzip zfile-release.war -d zfile && rm -rf zfile-release.war
chmod +x zfile/bin/*.sh

下载指定版本可以将 zfile-release.war 改为 zfile-x.x.war,如 zfile-2.2.war。

程序的目录结构为:

├── zfile

├── META-INF
├── WEB-INF
└── bin
    ├── start.sh    # 启动脚本
    └── stop.sh     # 停止脚本
    ├── restart.sh  # 重启脚本

启动项目:

~/zfile/bin/start.sh

开机自启动

crontab 添加
@reboot ( sleep 90 ; sh /root/zfile/bin/start.sh )

用户前台: http://127.0.0.1:8080/#/main

初始安装: http://127.0.0.1:8080/#/install

管理后台: http://127.0.0.1:8080/#/admin

预览地址: https://zfile.jun6.net

文档地址: http://docs.zhaojun.im/zfile

项目源码: https://github.com/zhaojun1998/zfile

前端源码: https://github.com/zhaojun1998/zfile-vue