手记

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

因图片不能显示详情请看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人推荐
随时随地看视频
慕课网APP