Install Nginx and FastDFS integration in the Linux Nginx FastDFS Module

Source: Internet
Author: User

Install Nginx and FastDFS integration in the Linux Nginx FastDFS Module

Nginx is a high-performance HTTP and reverse proxy server and an IMAP/POP3/SMTP proxy server. Nginx was developed by the Rambler.ru site with the highest access volume in Russia as Igor Sysoev. It has been running on this site for more than two and a half years.

1. Download The Nginx FastDFS Module

Http://fastdfs.googlecode.com/files/fastdfs-nginx-module_v1.15.tar.gz

I downloaded the file to the/software/FastDFS/directory.

Nginx Installation Reference:

Note: In Step 4, modify the compilation parameters:
./Configure-prefix =/usr/local/nginx_fastdfs-with-pcre =/software/nginx/pcre-8.32-add-module =/software/FastDFS/fastdfs-nginx-module/src

Make
Make install

Compile the file
Vim/etc/fdfs/mod_fastdfs.conf

# The base path to store log files
Base_path =/data1/fastdfs ==> directory for storing logs

# "Host: port", host can be hostname or ip address
Tracker_server = 192.168.3.220: 22122 ===> ip address and port of the tracker server. Multiple tracker servers can be written here, with one

# The group name of storage server
Group_name = group1 ==> the name of the server group to which the storage server belongs can be left blank

# Default value is false
Url_have_group_name = false #====> the URL contains the group name group1/M00/xxx

# Store_path #, based 0, if store_path0 not exists, it's value is base_path
# The paths must be exist
Store_path0 =/data1/fastdfs #==> directory where files are stored

Store_path_count = 3
Store_path0 =/data1/fastdfs/store0
Store_path1 =/data1/fastdfs/store1
Store_path2 =/data1/fastdfs/store2

Modify the module configuration file
Vi/usr/local/nginx_fastdfs/conf/nginx. conf
Location/M00 {
Root/data1/fastdfs/store0/data;
Ngx_fastdfs_module;
}

Location/M01 {
Root/data1/fastdfs/store1/data;
Ngx_fastdfs_module;
}
Location/M02 {
Root/data1/fastdfs/store2/data;
Ngx_fastdfs_module;
}

Start nginx/usr/local/nginx_fastdfs/sbin/nginx
Upload File Access http: // nginxip/M02/00/00/Cs8b8k-Ood2Id2KjAAAJ-dvLKCkAAAAAgAAChEAAAoR0374408 with a browser if installation is successful correctly.

For more Nginx tutorials, see the following:

Deployment of Nginx + MySQL + PHP in CentOS 6.2

Build a WEB server using Nginx

Build a Web server based on Linux6.3 + Nginx1.2 + PHP5 + MySQL5.5

Performance Tuning for Nginx in CentOS 6.3

Configure Nginx to load the ngx_pagespeed module in CentOS 6.3

Install and configure Nginx + Pcre + php-fpm in CentOS 6.4

Nginx installation and configuration instructions

Nginx log filtering using ngx_log_if does not record specific logs

Nginx details: click here
Nginx: click here

This article permanently updates the link address:

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.