FastDFS and Nginx integration to achieve code analysis

FastDFS and Nginx integration to achieve code analysis

FastDFS & Nginx Integration:

The tracker is combined with Nginx for load balancing and high availability. Only one Track can be configured without Nginx.

Install FastDFS-Nginx-Module on the server:

tar -zxvf fastdfs-nginx-module-1.20.tar.gz

Enter the directory and enter the SRC directory of the directory:

cd fastdfs-nginx-module-1.20/src

Modify the config file and replace all /usr/local with /usr/

vim config

It is recommended to add fdfs to indicate that this is fastdfs

/usr/include/fdfs /usr/include/fdfscommon

Copy the configuration file to the previous directory

cp mod_fastdfs.conf /etc/fdfs/

Edit the configuration file again:

Change to the directory where you originally unpacked the archive and enter the conf directory:

cd /root/FASTFDS/fastdfs-5.11/conf

Copy the protocol configuration and file type configuration to the /etc/fdfs directory

cp -r http.conf /etc/fdfs/ cp -r mime.types /etc/fdfs/

Install Nginx:

Unzip the Nginx Tar package

tar -zxvf nginx-1.15.2.tar.gz

Enter the directory:

cd nginx-1.15.2

Run the configure script with the load parameters:

./configure --prefix=/opt/nginx \--sbin-path=/usr/bin/nginx \--add-module=/root/FASTFDS/fastdfs-nginx-module-1.20/src

Compile and install:

make

make install

Error occurred:

/usr/include/fastdfs/fdfs_define.h:15:27: fatal error: common_define.h: No such file or directory
 #include "common_define.h"
              ^
compilation terminated.
make[1]: *** [objs/addon/src/ngx_http_fastdfs_module.o] Error 1
make[1]: Leaving directory `/root/FASTFDS/nginx-1.15.2'
make: *** [build] Error 2

The previous configuration file was not configured properly, so we need to reconfigure it here:

vim /root/FASTFDS/fastdfs-nginx-module-1.20/src/config

The same path in both places, change it to this:

/usr/include/fastdfs /usr/include/fastcommon

But note that Nginx has failed to compile, delete and reconfigure the installation and compilation

Change to the Nginx configuration directory:

cd /opt/nginx/conf

Modify Nginx configuration:

vim nginx.conf

The following physical address locations are changed:

location ~/group([0-9]) {
ngx_fastdfs_module;
}

Remove the previous comment

Switch to this directory and execute Nginx

cd /usr/bin
./nginx

Although the configured domain name seems useless, IP address access is indeed effective:

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Centos7 configuration fastdfs and nginx distributed file storage system implementation process analysis
  • Nginx+FastDFS to build an image server
  • Example of using Nginx reverse proxy to go-fastdfs
  • SpringBoot integrates FastDFS+Nginx to integrate Token-based anti-hotlinking method
  • How to install and configure FastDFS and integrate it with Nginx-1.13.3
  • Fastdfs and nginx compression image ratio
  • nginx FastDFS distributed storage module testing method

<<:  A brief analysis of MySQL backup and recovery

>>:  How to find and delete duplicate records in MySQL

Recommend

Solve the problem of garbled Chinese characters in Mysql5.7

When using MySQL 5.7, you will find that garbled ...

Getting Started: A brief introduction to HTML's basic tags and attributes

HTML is made up of tags and attributes, which are...

Using radial gradient in CSS to achieve card effect

A few days ago, a colleague received a points mal...

How to build a standardized vmware image for kubernetes under rancher

When learning kubernetes, we need to practice in ...

CSS3+HTML5+JS realizes the shrinking and expanding animation effect of a block

When I was working on a project recently, I found...

WeChat Mini Programs are shared globally via uni-app

In actual use, it is often necessary to share the...

Discussion on the numerical limit of the ol element in the html document

Generally speaking, it is unlikely that you will ...

Vue uses Baidu Maps to realize city positioning

This article shares the specific code of Vue usin...

JavaScript uses canvas to draw coordinates and lines

This article shares the specific code of using ca...

Native JavaScript message board

This article shares the specific code of JavaScri...

Four ways to switch tab pages in VUE

Table of contents 1. Static implementation method...

Commonly used English fonts for web page creation

Arial Arial is a sans-serif TrueType font distribu...

Docker realizes the connection with the same IP network segment

Recently, I solved the problem of Docker and the ...

Detailed explanation of js's event loop event queue in the browser

Table of contents Preface Understanding a stack a...