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

MySQL installation and configuration methods and precautions under Windows platform

2.1、msi installation package 2.1.1、Installation I...

The unreasonable MaxIdleConns of MySQL will cause short connections

1 Background Recently, some performance issues ha...

A brief discussion on MySQL user permission table

MySQL will automatically create a database named ...

Vue uses v-model to encapsulate the entire process of el-pagination components

Use v-model to bind the paging information object...

JavaScript removes unnecessary properties of an object

Table of contents Example Method 1: delete Method...

How to introduce Excel table plug-in into Vue

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

The marquee tag in HTML achieves seamless scrolling marquee effect

The <marquee> tag is a tag that appears in ...

Eclipse configures Tomcat and Tomcat has invalid port solution

Table of contents 1. Eclipse configures Tomcat 2....

Multiple ways to calculate age by birthday in MySQL

I didn't use MySQL very often before, and I w...

Example of implementing load balancing with Nginx+SpringBoot

Introduction to Load Balancing Before introducing...

Implementing carousel with native JavaScript

This article shares the specific code for impleme...

Solution to MySQL service 1067 error: modify the mysql executable file path

Today I encountered the MySQL service 1067 error ...

Vue realizes the product magnifying glass effect

This article example shares the specific code of ...