CentOS6环境单服务器FastDFS+Nginx+fastdfs-nginx-module安装配置

CentOS6条件单服务器法斯特DFS+Nginx+fastdfs-nginx-module安装配置

因集团里面包车型大巴测验fastdfs服务器有变动,所以得重新搭建,以前不曾搭建过,在英特网找了成都百货上千安插文书档案,但难点多,所以折腾了两日

安装fastdfs 和nginx 需求的插件

yum install gettext gettext-devel libXft libXft-devel libXpm libXpm-devel automake autoconf libXtst-devel gtk+-devel gcc gcc-c++zlib-devel libpng-devel gtk2-devel glib-devel pcre*

1.系统遭遇 注重库自行设置

Centosip 地址 192.168.1.11
tracker1: 192.168.1.11 storage1: 192.168.1.11
2.编写翻译安装配备 FastDFS_v4.06.tar.gz
.编写翻译安装 (1) vi make.sh WITH_LINUX_SERVICE=1
(2) ./make.sh ./make.sh install
tracker 配置 (1) vi /etc/fdfs/tracker.conf
base_path=/home/tracker1/fastdfs
( 2) mkdir -p /home/tracker1/fastdfs
( 3) service fdfs_trackerd start
( 4) netstat -ntl tcp 0 0 0.0.0.0:22122
storage 配置( 1) vi /etc/fdfs/storage.conf
http.server_port=80
group_name=group1
base_path=/home/storage1/fastdfs
store_path0=/home/storage1/fastdfs t
racker_server=192.168.1.11:22122
(2) mkdir -p /home/storage1/fastdfs
(3) service fdfs_storaged start
(4) netstat -ntl tcp 0 0 0.0.0.0:23000

0.0.0.0:*

LISTEN

0.0.0.0:*

LISTEN

3.设置配置 nginx-1.4.4 和 fastdfs-nginx-module_v1.15.tar.gz
(1) /configure –prefix=/usr/local/nginx
–add-module=/home/fastdfs-nginx-module/src
make make install
(2) cp /home/fastdfs-nginx-module/src/mod_fastdfs.conf /etc/fdfs/
vi /etc/fdfs/mod_fastdfs.conf
base_path=/home/storage1/fastdfs
tracker_server=192.168.1.11:22122
group_name=group1
url_have_group_name = true
store_path0=/home/storage1/fastdfs
(3) mkdir -p /home/storage1/fastdfs
(4) vi /usr/local/nginx/conf/nginx.conf
user root;
location /group1/M00 { root /home/storage1/fastdfs/data;

ngx_fastdfs_module;

}
(5) ln -s /home/storage1/fastdfs/data
/home/storage1/fastdfs/data/M00
(6) service iptables stop
cd /usr/local/nginx/sbin/
./nginx
4.测试 (1) vi /etc/fdfs/client.conf
base_path=/tmp
tracker_server=192.168.1.11:22122
http.tracker_server_port=80
(2) /usr/local/bin/fdfs_test /etc/fdfs/client.conf upload test.txt
(3卡塔尔 用浏览器张开重回的连年,重临内容跟 test.txt 生机勃勃致,表明成功

因公司内部的测量检验fastdfs服务器有退换,所以得重新搭建,从前还没搭建过,在网络找…

发表评论

电子邮件地址不会被公开。 必填项已用*标注

相关文章