Building an image server with FastDFS under Linux

Building an image server with FastDFS under Linux

Server Planning

Server Name IP address and port Remark
fastdfs-tracker * :22122 Tracking Server/Scheduling Server
fastdfs-storage * :23000 Storage Server

1. Install system components

yum install gcc -y 

2. Install fastdfs

1. Create a storage directory for the image server

mkdir -p /data/image

2. Download the FastDFS dependency package libfastcommon and install it

wget https://codeload.github.com/happyfish100/libfastcommon/zip/master

Unzip

unzip master

Install

cd libfastcommon-master/ && ./make.sh && ./make.sh install

3. Download and install FastDFS

Click to download

Unzip:

tar xf FastDFS_v5.08.tar.gz

Install

cd FastDFS && ./make.sh && ./make.sh install

3. Configure the image server file

1. Configure the tracking server tracker

cp /etc/fdfs/tracker.conf.sample /etc/fdfs/tracker.conf

vim /etc/fdfs/tracker.conf Modify base_path to the service directory created above

2. Configure client.conf

cp /etc/fdfs/client.conf.sample /etc/fdfs/client.conf

vim /etc/fdfs/client.conf Modify base_path to the service directory created above and tracker_server service IP to the local machine

3. Test and start the tracker server

If the startup is successful, new data and logs directories will be created automatically in the /data/file/fastdfs/tracker directory

/etc/init.d/fdfs_trackerd start
/etc/init.d/fdfs_trackerd stop 

4. Configure storage server

cp /etc/fdfs/storage.conf.sample /etc/fdfs/storage.conf

vim /etc/fdfs/storage.conf Modify base_path to the service directory created above, tracker_server service IP to the local machine, base_path to the service directory created above

5. Start the tracker server

/etc/init.d/fdfs_storaged start
/etc/init.d/fdfs_storaged stop 

View Ports

6. File upload test

/usr/bin/fdfs_upload_file /etc/fdfs/client.conf /root/docker.jpg 

Summarize

This is the end of this article about building an image server with FastDFS under Linux. For more related Linux FastDFS content, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Implementation steps for building FastDFS file server in Linux

<<:  A brief discussion on two methods to solve space-evenly compatibility issues

>>:  Detailed explanation of the principles of Vue's responsive system

Recommend

Introduction to Spark and comparison with Hadoop

Table of contents 1. Spark vs. Hadoop 1.1 Disadva...

Analysis of the difference between emits and attrs in Vue3

Table of contents in conclusion Practice Analysis...

Encapsulate the navigation bar component with Vue

Preface: Fully encapsulating a functional module ...

XHTML introductory tutorial: Web page Head and DTD

Although head and DTD will not be displayed on th...

Sample code for implementing 3D rotation effect using pure CSS

Mainly use the preserve-3d and perspective proper...

How to deploy k8s in docker

K8s k8s is a cluster. There are multiple Namespac...

Detailed explanation of JavaScript object conversion to primitive value

Table of contents Object.prototype.valueOf() Obje...

MySQL 8.0.12 Installation and Configuration Tutorial

This article records the detailed tutorial for in...

canvas.toDataURL image/png error handling method recommendation

Problem background: There is a requirement to tak...