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

Website front-end performance optimization: JavaScript and CSS

I have read an article written by the Yahoo team ...

Gitlab practical tutorial uses git config for related configuration operations

This article introduces the content related to gi...

jQuery manipulates cookies

Copy code The code is as follows: jQuery.cookie =...

Example of adding multi-language function to Vue background management

Table of contents 1. First, configure the main.js...

How to configure NAS on Windows Server 2019

Preface This tutorial installs the latest version...

Ubuntu installation cuda10.1 driver implementation steps

1. Download cuda10.1: NVIDIA official website lin...

CSS3 flip card number sample code

I received a task from the company today, and the...

CSS implementation code for drawing triangles (border method)

1. Implement a simple triangle Using the border i...

Some slightly more complex usage example codes in mysql

Preface I believe that the syntax of MySQL is not...

Steps to deploy Docker project in IDEA

Now most projects have begun to be deployed on Do...

MySQL multi-table join introductory tutorial

Connections can be used to query, update, and est...

JavaScript function encapsulates random color verification code (complete code)

An n-digit verification code consisting of number...