1、下载

wget https://github.com/happyfish100/libfastcommon/archive/V1.0.42.tar.gz -SO libfastcommon.tar.gz
wget https://github.com/happyfish100/fastdfs/archive/V6.04.tar.gz -SO fastdfs.tar.gz
wget https://github.com/happyfish100/fastdfs-nginx-module/archive/V1.22.tar.gz -SO fastdfs-nginx-module.tar.gz

2、解压
tar -xf xxx.tar.gz

3、安装
安装好后,程序是在/usr/bin目录下:

$ which fdfs_trackerd
/usr/bin/fdfs_trackerd

配置    
sudo cp ~/data/fastdfs/fastdfs-6.04/conf/* /etc/fdfs

配置目录IP
https://segmentfault.com/a/1190000018251300?utm_source=tag-newest

测试

fdfs_test /etc/fdfs/client.conf upload /etc/fdfs/anti-steal.jpg

   
下载 openssl  openssl Nginx 编译需要设置--with-openssl 代码目录
wget https://www.openssl.org/source/openssl-1.0.2g.tar.gz
yum -y install zlib zlib-devel openssl openssl--devel pcre pcre-devel
 
/data/fastdfs/nginx

 
./configure \
--prefix=/data/fastdfs/nginx \
--sbin-path=/data/fastdfs/nginx/sbin/nginx \
--conf-path=/data/fastdfs/nginx/etc/nginx/nginx.conf \
--error-log-path=/data/fastdfs/nginx/logs/error.log \
--http-log-path=/data/fastdfs/nginx/logs/access.log \
--pid-path=/data/fastdfs/nginx/run/nginx.pid  \
--lock-path=/data/fastdfs/nginx/lock/nginx.lock \
--user=root \
--group=nginx \
--with-http_ssl_module \
--with-http_realip_module \
--with-http_stub_status_module \
--with-http_gzip_static_module \
--with-openssl=/data/fastdfs/openssl-1.0.2g \
--with-debug \
--http-client-body-temp-path=/data/fastdfs/nginx/client_body \
--http-proxy-temp-path=/data/fastdfs/nginx/proxy \
--http-fastcgi-temp-path=/data/fastdfs/nginx/fastcgi \
--http-uwsgi-temp-path=/data/fastdfs/nginx/uwsgi \
--http-scgi-temp-path=/data/fastdfs/nginx/scgi \
--with-stream \
--add-module=/data/fastdfs/fastdfs-nginx-module-1.22/src

安装
make install 

配置nginx,加入路由规则,映射到fastdfs的数据目录:

# config for fastdfs-nginx-module
server {
    listen 8777;
    location /M00 {
        root ~/fdfs/data;
        ngx_fastdfs_module;
    }
}

分布式部署文档参考
https://blog.csdn.net/wwxuelei/article/details/89211662

访问

M00/00/00/ChgGLF35252AW8hUAABdreSfEnY192_big.jpg
http://10.24.6.44:8777/M00/00/00/ChgGLF35252AW8hUAABdreSfEnY192_big.jpg

http://10.24.6.44:9270/group1/M00/00/00/ChgGLF35252AW8hUAABdreSfEnY192_big.jpg

http://10.24.6.44:8777/M00/00/00/ChgGLF355uGAVF8YAABdreSfEnY318_big.jpg


http://10.24.6.44:8777/group1/M00/00/00/ChgGLF355uGAVF8YAABdreSfEnY318.jpg
 

Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐