TFS - nginx-tfs模块
来源:互联网 发布:linux tail f 编辑:程序博客网 时间:2024/06/12 01:32
1.安装yajl
yajl是一个开源的JSON库
请到这里下载: http://lloyd.github.io/yajl/(官网)
下载地址:http://download.csdn.net/detail/wei_xiaox126/8304485
解压文件
unzip yajl-master.zip
./configure
make && make install
提示没有安装cmake, apt-get install cmake
提示有一些test的错误,可以直接忽略
2.安装nginx/tengine
1)安装pcre
下载地址:http://download.csdn.net/detail/wei_xiaox126/8304511
tar xvf pcre-8.35.tar.gz
cd pcre-8.35
./configure --prefix=/usr/local/pcre
make
make install
2)安装nginx
官网下载nginx-1.3.0以下的版本。(官网链接可直接百度),以下链接本人下载,已测试可用
本地连接:http://download.csdn.net/detail/wei_xiaox126/8304537
3)
下载nginx-tfs模块:https://github.com/alibaba/nginx-tfs (官网链接)
本地链接:http://download.csdn.net/detail/wei_xiaox126/8304561
unzip nginx-tfs-master.zip
tar xvf nginx-1.2.9.tar.gz
cd nginx-1.2.9
./configure --prefix=/usr/local/nginx --add-module=/'you tfs path'/
make
make install
c)配置nginx
具体配置细节参看这里:https://github.com/alibaba/nginx-tfs/blob/master/ReadMe.markdown
vim /usr/local/tengine/conf/nginx.conf
添加以下内容:(配置文件一定要对)
http {
tfs_upstream tfs_ns {
server 10.0.0.62:8108;
type ns;
#rcs_zone name=tfs1 size=128M;
#rcs_interface eth0;
#rcs_heartbeat lock_file=/logs/lk.file interval=10s;
}
tfs_body_buffer_size 2m;
tfs_send_timeout 3s;
tfs_connect_timeout 3s;
tfs_read_timeout 3s;
server {
listen 80;
server_name xxx.xxx.xxx.xxx;
client_max_body_size 4096m;
tfs_keepalive max_cached=50 bucket_count=10;
#tfs_log可以无
tfs_log "pipe:/usr/sbin/cronolog -p 30min /usr/local/tengine/logs/cronolog/%Y/%m/%Y-%m-%d-%H-%M-tfs_access.log";
location / {
tfs_pass tfs://tfs_ns;
}
}
3.启动nginx
e) API接口测试
用tfs-tools 上传一个文件,获得文件名
打开浏览器浏览:
xxx.xxx.xxx.xxx:80/v1/tfs/'filename'
成功!
注:欢迎大家提出建议,支出错误
欢迎转载,注明出处,谢谢!
- TFS - nginx-tfs模块
- 在CentOS7下安装TFS及Nginx-TFS(分布式文件系统TFS、Nginx-TFS模块、TFS RESTful API)
- TFS--淘宝文件系统Nginx模块安装篇
- TFS
- TFS
- TFS
- [自己写的]淘宝分布式存储系统-TFS的nginx模块与py接口
- 安装TFS
- TFS常用命令
- tfs 连不上
- TFS 2008
- 关于TFS
- TFS编译
- TFS Tips
- VS2010 TFS
- TFS配置
- TFS安装
- TFS安装
- 利用jspsmartupload和数据库进行图文信息的发布和管理
- java简介和开发环境搭建
- 学习Unity3D之登陆。
- java之成员变量和局部变量的区别
- 判别机器大小端,打印int的二进制
- TFS - nginx-tfs模块
- kickstart配置文件详解和system-config-kickstart
- 使用Eclipse远程调试及原理
- django cpu监控之九-----使用psutil获取CPU数据
- startActivityForResult 的用法
- 输出1000-2000之间的润年
- 数据库多表链接
- Exercise
- Linux 常用命令速查【长期更新】