【错误记录】使用./make.sh && ./make.sh install命令安装FastDFS时出错

问题:

使用./make.sh && ./make.sh install命令安装FastDFS时出错:

/usr/include/fastcommon/ioevent.h:82:2: 错误:#error port me
 #error port me

原因:

FastDFS版本和libfastcommon-master版本不兼容

解决方法:

如果libfastcommon-master.zip是100kb左右的,用FastDFS5.0.5,如果是212kb的压缩包,使用FastDFS5.0.8的

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,针对您的问题:fastdfs nginx安装与配置,我可以给出以下步骤: 1. 安装FastDFS ``` # 下载FastDFS wget https://github.com/happyfish100/libfastcommon/archive/V1.0.43.tar.gz wget https://github.com/happyfish100/fastdfs/archive/V6.06.tar.gz # 解压 tar -zxvf V1.0.43.tar.gz tar -zxvf V6.06.tar.gz # 编译安装libfastcommon cd libfastcommon-1.0.43/ ./make.sh && ./make.sh install # 编译安装FastDFS cd ../fastdfs-6.06/ ./make.sh && ./make.sh install # 配置tracker和storage cp /etc/fdfs/tracker.conf.sample /etc/fdfs/tracker.conf cp /etc/fdfs/storage.conf.sample /etc/fdfs/storage.conf ``` 2. 配置FastDFS 修改`/etc/fdfs/tracker.conf`和`/etc/fdfs/storage.conf`文件中的以下内容: ``` # tracker.conf ... port=22122 # Tracker服务器的端口号 ... # storage.conf ... port=23000 # Storage服务器的端口号 base_path=/data/fastdfs/storage # 文件存储路径 store_path0=/data/fastdfs/storage/data # 数据存储路径 tracker_server=192.168.1.1:22122 # Tracker服务器的IP和端口号 http.server_port=8888 # 文件访问的HTTP端口号 ... ``` 3. 启动FastDFS ``` # 启动Tracker服务器 /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf # 启动Storage服务器 /usr/bin/fdfs_storaged /etc/fdfs/storage.conf ``` 4. 安装Nginx和FastDFS模块 ``` # 安装Nginx yum install -y nginx # 安装FastDFS模块 git clone https://github.com/happyfish100/fastdfs-nginx-module.git mv fastdfs-nginx-module/src/mod_fastdfs.conf /etc/fdfs/ mv fastdfs-nginx-module/src/mod_fastdfs.conf /etc/fdfs/ # 编译安装Nginx(需要指定FastDFS模块) ./configure --add-module=/path/to/fastdfs-nginx-module/src make && make install ``` 5. 配置Nginx 修改`/usr/local/nginx/conf/nginx.conf`文件: ``` http { ... server { listen 80; server_name localhost; location /group1/M00 { ngx_fastdfs_module; } } } ``` 6. 启动Nginx ``` /usr/local/nginx/sbin/nginx ```

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值