博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
在ubuntu上搭建文件服务器
阅读量:4227 次
发布时间:2019-05-26

本文共 1559 字,大约阅读时间需要 5 分钟。

首先需要在ubuntu上下载好文件资源,一共是三个资源,在下载资源之前建议将git和nginx安装好,在本教程中将会用到。

(ngnix:http://nginx.org/download/nginx-1.12.2.tar.gz,利用winscp上传压缩文件,然后利用tar口令解压nginx:tar -zxvf /home/ubuntu/source/nginx-1.12.2.tar.gz)

libfastcommon

https://github.com/happyfish100/libfastcommon/tree/V1.0.36

640?wx_fmt=png

fastdfs

https://github.com/happyfish100/fastdfs/tree/V5.11

640?wx_fmt=png

fastdfs-nginx-module

https://github.com/happyfish100/fastdfs-nginx-module

640?wx_fmt=png

下载完毕我们就开始搭建了。

编译安装 libfastcommon

> ./make.sh   

> ./make.sh install   

> ln -s /usr/lib64/libfastcommon.so /usr/local/lib/libfastcommon.so 

编译安装 fastdfs

> ./make.sh 

> ./make.sh install 

配置tracker.conf

> cp /etc/fdfs/tracker.conf.sample /etc/fdfs/tracker.conf

> vi /etc/fdfs/tracker.conf 

修改内容:

base_path=/home/fastdfs

配置storage.conf

> cp /etc/fdfs/storage.conf.sample /etc/fdfs/storage.conf

> vi /etc/fdfs/storage.conf

修改内容:

> base_path=/home/fastdfs  

> tracker_server=10.0.2.15:22122

> store_path0=/home/fastdfs  

配置 http.conf mime.types

> cp fastdfs-5.11/conf/http.conf /etc/fdfs/   

> cp fastdfs-5.11/conf/mime.types /etc/fdfs/

配置client.conf

> cp /etc/fdfs/client.conf.sample /etc/fdfs/client.conf   

> vi /etc/fdfs/client.conf

修改内容:

> base_path=/home/fastdfs

>  tracker_server=10.0.2.15:22122

>  include http.conf   #打开该行代码  默认是注释掉的

启动tracker

> /etc/init.d/fdfs_trackerd start 

 其他命令:

/etc/init.d/fdfs_trackerd stop #停止

/etc/init.d/fdfs_trackerd restart #重启

启动storage

> /etc/init.d/fdfs_storaged start   

其他命令 :

/etc/init.d/fdfs_storaged stop #停止

/etc/init.d/fdfs_storaged restart #重启

测试fastdfs安装情况

fdfs_test /etc/fdfs/client.conf upload /home/0.gif

640?wx_fmt=png

如图,生成了上传图片的地址。

640?wx_fmt=gif

Pls Follow IT!

转载地址:http://bmnqi.baihongyu.com/

你可能感兴趣的文章
Using Microsoft Office 2007, Special Edition
查看>>
Telecommunications and Data Communications Handbook
查看>>
Networking with Microsoft Windows Vista: Your Guide to Easy and Secure Windows Vista Networking
查看>>
Web Application Vulnerabilities: Detect, Exploit, Prevent
查看>>
Silverlight 1.0 Unleashed
查看>>
Wireless Internet and Mobile Computing: Interoperability and Performance
查看>>
Wireless Mesh Networks: Architectures and Protocols
查看>>
Cross-Platform Development in C++: Building Mac OS X, Linux, and Windows Applications
查看>>
ZK: Ajax without the Javascript Framework
查看>>
Ruby Pocket Reference
查看>>
Cryptology Unlocked
查看>>
The ASP.NET 2.0 Anthology: 101 Essential Tips, Tricks & Hacks [ILLUSTRATED]
查看>>
Fedora Core 7 & Red Hat Enterprise Linux: The Complete Reference
查看>>
Windows Vista On Demand
查看>>
Wireless Networking
查看>>
Mike Meyers' A+ Guide: PC Technician
查看>>
Handbook of Network and System Administration
查看>>
Using OpenMP: Portable Shared Memory Parallel Programming
查看>>
Embedded Software: The Works
查看>>
Microsoft Office Access 2007 On Demand
查看>>