Add LICENSE and update readme.
This commit is contained in:
parent
f49f9137fe
commit
c517e5a51d
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017 蓝眼
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
69
README.md
69
README.md
@ -9,12 +9,14 @@
|
||||
### 简介
|
||||
蓝眼云盘是 [蓝眼系列开源软件](https://github.com/eyebluecn) 中的第一个
|
||||
|
||||
- 主要用于快速搭建私人云盘,可以简单理解为部署在自己服务器上的百度云盘。
|
||||
- 蓝眼云盘提供了编程接口,可以使用接口上传文件,作为其他网站、系统、app的资源存储器,可以当作单机版的七牛云或阿里云OSS使用。
|
||||
- 主要用于快速搭建私人云盘,可以简单理解为部署在自己服务器上的[百度云盘](https://pan.baidu.com/)。
|
||||
- 蓝眼云盘提供了编程接口,可以使用接口上传文件,作为其他网站、系统、app的资源存储器,可以当作单机版的[七牛云](https://www.qiniu.com)或[阿里云OSS](https://www.aliyun.com/product/oss)使用。
|
||||
|
||||
蓝眼云盘可以作为团队内部或个人私有的云盘使用,亦可当作专门处理图片,音频,视频等二进制文件的第三方编程辅助工具。
|
||||
|
||||
### 安装
|
||||
### 使用安装包安装
|
||||
|
||||
#### a) 准备工作
|
||||
|
||||
1. 一台windows/linux服务器,当然你可以使用自己的电脑充当这台服务器
|
||||
|
||||
@ -22,7 +24,7 @@
|
||||
|
||||
3. [在这里](https://github.com/eyebluecn/tank/releases)下载服务器对应的安装包
|
||||
|
||||
4. 在服务器上解压缩,修改配置文件`tank.json`,各项说明如下:
|
||||
4. 在服务器上解压缩,修改配置文件`conf/tank.json`,各项说明如下:
|
||||
```
|
||||
|
||||
{
|
||||
@ -50,7 +52,7 @@
|
||||
|
||||
```
|
||||
|
||||
5. 运行
|
||||
#### b) 运行
|
||||
|
||||
- windows平台直接双击应用目录下的`tank.exe`。
|
||||
|
||||
@ -74,10 +76,65 @@ cd 应用目录路径/service
|
||||
|
||||
```
|
||||
|
||||
6. 验证
|
||||
#### c) 验证
|
||||
|
||||
浏览器中打开 http://127.0.0.1:6010 (127.0.0.1请使用服务器所在ip,6010请使用`tank.json`中配置的`ServerPort`) 可以看到以下登录页面:
|
||||
|
||||
|
||||
### 使用源代码自行打包
|
||||
|
||||
#### a) 准备工作
|
||||
|
||||
1. 一台windows/linux服务器,当然你可以使用自己的电脑充当这台服务器
|
||||
|
||||
2. Mysql数据库
|
||||
|
||||
3. clone本项目
|
||||
|
||||
4. 安装Golang,环境变量 `GOPATH`配置到工程目录,建议工程目录结构如下:
|
||||
|
||||
```
|
||||
golang #环境变量GOPATH所在路径
|
||||
....bin #编译生成的可执行文件目录
|
||||
....pkg #编译生成第三方库
|
||||
....src #golang工程源代码
|
||||
........github.com #来自github的第三方库
|
||||
........golang.org #来自golang.org的第三方库
|
||||
........tank #clone下来的tank根目录
|
||||
............build #用来辅助打包的文件夹
|
||||
................conf #默认的配置文件
|
||||
................doc #文档
|
||||
................html #前端静态资源,从项目tank-front编译获得
|
||||
................pack #打包的脚本
|
||||
................service #将tank当作服务启动的脚本
|
||||
............dist #运行打包脚本后获得的安装包目录
|
||||
............rest
|
||||
```
|
||||
|
||||
5. 准备项目依赖的第三方库
|
||||
|
||||
项目中依赖了以下第三方库
|
||||
|
||||
- golang.org/x
|
||||
- github.com/disintegration/imaging
|
||||
- github.com/json-iterator/go
|
||||
- github.com/go-sql-driver/mysql
|
||||
- github.com/jinzhu/gorm
|
||||
- github.com/nu7hatch/gouuid
|
||||
|
||||
其中`golang.org/x`国内无法下载,请从[这里](https://github.com/eyebluecn/golang.org)下载,并按上文推荐的目录结构放置。其余依赖项均可通过安装脚本自动下载。
|
||||
|
||||
#### b) 打包
|
||||
|
||||
- windows平台双击运行 `tank/build/pack/build.bat`,成功之后可在`tank/dist`下看到`tank-x.x.x`文件夹,该文件夹即为最终安装包。
|
||||
|
||||
- linux平台运行如下命令:
|
||||
```
|
||||
cd tank/build/pack/
|
||||
./build.sh
|
||||
```
|
||||
成功之后可在`tank/dist`下看到`tank-x.x.x.linux-amd64.tar.gz`
|
||||
|
||||
利用得到的安装包即可参考上文的`使用安装包安装`。
|
||||
|
||||
|
||||
|
@ -20,7 +20,7 @@ set VERSION_NAME=tank-1.0.0
|
||||
|
||||
cd %GOPATH%
|
||||
|
||||
echo golang.org . Please download from: https://github.com/MXi4oyu/golang.org and put in the directory with same level of github.com
|
||||
echo golang.org . Please download from: https://github.com/eyebluecn/golang.org and put in the directory with same level of github.com
|
||||
@rem echo go get golang.org/x
|
||||
@rem go get golang.org/x
|
||||
|
||||
|
@ -13,7 +13,7 @@ FINAL_NAME=$VERSION_NAME.linux-amd64.tar.gz
|
||||
|
||||
cd $GOPATH
|
||||
|
||||
echo "golang.org . Please download from: https://github.com/MXi4oyu/golang.org and put in the directory with same level of github.com"
|
||||
echo "golang.org . Please download from: https://github.com/eyebluecn/golang.org and put in the directory with same level of github.com"
|
||||
# echo "go get golang.org/x"
|
||||
# go get golang.org/x
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user