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

How to install and configure FastDFS in centos

2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Centos how to install and configure FastDFS, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.

1: install libevent (libevent-2.0.16-stable)

# # uninstall the system with libevent

Rpm-qa | grep libevent rpm-e libevent*

# # installing libevent for Trackerd and Storaged nodes

Cd / home/ylh

Wget http://unclelu-server.googlecode.com/files/libevent-2.0.16-stable.tar.gz

Tar-zxvf libevent-2.0.16-stable.tar.gz

Cd libevent-2.0.16-stable

Make clean

. / configure

Make & & make install

# # create a soft link for libevent to / lib library, and the 64-bit system corresponds to / lib64

Ln-s / usr/local/lib/libevent* / lib/

Ln-s / usr/local/lib/libevent* / lib64/

2: install FastDFS for the Trackerd node and modify the configuration file / etc/fdfs/tracker.conf (if Trackerd needs to use the built-in web server, you need to modify the make file and enable WITH_HTTPD=1 to recompile)

Cd / home/ylh

Wget http://fastdfs.googlecode.com/files/FastDFS_v3.06.tar.gz

Tar-zxvf FastDFS_v3.06.tar.gz

Cd FastDFS_v3.06

. / make.sh

. / make.sh install

# # creating a Storage Directory

Mkdir / home/ylh/fastdfs

# # modify configuration file. Save and exit after vim / etc/fdfs/tracker.conf modification

# # starting Trackerd

/ usr/local/bin/fdfs_trackerd / etc/fdfs/tracker.conf

3: install FastDFS for Storaged node. Libevent is also required for Storaged node. For installation steps, see step 1.

Cd / home/ylh

Wget http://fastdfs.googlecode.com/files/FastDFS_v3.06.tar.gz

Tar-zxvf FastDFS_v3.06.tar.gz

Cd FastDFS_v3.06

. / make.sh

. / make.sh install

4: install the web server for the Storaged node, and the Storaged node can provide http download service using nginx or apache. Here we choose nginx.

Cd / home/ylh

Wget http://nginx.org/download/nginx-0.8.55.tar.gz

Tar zxvf nginx-0.8.55.tar.gz

Cd nginx-0.8.55

. / configure-prefix=/opt/nginx-with-http_stub_status_module

Make & & make install

5: install fastdfs-nginx-module for the Storaged node

Cd / home/ylh

Wget http://fastdfs.googlecode.com/files/fastdfs-nginx-module_v1.10.tar.gz

Tar xzf fastdfs_nginx_module_v1.05.tar.gz

Cd / home/ylh/nginx-0.8.55. / configure-add-module=/home/ylh/fastdfs-nginx-module/src

Make; make install

6: modify the nginx configuration file and save the exit (vim / usr/local/nginx/conf/nginx.conf)

Location / M00 {

Root / home/ylh/fastdfs/data

Ngx_fastdfs_module

}

7: copy and modify the nginx module configuration file

Cp / home/ylh/fastdfs-nginx-module/src/mod_fastdfs.conf / etc/fdfs

Vim modification / etc/fdfs/mod_fastdfs.conf save exit

# # starting nginx

/ usr/local/nginx/sbin/nginx

8: modify the configuration file / etc/fdfs/storage.conf of the Storaged node and start Storaged

# # create a storage directory mkdir / home/ylh/fastdfs

# # modify configuration and save exit after vim / etc/fdfs/storage.conf modification

# # starting Storaged

/ usr/local/bin/fdfs_storaged / etc/fdfs/storage.conf

9: test

# # modify client configuration file / etc/conf/client.conf file and save exit

# # Test upload

/ usr/local/bin/ fs_test / etc/conf/client.conf upload / home/a.jpg

If the url of the file in the echo message is uploaded successfully, enter the url address in the browser, and the tracker server will be automatically redirected to the storage server where the file is stored. The file is downloaded successfully.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

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: 274

*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