大橙子网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
上篇介绍了FastDFS的安装,这里主要是给NG安装fastdfs-nginx-module 模块,来完成FastDFS的上传与下载
10年积累的成都做网站、网站建设经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先网站设计后付款的网站建设流程,更有阳泉免费网站建设让你可以放心的选择与我们合作。这样就完成了Nginx 配置 fastdfs-nginx-module 模块
测试下:
开启上传 [root@TEST-01 nginx]#cd /etc/fdfs/ [root@TEST-01 fdfs]#cp client.conf.sample client.conf ...... # the base path to store log files base_path=/data/fastdfs # tracker_server can ocur more than once, and tracker_server format is # "host:port", host can be hostname or ip address tracker_server=192.168.12.102:22122 ....... 好了,上传一张图片试试 [root@TEST-01 fdfs]#fdfs_test /etc/fdfs/client.conf upload /tmp/Tulips.jpg This is FastDFS client test program v5.05 Copyright (C) 2008, Happy Fish / YuQing FastDFS may be copied only under the terms of the GNU General Public License V3, which may be found in the FastDFS source kit. Please visit the FastDFS Home Page http://www.csource.org/ for more detail. [2017-06-23 09:38:47] DEBUG - base_path=/data/fastdfs, connect_timeout=30, network_timeout=60, tracker_server_count=1, anti_steal_token=0, anti_steal_secret_key length=0, use_connection_pool=0, g_connection_pool_max_idle_time=3600s, use_storage_id=0, storage server id count: 0 tracker_query_storage_store_list_without_group: server 1. group_name=, ip_addr=192.168.12.102, port=23000 group_name=group1, ip_addr=192.168.12.102, port=23000 storage_upload_by_filename group_name=group1, remote_filename=M00/00/00/wKgMZllMcSeAb4ChAAl5WLU-YRY168.jpg source ip address: 192.168.12.102 file timestamp=2017-06-23 09:38:47 file size=620888 file crc32=3040764182 example file url: http://192.168.12.102/group1/M00/00/00/wKgMZllMcSeAb4ChAAl5WLU-YRY168.jpg storage_upload_slave_by_filename group_name=group1, remote_filename=M00/00/00/wKgMZllMcSeAb4ChAAl5WLU-YRY168_big.jpg source ip address: 192.168.12.102 file timestamp=2017-06-23 09:38:47 file size=620888 file crc32=3040764182 example file url: http://192.168.12.102/group1/M00/00/00/wKgMZllMcSeAb4ChAAl5WLU-YRY168_big.jpg 上传后,图片的URL也会出现,我们访问试试 附件:http://down.51cto.com/data/2366780另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。