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

What are the image file formats and how to choose

1. Which three formats? They are: gif, jpg, and pn...

A quick review of CSS3 pseudo-class selectors

Preface If CSS is the basic skill of front-end de...

CSS delivery address parallelogram line style example code

The code looks like this: // Line style of the pa...

Deleting two images with the same id in docker

When I created a Docker container today, I accide...

React implements the expansion and collapse function of complex search forms

Give time time and let the past go. In the previo...

About input file control and beautification

When uploading on some websites, after clicking t...

jQuery plugin to implement minesweeper game (2)

This article shares the second article of using j...

Advantages and disadvantages of Table layout and why it is not recommended

Disadvantages of Tables 1. Table takes up more byt...

8 tips for Vue that you will learn after reading it

1. Always use :key in v-for Using the key attribu...

Configure Java development environment in Ubuntu 20.04 LTS

Download the Java Development Kit jdk The downloa...

Implementation of navigation bar and drop-down menu in CSS

1. CSS Navigation Bar (1) Function of the navigat...

Several ways to solve the 1px border problem on mobile devices (5 methods)

This article introduces 5 ways to solve the 1px b...

How to use the Fuser command in Linux system

What is Fuser Command? The fuser command is a ver...