ITPub博客

首页 > IT职业 > IT图书 > fastdfs----------初探

fastdfs----------初探

IT图书 作者:corespeed 时间:2021-09-09 08:57:01 0 删除 编辑

因图片不能显示详情请看github本人原创

FastDFS Installation manual

图片描述

Tracker (10.1.130.153) Nginx Load balancing + cache

图片描述图片描述

Group1 Storage x 2#######group2 Storage x 2
10.1.130.152 10.1.130.154#### 10.1.130.123 10.1.130.124
1.Install the compiler tools and libfastcommon


All servers:

yum -y groupinstall 'Development Tools' && yum -y install wget
wget https://github.com/happyfish100/libfastcommon/archive/master.zip
unzip master.zip
cd libfastcommon-master
./make.sh
./make.sh install

2.Install FastDFS

All servers:

wget https://github.com/happyfish100/fastdfs/archive/V5.05.tar.gz
tar -zxvf V5.05.tar.gz
cd fastdfs-5.05/
./make.sh
./make.sh install

Tracker:

mv /etc/fdfs/tracker.conf.sample /etc/fdfs/tracker.conf
Vi /etc/fdfs/tracker.conf
图片描述

iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 22122 -j ACCEPT
fdfs_trackerd /etc/fdfs/tracker.conf start

Storage:

mv /etc/fdfs/storage.conf.sample /etc/fdfs/storage.conf
Vi /etc/fdfs/storage.conf
图片描述
图片描述
图片描述

图片描述or
图片描述
iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 23000 -j ACCEPT
fdfs_storaged /etc/fdfs/storage.conf

3.Storage install nginx

iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 22122 -j ACCEPT
wget https://github.com/happyfish100/fastdfs-nginx-module/archive/master.zip
wget http://openresty.org/download/ngx_openresty-1.7.10.1.tar.gz
tar -zxvf ngx_openresty-1.7.10.1.tar.gz
unzip master.zip
yum -y install pcre-devel openssl openssl-devel
cd ngx_openresty-1.7.10.1/
./configure --with-luajit --with-http_stub_status_module --with-http_ssl_module --with-http_realip_module --add-module=/root/fastdfs/nginx/fastdfs-nginx-module-master/src/ && gmake && gmake install
cp ../fastdfs-nginx-module-master/src/mod_fastdfs.conf /etc/fdfs/
vi /etc/fdfs/mod_fastdfs.conf
图片描述
图片描述or
图片描述
图片描述
图片描述
图片描述
vi /usr/local/openresty/nginx/conf/nginx.conf
图片描述
/usr/local/openresty/nginx/sbin/nginx start

4.Tracker install nginx:

cd ngx_openresty-1.7.10.1
./configure --prefix=/usr/local/nginx --add-module=/root/nginx/ngx_cache_purge-2.3 --with-pcre=/root/nginx/pcre-7.8/ --with-zlib=/root/nginx/zlib-1.2.5
gmake && gmake install
vi /usr/local/nginx/nginx/conf/nginx.conf
图片描述
图片描述
/usr/local/nginx/nginx/sbin/nginx start

5.Test:

vi /etc/fdfs/client.conf
图片描述
图片描述
图片描述
echo 1234 > test.html
fdfs_test /etc/fdfs/client.conf upload test.html

And then give you a link to directly access the can。

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4440/viewspace-2807392/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-09-09

  • 博文量
    90
  • 访问量
    1012