Skip to content

Commit 7ef394b

Browse files
author
veryben
committed
修改README.md添加使用说明
1 parent d0c4360 commit 7ef394b

File tree

1 file changed

+55
-1
lines changed

1 file changed

+55
-1
lines changed

README.md

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,57 @@
11

2-
FastDFS java client SDK
2+
# FastDFS java client SDK
3+
4+
FastDFS Java Client API may be copied only under the terms of the BSD license.
5+
6+
## 使用ant从源码构建
7+
8+
```
9+
ant clean package
10+
```
11+
12+
## 使用maven从源码安装
13+
14+
```
15+
mvn clean install
16+
```
17+
18+
## 使用maven从jar文件安装
19+
```
20+
mvn install:install-file -DgroupId=org.csource -DartifactId=fastdfs-client-java -Dversion=1.27-SNAPSHOT -Dpackaging=jar -Dfile=fastdfs-client-java-${version}.jar
21+
```
22+
23+
## 在您的maven项目pom.xml中添加依赖
24+
25+
```xml
26+
<dependency>
27+
<groupId>org.csource</groupId>
28+
<artifactId>fastdfs-client-java</artifactId>
29+
<version>1.27-SNAPSHOT</version>
30+
</dependency>
31+
```
32+
33+
## 创建配置文件fdfs_client.conf(或其它文件名xxx.conf)
34+
35+
文件所在位置可以是项目classpath(或OS文件系统目录比如/opt/):
36+
/opt/fdfs_client.conf
37+
C:\Users\James\config\fdfs_client.conf
38+
39+
优先按OS文件系统路径读取,没有找到才查找项目classpath,尤其针对linux环境下的相对路径比如:
40+
fdfs_client.conf
41+
config/fdfs_client.conf
42+
43+
```
44+
connect_timeout = 2
45+
network_timeout = 30
46+
charset = UTF-8
47+
http.tracker_http_port = 8080
48+
http.anti_steal_token = no
49+
http.secret_key = FastDFS1234567890
50+
51+
tracker_server = 10.0.11.247:22122
52+
tracker_server = 10.0.11.248:22122
53+
tracker_server = 10.0.11.249:22122
54+
```
55+
56+
注:tracker_server指向您自己IP地址和端口,1-n个
357

0 commit comments

Comments
 (0)