为了账号安全,请及时绑定邮箱和手机立即绑定

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

标签:
Linux 云计算

因图片不能显示详情请看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

<br />All servers:<br />

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。

点击查看更多内容
1人点赞

若觉得本文不错,就分享一下吧!

评论

作者其他优质文章

正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦
今天注册有机会得

100积分直接送

付费专栏免费学

大额优惠券免费领

立即参与 放弃机会
意见反馈 帮助中心 APP下载
官方微信

举报

0/150
提交
取消