Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

CentOS 6.6.How to install single-node FastDFS

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "CentOS 6.6 how to install single-node FastDFS", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "CentOS 6.6 how to install single-node FastDFS" this article.

Download the following two compressed packages and put them in the / usr/local/ directory

FastDFS_v5.08.tar.gz

Libfastcommon-master.zip (a common C function library extracted from FastDFS and FastDHT)

Source code download address: https://github.com/happyfish200/

If there is no GCC compiler, install GCC first

# yum install make cmake gcc gcc-c++

Decompress libfastcommon-master and compile and install

# cd / usr/local

# unzip libfastcommon-master.zip

# cd libfastcommon-master

#. / make.sh

#. / make.sh install

Here libfastcommon is installed by default to the

/ usr/lib64/libfastcommon.so

/ usr/lib/libfastcommon.so

Decompress FastDFS_v5.08 and compile and install

# cd / usr/local

# tar-zxvf FastDFS_v5.08.tar.gz

# cd FastDFS

#. / make.sh

#. / make.sh install

The corresponding files and directories after installation:

1. Service script

/ etc/init.d/fdfs_storaged

/ etc/init.d/fdfs_tracker

2. Sample configuration file

/ etc/fdfs/client.conf.sample

/ etc/fdfs/storage.conf.sample

/ etc/fdfs/tracker.conf.sample

3. The command tool is in the / usr/bin/ directory:

Fdfs_appender_test

Fdfs_appender_test1

Fdfs_append_file

Fdfs_crc32

Fdfs_delete_file

Fdfs_download_file

Fdfs_file_info

Fdfs_monitor

Fdfs_storaged

Fdfs_test

Fdfs_test1

Fdfs_trackerd

Fdfs_upload_appender

Fdfs_upload_file

Stop.sh

Restart.sh

Copy 3 configuration files

# cd / etc/fdfs

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

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

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

6. Configure tracker

1. Create a basic data directory

# mkdir-p / data/fastdfs

2. Edit the configuration file

# vi / etc/fdfs/tracker.conf

Disabled=false

Port=22122

Base_path=/data/fastdfs

Other parameters remain in the default configuration. For more information on configuration, please see the official documentation:

Http://bbs.chinaunix.net/thread-1941456-1-1.html

3. Start Tracker:

# / etc/init.d/fdfs_trackerd start

(when starting successfully for the first time, two directories, data and logs, will be created under the / home/zheng/fastdfs/ directory)

Check to see if FastDFS Tracker has started successfully:

# ps-ef | grep fdfs

4. To close Tracker, the command is:

# / etc/init.d/fdfs_trackerd stop

5. Set the FastDFS tracker to boot:

# vi / etc/rc.d/rc.local

Add the following at the end of the file:

# # FastDFS Tracker

/ etc/init.d/fdfs_trackerd start

7. Configure storage

1. Edit the configuration file

# vi / etc/fdfs/storage.conf

Disabled=false

Port=23000

Base_path=/data/fastdfs

Store_path0=/data/fastdfs

Tracker_server= {Host IP}: 22122

Http.server_port=8888

Other parameters remain in the default configuration. For more information on configuration, please see the official documentation:

Http://bbs.chinaunix.net/thread-1941456-1-1.html

2. Start Storage

# / etc/init.d/fdfs_storaged start

(when starting successfully for the first time, two directories, data and logs, will be created under the / fastdfs/storage directory)

Check to see if FastDFS Storage has been started successfully

# ps-ef | grep fdfs

3. To close Storage, the command is:

# / etc/init.d/fdfs_storaged stop

4. Set the FastDFS memory to boot:

# vi / etc/rc.d/rc.local

Add the following at the end of the file:

# # FastDFS Storage

/ etc/init.d/fdfs_storaged start

Modify the client configuration file in the Tracker server

# vi / etc/fdfs/client.conf

Base_path=/data/fastdfs

Tracker_server= {Host IP}: 22122

9. Test uploading files

# cd / root/ Desktop

# touch mytext.txt

# / usr/bin/fdfs_upload_file / etc/fdfs/client.conf / root/ Desktop / mytext.txt

Group1/M00/00/00/wKh6b1kHEyqAKoYNAAAAAAAAAAA491.txt

Where group1/M00/00/00/wKh6b1kHEyqAKoYNAAAAAAAAAAA491.txt is the returned ID number, indicating

File uploaded successfully.

These are all the contents of the article "how to install single-node FastDFS in CentOS 6.6.6". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report