Chinaunix

标题: 请教:FastDFS v1.22如何配置客户端 [打印本页]

作者: lanfeng356    时间: 2009-10-28 11:43
标题: 请教:FastDFS v1.22如何配置客户端
本人刚接触FastDFS,通过这两天看论坛,已经把tracker和storage已经配置成功了,http也配置成功了,关于client api不怎么理解,不知道怎么配置,还请配置过客户端的高手给点配置步骤,最好详细点的步骤,谢谢

操作系统:Redhat 5.3 x64
node1为tracker和storage
node2为storage


附录1:
[root@node1 php_client]# php fastdfs_test.php
PHP Notice:  Use of undefined constant FDFS_FILE_ID_SEPERATOR - assumed 'FDFS_FILE_ID_SEPERATOR' in /fastdfs/FastDFS/php_client/fastdfs_test.php on line 4
PHP Fatal error:  Call to undefined function fastdfs_tracker_make_all_connections() in /fastdfs/FastDFS/php_client/fastdfs_test.php on line 6

附录2:
[root@node1 php_client]# more fastdfs_client.ini
extension = fastdfs_client.so

fastdfs_client.tracker_group_count = 1
fastdfs_client.tracker_group0 = /fastdfs/FastDFS/conf/client.conf
#fastdfs_client.tracker_group1 = /home/yuqing/fastdfs/conf/client.conf

附录3:
[root@node1 php_client]# more /fastdfs/FastDFS/conf/client.conf
network_timeout=60
base_path=/fastdfs

tracker_server=172.18.27.133:22122

#standard log level as syslog, case insensitive, value list:
### emerg for emergency
### alert
### crit for critical
### error
### warn for warning
### notice
### info
### debug
log_level=info


#HTTP settings
http.tracker_server_port=8080

#use "#include" directive to include HTTP other settiongs
#include http.conf

附录4:
[root@gfs-node1 php_client]# more /fastdfs/FastDFS/conf/http.conf
# HTTP default content type
http.default_content_type = application/octet-stream

# MIME types mapping filename
# MIME types file format: MIME_type  extensions
# such as:  image/jpeg  jpeg jpg jpe
# you can use apache's MIME file: mime.types
http.mime_types_filename=mime.types

# if use token to anti-steal
# default value is false (0)
http.anti_steal.check_token=false

# token TTL (time to live), seconds
# default value is 600
http.anti_steal.token_ttl=900

# secret key to generate anti-steal token
# this parameter must be set when http.anti_steal.check_token set to true
# the length of the secret key should not exceed 128 bytes
http.anti_steal.secret_key=FastDFS1234567890

# return the content of the file when check token fail
# default value is empty (no file sepecified)
http.anti_steal.token_check_fail=/fastdfs/FastDFS/conf/anti-steal.jpg


附录5:

[root@node1 php_client]# netstat -an|grep -w 8080
tcp        0      0 0.0.0.0:8080                0.0.0.0:*                   LISTEN
作者: happy_fish100    时间: 2009-10-28 13:42
标题: 回复 #1 lanfeng356 的帖子
看一下帖子:http://linux.chinaunix.net/bbs/thread-1141400-1-1.html
有问题请留言。
作者: lanfeng356    时间: 2009-10-30 13:44
我想用FastDFS,部署一个webserver,比如tomcat,有成功的案例吗?应该怎样部署呢?

有知道的达人请帮忙~




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2