In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Fastdfs+Nginx configuration operation
Single configuration
Download the installation package:
Wget https://github.com/happyfish200/libfastcommon/archive/V1.0.7.tar.gz
Wget http://jaist.dl.sourceforge.net/project/fastdfs/FastDFS%20Nginx%20Module%20Source%20Code/fastdfs-nginx-module_v1.16.tar.gz
Wget https://github.com/happyfish200/fastdfs/archive/V5.05.tar.gz
Wget http://nginx.org/download/nginx-1.8.0.tar.gz
(note: the latest dependency package for Nginx in centos7 can be downloaded and installed directly by yum: yum install zlib* pcre*-y)
1.libfastcommon installation
Mkdir-pv / usr/fastdfs
Tar-zxvf V1.0.7.tar.gz-C / usr/fastdfs/
Cd / usr/fastdfs/libfastcommon-1.0.7
. / make.sh
. / make.sh install
two。 Install Fastdfs
Tar-zxvf V5.05.tar.gz-C / usr/fastdfs/
Cd / usr/fastdfs/fastdfs-5.05
(note: there is no need to make a link under the unzipped files in this directory)
. / make.sh
. / make.sh install
3. Configure tracker and storage
Cp conf/* / etc/fdfs/
(note: FastDFS startup file defaults to / usr/bin/, configuration file under / etc/fdfs)
Mkdir-pv / data/fastdfs/tracker
Mkdir-pv / data/fastdfs/storage
(note: the above creation is a storage directory)
Cd / etc/fdfs
Vim tracker.conf
Temporarily modify one of the following
Base_path=/data/fastdfs/tracker
Vim storage.conf
Modify the content:
Base_path=/data/fastdfs/storage
Store_path0=/data/fastdfs/storage
Tracker_server= local IP address: 22122
Http.server_port=8888
4. Turn off the firewall and start tracker and storage
Systemctl stop firewalld.service
/ usr/bin/fdfs_tracker / etc/fdfs/tracker start
/ usr/bin/fdfs_storage / etc/fdfs/storage start
5. Verify that it is started
Ps-ef | grep fdfs
6. Install fastdfs-nginx-module
Tar-zxvf fastdfs-nginx-module_v1.16.tar.gz-C / usr/local/
Cd / usr/local/fastdfs-nginx-module/src
Vim config
Remove the local directory layer
CORE_INCS= "$CORE_INCS / usr/include/fastdfs / usr/include/fastcommon/"
Cp mod_fastdfs.conf / etc/fdfs
Vim / etc/fdfs/mod_fastdfs.conf
Modify the following
Connect_timeout=10
Tracker_server= local IP address: 22122
Url_have_group_name = true
Store_path0=/data/fastdfs/storage
7. Install Nginx
Cd
Tar-zxvf nginx-1.8.0.tar.gz
Cd nginx-1.8.0/
. / configure-prefix=/usr/local/nginx-add-module=/usr/local/fastdfs-nginx-module/src/
Make
Make install
Vim / usr/local/nginx/conf/nginx.conf
Add the following to the server
Location ~ / group1/M00 {
Root / data/fastdfs/storage/data
Ngx_fastdfs_module
}
Make a soft connection ln-s / data/fastdfs/storage/data/ / data/fastdfs/storage/data/M00
Listening port:
Listen 8888
(note: the port in nginx should be consistent with the configuration of the storage.conf file in the configuration FastDFS storage)
Finally, start Nginx upload verification.
Two servers can separate tracker and storage from nginx and storage, or both are installed into two groups of group
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.