- 浏览: 583963 次
- 性别:
- 来自: 广州
文章分类
- 全部博客 (365)
- Tomcat调优 (2)
- Apache Http (20)
- Webserver安装 (5)
- Linux安装 (28)
- Linux常用命令 (17)
- C语言及网络编程 (10)
- 文件系统 (0)
- Lucene (12)
- Hadoop (9)
- FastDFS (8)
- 报表 (0)
- 性能测试 (1)
- JAVA (18)
- CSharp (3)
- C++ (38)
- BI (0)
- 数据挖掘 (0)
- 数据采集 (0)
- 网址收集整理 (3)
- Resin (0)
- JBoss (0)
- nginx (0)
- 数据结构 (1)
- 随记 (5)
- Katta (1)
- Shell (6)
- webservice (0)
- JBPM (2)
- JQuery (6)
- Flex (41)
- SSH (0)
- javascript (7)
- php (13)
- 数据库 (6)
- 搜索引擎排序 (2)
- LVS (3)
- solr (2)
- windows (1)
- mysql (3)
- 营销软件 (1)
- tfs (1)
- memcache (5)
- 分布式搜索 (3)
- 关注的博客 (1)
- Android (2)
- clucene (11)
- 综合 (1)
- c c++ 多线程 (6)
- Linux (1)
- 注册码 (1)
- 文件类型转换 (3)
- Linux 与 asp.net (2)
- perl (5)
- coreseek (1)
- 阅读器 (2)
- SEO (1)
- 励志 (1)
- 在线性能测试工具 (1)
- yii (7)
- 服务器监控 (1)
- 广告 (1)
- 代理服务 (5)
- zookeeper (8)
- 广告联盟 (0)
- 常用软件下载 (1)
- 架设自已的站点心得 (0)
最新评论
-
terry07:
java 7 用这个就可以了 Desktop desktop ...
关于java Runtime.getRunTime.exec(String command)的使用 -
HSINKING:
怎么设置打开的dos 窗口是指定的路径下
关于java调用bat文件,不打开窗口 -
liubang201010:
hyperic hq更多参考资料,请访问:http://www ...
hyperic-hq -
^=^:
STDIN_FILENO是unistd.h中定义的一个numb ...
深入理解dup和dup2的用法 -
antor:
留个记号,学习了
[转]用java流方式判断文件类型
参考资源(以后经常补写)
0\在windows eclipse 下的编译
首先建一个hello 工程,并且能编译通过,然后把FastDfs文件目录copy到 src目录下
a:设置环境变量 CYGWIN_HOME
b:在properties中的c/c++ build的build command设置 ${CYGWIN_HOME}/bin/sh.exe /cygdrive/u/programe/testproject/test/src/FastDFS/make.sh
1\基本配置
参看install
主要是调路径,端口号等
2\如果要支持http Server
配 置
tracker.conf ,把##include http.conf改成 #include http.conf
storage.conf ,把##include http.conf改成 #include http.conf
修改mash.sh 把 #WITH_HTTPD=1 改成 WITH_HTTPD=1(重要)
安装libEvent库
1. # tar xzvf libevent-2.0.4-alpha.tar.gz
2. # cd libevent-2.0.4
3. # ./configure --prefix=/home/super/installLIB
4. # make
5. # make install
3\执行
./make.sh
./make.sh install (如果要卸载,./make.sh clean)
可能会出现
error while loading shared libraries: libevent_core.so.3: cannot open shared object file: No such file or directory
执行
ln -s /home/super/installLIB/lib/libevent_core.so.3 /lib/libevent_core.so.3
4\注意
运行情况请看日志文件
trackerd.log
storaged.log
它们具体内容如下
trackerd.log
[2010-05-03 06:47:26] INFO - FastDFS v1.27, base_path=/fastdfs/FastDFS, network_timeout=60s, port=22122, bind_addr=, max_connections=256, store_lookup=2, store_group=, store_server=0, store_path=0, reserved_storage_space=1024MB, download_server=0, allow_ip_count=-1, sync_log_buff_interval=10s, check_active_interval=120s, thread_stack_size=64 KB, storage_ip_changed_auto_adjust=1
[2010-05-03 06:47:26] INFO - HTTP supported: server_port=8080, default_content_type=application/octet-stream, anti_steal_token=0, token_ttl=0s, anti_steal_secret_key length=0, token_check_fail content_type=, token_check_fail buff length=0, check_active_interval=30, check_active_type=tcp, check_active_uri=/status.html
storaged.log
[2010-05-03 06:47:29] INFO - FastDFS v1.27, base_path=/fastdfs/FastDFS, store_path_count=1, subdir_count_per_path=256, group_name=group1, network_timeout=60s, port=23000, bind_addr=, client_bind=1, max_connections=256, heart_beat_interval=30s, stat_report_interval=60s, tracker_server_count=1, sync_wait_msec=200ms, sync_interval=0ms, sync_start_time=00:00, sync_end_time: 23:59, allow_ip_count=-1, file_distribute_path_mode=0, file_distribute_rotate_count=100, fsync_after_written_bytes=0, sync_log_buff_interval=10s, sync_binlog_buff_interval=60s, thread_stack_size=512 KB, upload_priority=10, if_alias_prefix=, check_file_duplicate=0, FDHT group count=0, FDHT server count=0, FDHT key_namespace=, FDHT keep_alive=0, HTTP server port=8888, domain name=
[2010-05-03 06:47:29] INFO - HTTP supported: server_port=8888, http_trunk_size=262144, default_content_type=application/octet-stream, anti_steal_token=0, token_ttl=0s, anti_steal_secret_key length=0, token_check_fail content_type=, token_check_fail buff length=0
[2010-05-03 06:47:30] INFO - file: storage_param_getter.c, line: 225, storage_ip_changed_auto_adjust=1
[2010-05-03 06:47:31] INFO - file: tracker_client_thread.c, line: 257, successfully connect to tracker server 192.168.247.128:22122, as a tracker client, my ip is 192.168.247.128
5\上传图片后(参看install文件)
则返回 http://192.168.247.128:8080/group1/M00/00/00/wKj3gEvd84oAAAAAAABdrVV-uEs424_big.jpg
在ie中执行 http://192.168.247.128:8080/group1/M00/00/00/wKj3gEvd84oAAAAAAABdrVV-uEs424_big.jpg 看到此图片正常运行
6、
查看端口号
lsof -i :端口 号
lsof -i :8080
显示结果
[root@linux2 bin]# lsof -i :8080
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
fdfs_trac 4742 root 10u IPv4 14679 TCP *:webcache (LISTEN)
[root@call root]# netstat -anp
显示结果
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN 2129/hpiod
tcp 0 0 0.0.0.0:835 0.0.0.0:* LISTEN 1925/rpc.statd
tcp 0 0 0.0.0.0:22122 0.0.0.0:* LISTEN 4742/fdfs_trackerd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1891/portmap
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 4742/fdfs_trackerd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2146/cupsd
tcp 0 0 0.0.0.0:8888 0.0.0.0:* LISTEN 5006/fdfs_storaged
tcp 0 0 0.0.0.0:23000 0.0.0.0:* LISTEN 5006/fdfs_storaged
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2192/sendmail: acce
tcp 0 0 127.0.0.1:2207 0.0.0.0:* LISTEN 2134/python
tcp 0 0 192.168.247.128:22122 192.168.247.128:48836 ESTABLISHED 4742/fdfs_trackerd
tcp 0 0 192.168.247.128:48836 192.168.247.128:22122 ESTABLISHED 5006/fdfs_storaged
tcp 0 0 192.168.247.128:57448 192.168.247.128:8888 TIME_WAIT -
tcp 0 0 192.168.247.128:57447 192.168.247.128:8888 TIME_WAIT -
tcp 0 0 :::22 :::* LISTEN 2160/sshd
tcp 0 0 ::ffff:192.168.247.128:22 ::ffff:192.168.247.1:1038 ESTABLISHED 2754/0
tcp 0 0 ::ffff:192.168.247.128:22 ::ffff:192.168.247.1:1051 ESTABLISHED 3358/1
tcp 0 48 ::ffff:192.168.247.128:22 ::ffff:192.168.247.1:1101 ESTABLISHED 4149/2
udp 0 0 0.0.0.0:32768 0.0.0.0:* 2317/avahi-daemon:
udp 0 0 0.0.0.0:829 0.0.0.0:* 1925/rpc.statd
udp 0 0 0.0.0.0:832 0.0.0.0:* 1925/rpc.statd
udp 0 0 0.0.0.0:68 0.0.0.0:* 1748/dhclient
udp 0 0 0.0.0.0:5353 0.0.0.0:* 2317/avahi-daemon:
udp 0 0 0.0.0.0:111 0.0.0.0:* 1891/portmap
udp 0 0 0.0.0.0:631 0.0.0.0:* 2146/cupsd
udp 0 0 :::32769 :::* 2317/avahi-daemon:
udp 0 0 :::5353 :::* 2317/avahi-daemon:
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 11230 2723/gam_server @/tmp/fam-root-
unix 25 [ ] DGRAM 6411 1847/syslogd /dev/log
unix 2 [ ACC ] STREAM LISTENING 10819 2679/scim-launcher /tmp/scim-socket-frontend-root
unix 2 [ ACC ] STREAM LISTENING 11363 2741/mapping-daemon /tmp/mapping-root
7\
wget -S file_url
wget -S http://192.168.247.128:8888/group1/M00/00/00/wKj3gEvd84oAAAAAAABdrVV-uEs424_big.jpg 可以得到文件,并把文件保存在当前路径下
8\
>> 3.store_path这个参数的作用
同一个GROUP中的store_path目录个数必须大小一样,但目录名称可以不相同。
>> 4.能直接访问吗?我认为不能?
可以配合apache使用。在存储服务器上安装apache,将DocumentRoot配置到${base_path}/data目录。
以前有人问过类似的问题,参阅:http://linux.chinaunix.net/bbs/thread-1062825-1-1.html
2.其它这个10台电脑.用rsync就可能实现.好像也没有必要使用fast-dfs吧!
问题一
无法断点调试,断点时报错如下,
Can't find a source file at "/cygdrive/d/eclipse-cpp/workspaces/easyhello/easyhello.cpp"
Locate the file or edit the source lookup path to include its location.
解决:
must provide a mapping from /cygdrive/d to d:\ (or whatever your drive letter is).
in the eclipse IDE, go to menu Window -> Preferences -> C/C++ -> Debug-> Common Source Lookup Path -> Add.
增加一个Path Mapping
名字debugmapping 点击 add
Compilation path ---->/cygdrive/d
Local File System Path ---> d:\
Select OK to finish the dialogs.
注意(Windows平台下),特别要在
make.sh 中加入如下三行
cd /cygdrive/j
cd /cygdrive/j/fastdfs/fastv1.21_twoDevelope/fdstdfs/dfsfast/src/FastDFS
pwd
问查询某个端口是否已被使用 #netstat -na |grep tcp 列出所有开放的TCP端口(已经占用的) netstat -an | grep 8080 查询8080端口是否占用
0\在windows eclipse 下的编译
首先建一个hello 工程,并且能编译通过,然后把FastDfs文件目录copy到 src目录下
a:设置环境变量 CYGWIN_HOME
b:在properties中的c/c++ build的build command设置 ${CYGWIN_HOME}/bin/sh.exe /cygdrive/u/programe/testproject/test/src/FastDFS/make.sh
1\基本配置
参看install
主要是调路径,端口号等
2\如果要支持http Server
配 置
tracker.conf ,把##include http.conf改成 #include http.conf
storage.conf ,把##include http.conf改成 #include http.conf
修改mash.sh 把 #WITH_HTTPD=1 改成 WITH_HTTPD=1(重要)
安装libEvent库
1. # tar xzvf libevent-2.0.4-alpha.tar.gz
2. # cd libevent-2.0.4
3. # ./configure --prefix=/home/super/installLIB
4. # make
5. # make install
3\执行
./make.sh
./make.sh install (如果要卸载,./make.sh clean)
可能会出现
error while loading shared libraries: libevent_core.so.3: cannot open shared object file: No such file or directory
执行
ln -s /home/super/installLIB/lib/libevent_core.so.3 /lib/libevent_core.so.3
4\注意
运行情况请看日志文件
trackerd.log
storaged.log
它们具体内容如下
trackerd.log
[2010-05-03 06:47:26] INFO - FastDFS v1.27, base_path=/fastdfs/FastDFS, network_timeout=60s, port=22122, bind_addr=, max_connections=256, store_lookup=2, store_group=, store_server=0, store_path=0, reserved_storage_space=1024MB, download_server=0, allow_ip_count=-1, sync_log_buff_interval=10s, check_active_interval=120s, thread_stack_size=64 KB, storage_ip_changed_auto_adjust=1
[2010-05-03 06:47:26] INFO - HTTP supported: server_port=8080, default_content_type=application/octet-stream, anti_steal_token=0, token_ttl=0s, anti_steal_secret_key length=0, token_check_fail content_type=, token_check_fail buff length=0, check_active_interval=30, check_active_type=tcp, check_active_uri=/status.html
storaged.log
[2010-05-03 06:47:29] INFO - FastDFS v1.27, base_path=/fastdfs/FastDFS, store_path_count=1, subdir_count_per_path=256, group_name=group1, network_timeout=60s, port=23000, bind_addr=, client_bind=1, max_connections=256, heart_beat_interval=30s, stat_report_interval=60s, tracker_server_count=1, sync_wait_msec=200ms, sync_interval=0ms, sync_start_time=00:00, sync_end_time: 23:59, allow_ip_count=-1, file_distribute_path_mode=0, file_distribute_rotate_count=100, fsync_after_written_bytes=0, sync_log_buff_interval=10s, sync_binlog_buff_interval=60s, thread_stack_size=512 KB, upload_priority=10, if_alias_prefix=, check_file_duplicate=0, FDHT group count=0, FDHT server count=0, FDHT key_namespace=, FDHT keep_alive=0, HTTP server port=8888, domain name=
[2010-05-03 06:47:29] INFO - HTTP supported: server_port=8888, http_trunk_size=262144, default_content_type=application/octet-stream, anti_steal_token=0, token_ttl=0s, anti_steal_secret_key length=0, token_check_fail content_type=, token_check_fail buff length=0
[2010-05-03 06:47:30] INFO - file: storage_param_getter.c, line: 225, storage_ip_changed_auto_adjust=1
[2010-05-03 06:47:31] INFO - file: tracker_client_thread.c, line: 257, successfully connect to tracker server 192.168.247.128:22122, as a tracker client, my ip is 192.168.247.128
5\上传图片后(参看install文件)
则返回 http://192.168.247.128:8080/group1/M00/00/00/wKj3gEvd84oAAAAAAABdrVV-uEs424_big.jpg
在ie中执行 http://192.168.247.128:8080/group1/M00/00/00/wKj3gEvd84oAAAAAAABdrVV-uEs424_big.jpg 看到此图片正常运行
6、
查看端口号
lsof -i :端口 号
lsof -i :8080
显示结果
[root@linux2 bin]# lsof -i :8080
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
fdfs_trac 4742 root 10u IPv4 14679 TCP *:webcache (LISTEN)
[root@call root]# netstat -anp
显示结果
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:2208 0.0.0.0:* LISTEN 2129/hpiod
tcp 0 0 0.0.0.0:835 0.0.0.0:* LISTEN 1925/rpc.statd
tcp 0 0 0.0.0.0:22122 0.0.0.0:* LISTEN 4742/fdfs_trackerd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1891/portmap
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 4742/fdfs_trackerd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2146/cupsd
tcp 0 0 0.0.0.0:8888 0.0.0.0:* LISTEN 5006/fdfs_storaged
tcp 0 0 0.0.0.0:23000 0.0.0.0:* LISTEN 5006/fdfs_storaged
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 2192/sendmail: acce
tcp 0 0 127.0.0.1:2207 0.0.0.0:* LISTEN 2134/python
tcp 0 0 192.168.247.128:22122 192.168.247.128:48836 ESTABLISHED 4742/fdfs_trackerd
tcp 0 0 192.168.247.128:48836 192.168.247.128:22122 ESTABLISHED 5006/fdfs_storaged
tcp 0 0 192.168.247.128:57448 192.168.247.128:8888 TIME_WAIT -
tcp 0 0 192.168.247.128:57447 192.168.247.128:8888 TIME_WAIT -
tcp 0 0 :::22 :::* LISTEN 2160/sshd
tcp 0 0 ::ffff:192.168.247.128:22 ::ffff:192.168.247.1:1038 ESTABLISHED 2754/0
tcp 0 0 ::ffff:192.168.247.128:22 ::ffff:192.168.247.1:1051 ESTABLISHED 3358/1
tcp 0 48 ::ffff:192.168.247.128:22 ::ffff:192.168.247.1:1101 ESTABLISHED 4149/2
udp 0 0 0.0.0.0:32768 0.0.0.0:* 2317/avahi-daemon:
udp 0 0 0.0.0.0:829 0.0.0.0:* 1925/rpc.statd
udp 0 0 0.0.0.0:832 0.0.0.0:* 1925/rpc.statd
udp 0 0 0.0.0.0:68 0.0.0.0:* 1748/dhclient
udp 0 0 0.0.0.0:5353 0.0.0.0:* 2317/avahi-daemon:
udp 0 0 0.0.0.0:111 0.0.0.0:* 1891/portmap
udp 0 0 0.0.0.0:631 0.0.0.0:* 2146/cupsd
udp 0 0 :::32769 :::* 2317/avahi-daemon:
udp 0 0 :::5353 :::* 2317/avahi-daemon:
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 11230 2723/gam_server @/tmp/fam-root-
unix 25 [ ] DGRAM 6411 1847/syslogd /dev/log
unix 2 [ ACC ] STREAM LISTENING 10819 2679/scim-launcher /tmp/scim-socket-frontend-root
unix 2 [ ACC ] STREAM LISTENING 11363 2741/mapping-daemon /tmp/mapping-root
7\
wget -S file_url
wget -S http://192.168.247.128:8888/group1/M00/00/00/wKj3gEvd84oAAAAAAABdrVV-uEs424_big.jpg 可以得到文件,并把文件保存在当前路径下
8\
>> 3.store_path这个参数的作用
同一个GROUP中的store_path目录个数必须大小一样,但目录名称可以不相同。
>> 4.能直接访问吗?我认为不能?
可以配合apache使用。在存储服务器上安装apache,将DocumentRoot配置到${base_path}/data目录。
以前有人问过类似的问题,参阅:http://linux.chinaunix.net/bbs/thread-1062825-1-1.html
2.其它这个10台电脑.用rsync就可能实现.好像也没有必要使用fast-dfs吧!
问题一
无法断点调试,断点时报错如下,
Can't find a source file at "/cygdrive/d/eclipse-cpp/workspaces/easyhello/easyhello.cpp"
Locate the file or edit the source lookup path to include its location.
解决:
must provide a mapping from /cygdrive/d to d:\ (or whatever your drive letter is).
in the eclipse IDE, go to menu Window -> Preferences -> C/C++ -> Debug-> Common Source Lookup Path -> Add.
增加一个Path Mapping
名字debugmapping 点击 add
Compilation path ---->/cygdrive/d
Local File System Path ---> d:\
Select OK to finish the dialogs.
注意(Windows平台下),特别要在
make.sh 中加入如下三行
cd /cygdrive/j
cd /cygdrive/j/fastdfs/fastv1.21_twoDevelope/fdstdfs/dfsfast/src/FastDFS
pwd
发表评论
-
提升磁盘IO性能的几个技巧
2011-05-12 20:47 1749引用本帖最后由 happy_fis ... -
fastdfs-apache-module 安装随记 原创
2011-03-17 16:18 7965${CYGWIN_HOME}/bin/sh.exe /cygd ... -
FastDFS注意事项
2011-03-15 17:35 4174>>1.除了在storage.conf ... -
fastdfs-apache-module模块在centos下的使用说明
2011-03-14 16:22 1672from http://www.blogjava.net/ya ... -
fastDfs BBS list
2011-01-13 13:24 868http://linux.chinaunix.net/bbs/ ... -
FastDFS HOWTO - 同步机制
2011-01-13 10:50 1753引用happy_fish100 发表于 2 ... -
网址收集
2010-07-01 11:08 863此链接很好的介绍了FastDfs相关操作,包抱编译\二次开发\ ...
相关推荐
Jupyter-Notebook
Jupyter-Notebook
高效甘特图模板下载-精心整理.zip
lstm Summary Framework: z = U>x, x u Uz Criteria for choosing U: • PCA: maximize projected variance • CCA: maximize projected correlation • FDA: maximize projected intraclass variance
OpenGL调试工具,适合图形开发者,包括视频开发,播放器开始以及游戏开发者。
全国行政区划shp最新图.zip
全国研究生招生与在校数据+国家线-最新.zip
Jupyter-Notebook
直播电商交流平台 SSM毕业设计 附带论文 启动教程:https://www.bilibili.com/video/BV1GK1iYyE2B
《林黛玉进贾府》课本剧剧本
2000-2020年沪深A股上市公司融资约束程度SA指数-最新数据发布.zip
PPT模版资料,PPT模版资料
CPA注会考试最新教材资料-最新发布.zip
1、资源项目源码均已通过严格测试验证,保证能够正常运行; 2、项目问题、技术讨论,可以给博主私信或留言,博主看到后会第一时间与您进行沟通; 3、本项目比较适合计算机领域相关的毕业设计课题、课程作业等使用,尤其对于人工智能、计算机科学与技术等相关专业,更为适合; 4、下载使用后,可先查看README.md文件(如有),本项目仅用作交流学习参考,请切勿用于商业用途。
内容概要:本文提供了一个完整的职工管理系统的C++源代码。通过面向对象的编程方法,实现了包括创建新职工、查询、增加、修改、删除、排序、统计以及存储和恢复职工数据在内的多个基本操作功能。该系统支持不同的用户角色(如管理员与老板),并通过菜单驱动方式让用户方便地进行相关操作。此外,还包括了错误检测机制,确保操作过程中的异常得到及时处理。 适合人群:有一定C++语言基础,特别是面向对象编程经验的程序员;企业管理人员和技术开发人员。 使用场景及目标:适用于中小型企业内部的人力资源管理部门或IT部门,用于维护员工基本信息数据库,提高工作效率。通过本项目的学习可以加深对链表、类和对象的理解。 阅读建议:建议先熟悉C++的基本语法和面向对象概念,再深入学习代码的具体实现细节。对于关键函数,比如exchange、creatilist等,应当重点关注并动手实践以加强理解。
Jupyter-Notebook
考研公共课历年真题集-最新发布.zip
Huawei-HKUST Joint Workshop on Theory for Future Wireless 15-16 September 2022 华为-香港科技大学未来无线理论联合研讨会 Speaker:Jingwen Tong
演出人员与观众疫情信息管理系统 SSM毕业设计 附带论文 启动教程:https://www.bilibili.com/video/BV1GK1iYyE2B
《林黛玉进贾府》课本剧剧本.pdf