TFS-NGINX-TFS Module

Source: Internet
Author: User

1. Installing YAJL

YAJL is an open-source JSON library

Please download here: http://lloyd.github.io/yajl/(official website)

: http://download.csdn.net/detail/wei_xiaox126/8304485

Unzip the file

Unzip Yajl-master.zip

./configure

Make && make install

Tip No CMake installed, apt-get install CMake

Hints for some test errors that can be ignored directly


2. Installing Nginx/tengine

1) Install 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) Install Nginx

Download nginx-1.3.0 The following version of the website. (website link can direct Baidu), the following link I download, has been tested available

Local Area Connection: http://download.csdn.net/detail/wei_xiaox126/8304537

3)

Download Nginx-tfs module: Https://github.com/alibaba/nginx-tfs (website link)

Local Links: 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) Configure Nginx

Specific configuration details see here: Https://github.com/alibaba/nginx-tfs/blob/master/ReadMe.markdown

Vim/usr/local/tengine/conf/nginx.conf

Add the following: (configuration file must be right)

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. Start Nginx

e) API Interface test

Upload a file with Tfs-tools and get the file name

Open Browser Browse:

xxx.xxx.xxx.xxx:80/v1/tfs/' filename '

Success!


Note: You are welcome to make suggestions, spending errors

Welcome reprint, Note The source, thank you!


TFS-NGINX-TFS Module

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.