分散式檔案系統之-FastDFS
FastDFS分佈檔案系統介紹:
1.FastDFS是一個開源的輕量級分散式檔案系統,它對檔案進行管理,功能包括:檔案儲存、檔案同步、檔案訪問(檔案上傳、檔案下載)等,解決了大容量儲存和負載均衡的問題。特別適合以檔案為載體的線上服務,如相簿網站、視訊網站等等,不適合做資料處理. 2.該分散式檔案系統組成: 跟蹤伺服器(tracker server)、儲存伺服器(storage server)和客戶端(client) 儲存伺服器:檔案儲存,檔案同步,提供檔案訪問介面,同時以key value的方式管理檔案的元資料。其中 檔案訪問採用了nginx,用於訪問檔案。 跟蹤伺服器:排程檔案以負載均衡的方式訪問,它起到了一個協調的作用,負責管理storage。所以上傳檔案的監聽埠是歸跟蹤伺服器管的,不直接和儲存伺服器掛鉤。 它們倆的關係好比是,儲存伺服器是搬運的員工,而跟蹤伺服器是協調搬運的主管. 3.簡單工作原理: 1. 客戶端向檔案系統傳送請求 2.檔案系統的tracker 查詢可用的storage,返回給客戶端可用的storge ip和埠號 3.客戶端上傳檔案(檔案內容和檔名) 4.檔案系統端儲存檔案,生成檔案id,返回給客戶端(檔名和檔案路徑) 5.客戶端做相應處理,結束.
客戶端上傳至檔案系統spring整合實現:
1.配置檔案準備:fdfs_client.conf,引數如下:
connect_timeout = 2
network_timeout = 30
charset = utf-8
http.tracker_http_port = 追蹤器訪問檔案埠號
http.anti_steal_token = 是否啟用tokem(預設no)
http.secret_key = (上傳檔案密碼,和伺服器端的http.conf檔案內設的密碼保持一致)
tracker_server=追蹤器ip:上傳檔案埠號
minPoolSize = (連線池最小數)
maxPoolSize = (連線池最大數)
waitTimes = 等待時間
2.web.xml新建bean
<!-- 初始化配置檔案伺服器配置 -->
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:/fdfs_client.conf</value>
</list >
</property>
</bean>
<bean name="fileFastDFSUtil" class="com.csx.util.aliFile.FastDFSUtil"
init-method="init">
<property name="minPoolSize" value="${minPoolSize}" />
<property name="maxPoolSize" value="${maxPoolSize}" />
<property name="waitTimes" value="${waitTimes}" />
</bean>
3.重要工具類,可直接複製用
1.FastDFSUtil工具類
import java.net.SocketTimeoutException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.csource.common.NameValuePair;
import org.csource.fastdfs.StorageClient1;
import org.csource.fastdfs.StorageServer;
import org.csource.fastdfs.TrackerServer;
import com.csx.util.ReadProperties;
public class FastDFSUtil {
private final Log log = LogFactory.getLog("FastDfsUtil.class");
/** 連線池 */
private FastDFSFastDFSConnectionPool connectionPool = null;
/** 連線池預設最小連線數 */
private long minPoolSize = 10;
/** 連線池預設最大連線數 */
private long maxPoolSize = 30;
/** 當前建立的連線數 */
private volatile long nowPoolSize = 0;
/** 預設等待時間(單位:秒) */
private long waitTimes = 20;
/**
* 初始化執行緒池
*
* @Description:
*
*/
public void init() {
log.info("[初始化執行緒池(Init)[預設引數:minPoolSize=" + minPoolSize + ",maxPoolSize=" + maxPoolSize + ",waitTimes="
+ waitTimes + "]");
connectionPool = new FastDFSFastDFSConnectionPool(minPoolSize, maxPoolSize, waitTimes);
}
/**
*
* @Description:
* @param groupName
* 組名如group0
* @param fileBytes
* 檔案位元組陣列
* @param extName
* 副檔名:如png
* @param linkUrl
* 訪問地址:http://image.xxx.com
* @return 圖片上傳成功後地址
* @throws FastException
*
*/
public String upload(FastDFSFile file, NameValuePair[] valuePairs) throws FastException {
/** 封裝檔案資訊引數 */
TrackerServer trackerServer = null;
try {
/** 獲取fastdfs伺服器連線 */
trackerServer = connectionPool.checkout();
StorageServer storageServer = null;
StorageClient1 client = new StorageClient1(trackerServer, storageServer);
String[] results = client.upload_file(file.getContent(), file.getExt(), valuePairs);
/** 上傳完畢及時釋放連線 */
connectionPool.checkin(trackerServer);
log.info("[上傳檔案(upload)-fastdfs伺服器相應結果][result:results=" + results + "]");
/** results[0]:組名,results[1]:遠端檔名 */
if (results != null && results.length == 2) {
return ReadProperties.getFile_ip() + "/" + results[0] + "/" + results[1];
} else {
/** 檔案系統上傳返回結果錯誤 */
throw FastDFSERROR.UPLOAD_RESULT_ERROR.ERROR();
}
} catch (FastException e) {
log.error("[上傳檔案(upload)][異常:" + e + "]");
throw e;
} catch (SocketTimeoutException e) {
log.error("[上傳檔案(upload)][異常:" + e + "]");
//將連線數減一
connectionPool.drop(trackerServer);
throw FastDFSERROR.WAIT_IDLECONNECTION_TIMEOUT.ERROR();
} catch (Exception e) {
log.error("[上傳檔案(upload)][異常:" + e + "]");
connectionPool.drop(trackerServer);
throw FastDFSERROR.SYS_ERROR.ERROR();
}
}
/**
*
* @Description: 刪除fastdfs伺服器中檔案
* @param group_name
* 組名
* @param remote_filename
* 遠端檔名稱
* @throws FastException
*
*/
public void deleteFile(String group_name, String remote_filename) throws FastException {
log.info("[ 刪除檔案(deleteFile)][parms:group_name=" + group_name + ",remote_filename=" + remote_filename + "]");
TrackerServer trackerServer = null;
try {
/** 獲取可用的tracker,並建立儲存server */
trackerServer = connectionPool.checkout();
StorageServer storageServer = null;
StorageClient1 client1 = new StorageClient1(trackerServer, storageServer);
/** 刪除檔案,並釋放 trackerServer */
int result = client1.delete_file(group_name, remote_filename);
/** 上傳完畢及時釋放連線 */
connectionPool.checkin(trackerServer);
log.info("[ 刪除檔案(deleteFile)--呼叫fastdfs客戶端返回結果][results:result=" + result + "]");
/** 0:檔案刪除成功,2:檔案不存在 ,其它:檔案刪除出錯 */
if (result == 2) {
throw FastDFSERROR.NOT_EXIST_FILE.ERROR();
} else if (result != 0) {
throw FastDFSERROR.DELETE_RESULT_ERROR.ERROR();
}
} catch (FastException e) {
log.error("[ 刪除檔案(deleteFile)][異常:" + e + "]");
throw e;
} catch (SocketTimeoutException e) {
log.error("[ 刪除檔案(deleteFile)][異常:" + e + "]");
throw FastDFSERROR.WAIT_IDLECONNECTION_TIMEOUT.ERROR();
} catch (Exception e) {
log.error("[ 刪除檔案(deleteFile)][異常:" + e + "]");
connectionPool.drop(trackerServer);
throw FastDFSERROR.SYS_ERROR.ERROR();
}
}
public FastDFSFastDFSConnectionPool getConnectionPool() {
return connectionPool;
}
public void setConnectionPool(FastDFSFastDFSConnectionPool connectionPool) {
this.connectionPool = connectionPool;
}
public long getMinPoolSize() {
return minPoolSize;
}
public void setMinPoolSize(long minPoolSize) {
this.minPoolSize = minPoolSize;
}
public long getMaxPoolSize() {
return maxPoolSize;
}
public void setMaxPoolSize(long maxPoolSize) {
this.maxPoolSize = maxPoolSize;
}
public long getNowPoolSize() {
return nowPoolSize;
}
public void setNowPoolSize(long nowPoolSize) {
this.nowPoolSize = nowPoolSize;
}
public long getWaitTimes() {
return waitTimes;
}
public void setWaitTimes(long waitTimes) {
this.waitTimes = waitTimes;
}
}
2.自定義異常類:
public class FastException extends Exception {
private static final long serialVersionUID = -1848618491499044704L;
private String code;
private String description;
public FastException(String code, String message) {
super(message);
this.code = code;
}
public FastException(String code, String message, String description) {
super(message);
this.code = code;
this.description = description;
}
/**
* 錯誤碼
*
* @return
*/
public String getCode() {
return code;
}
/**
* 使用者可讀描述資訊
*
* @return
*/
public String getDescription() {
return description;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getName());
sb.append(": [");
sb.append("] - ");
sb.append(code);
sb.append(" - ");
sb.append(getMessage());
if (getDescription() != null) {
sb.append(" - ");
sb.append(getDescription());
}
return sb.toString();
}
}
3.報錯資訊列舉類FastDFSERROR
public enum FastDFSERROR {
PARAMETER_IS_NULL("21001", "必填引數為空", "必填引數為空"),
FASTDFS_CONNECTION_FAIL("21002", "連線fastdfs伺服器失敗", "檔案上傳異常,請重試"),
WAIT_IDLECONNECTION_TIMEOUT("21003", "等待空閒連線超時", "連線超時,請重試"),
NOT_EXIST_GROUP("21004", "檔案組不存在", "檔案組不存在"),
UPLOAD_RESULT_ERROR("21005", "fastdfs檔案系統上傳返回結果錯誤", "檔案上傳異常,請重試"),
NOT_EXIST_PORTURL("21006", "未找到對應的埠和訪問地址", "檔案上傳異常,請重試"),
SYS_ERROR("21007", "系統錯誤", "系統錯誤"),
FILE_PATH_ERROR("21008", "檔案訪問地址格式不對", "檔案訪問地址格式不對"),
DELETE_RESULT_ERROR("21009", "fastdfs檔案系統刪除檔案返回結果錯誤", "檔案刪除異常,請重試"),
NOT_EXIST_FILE("21010", "檔案不存在", "檔案不存在");
/** 錯誤碼 */
String code;
/** 錯誤資訊,用於日誌輸出,便於問題定位 */
String message;
/** 錯誤提示,用於客戶端提示 */
String descreption;
FastDFSERROR(String code, String message) {
this.message = message;
this.code = code;
}
FastDFSERROR(String code, String message, String descreption) {
this.message = message;
this.code = code;
this.descreption = descreption;
}
public FastException ERROR() {
return new FastException(this.code, this.message, this.descreption);
}
public FastException ERROR(String descreption) {
return new FastException(this.code, this.message, descreption);
}
}
4.檔案上傳類FastDFSFile
/**
* 檔案上傳屬性,呼叫fastdfs上傳方法必需
*
*/
public class FastDFSFile {
private byte[] content;// 檔案內容
private String name;// 檔名
private String ext;// 字尾
private String fileId;// 檔案id(唯一id)
public FastDFSFile(byte[] content, String ext,String fileId) {
this.content = content;
this.ext = ext;
this.fileId = fileId;
}
public FastDFSFile(byte[] content, String name, String ext,String fileId) {
this.content = content;
this.name = name;
this.ext = ext;
this.fileId = fileId;
}
public byte[] getContent() {
return content;
}
public void setContent(byte[] content) {
this.content = content;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getExt() {
return ext;
}
public void setExt(String ext) {
this.ext = ext;
}
public String getFileId() {
return fileId;
}
public void setFileId(String fileId) {
this.fileId = fileId;
}
}
5.連線池實現類(由於每次上傳檔案都需要新建連線去上傳檔案,當併發數較多的情況下,會出現連線數過多的情況,為此我實現了連線池去實現,並每隔五秒去定時掃描看連線是否失效)
1. FastDFSFastDFSConnectionPool 連線池類
import java.io.IOException;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.csource.fastdfs.ClientGlobal;
import org.csource.fastdfs.TrackerClient;
import org.csource.fastdfs.TrackerServer;
/**
*
* @ClassName: FastDFSConnectionPool
* @Description: fastdfs連線池
* @author william_zhong
* @date 2017-4-13
*
*/
public class FastDFSFastDFSConnectionPool {
private final Log log = LogFactory.getLog("FastDFSFastDFSConnectionPool.class");
/** 空閒的連線池 */
private LinkedBlockingQueue<TrackerServer> idleFastDFSConnectionPool = null;
/** 連線池預設最小連線數 */
private long minPoolSize = 10;
/** 連線池預設最大連線數 */
private long maxPoolSize = 30;
/** 當前建立的連線數 */
private volatile long nowPoolSize = 0;
/** 預設等待時間(單位:秒) */
private long waitTimes = 20;
/** fastdfs客戶端建立連線預設1次 */
private static final int COUNT = 3;
public static final String CLIENT_CONFIG_FILE = "fdfs_client.conf";
/**
* 預設構造方法
*/
public FastDFSFastDFSConnectionPool(long minPoolSize, long maxPoolSize, long waitTimes) {
log.info("[執行緒池構造方法(FastDFSConnectionPool)][" + "][預設引數:minPoolSize=" + minPoolSize + ",maxPoolSize="
+ maxPoolSize + ",waitTimes=" + waitTimes + "]");
this.minPoolSize = minPoolSize;
this.maxPoolSize = maxPoolSize;
this.waitTimes = waitTimes;
/** 初始化連線池 */
poolInit();
/** 註冊心跳 */
FastDFSHeartBeat beat = new FastDFSHeartBeat(this);
beat.beat();
}
/**
*
* @Description: 連線池初始化 (在載入當前FastDFSConnectionPool時執行) 1).載入配置檔案
* 2).空閒連線池初始化; 3).建立最小連線數的連線,並放入到空閒連線池;
*
*/
private void poolInit() {
try {
/** 載入配置檔案 */
initClientGlobal();
/** 初始化空閒連線池 */
idleFastDFSConnectionPool = new LinkedBlockingQueue<TrackerServer>();
/** 往執行緒池中新增預設大小的執行緒 */
for (int i = 0; i < minPoolSize; i++) {
createTrackerServer(COUNT);
}
} catch (Exception e) {
}
}
/**
*
* @Description: 建立TrackerServer,並放入空閒連線池
*
*/
public void createTrackerServer(int flag) {
TrackerServer trackerServer = null;
try {
TrackerClient trackerClient = new TrackerClient();
trackerServer = trackerClient.getConnection();
while (trackerServer == null && flag < 5) {
log.info("[建立TrackerServer(createTrackerServer)][第" + flag + "次重建]");
flag++;
initClientGlobal();
trackerServer = trackerClient.getConnection();
}
org.csource.fastdfs.ProtoCommon.activeTest(trackerServer.getSocket());
idleFastDFSConnectionPool.add(trackerServer);
/** 同一時間只允許一個執行緒對nowPoolSize操作 **/
synchronized (this) {
nowPoolSize++;
}
} catch (Exception e) {
log.error("[建立TrackerServer(createTrackerServer)][異常:{}]", e);
} finally {
if (trackerServer != null) {
try {
trackerServer.close();
} catch (Exception e) {
log.error("[建立TrackerServer(createTrackerServer)--關閉trackerServer異常][異常:{}]", e);
}
}
}
}
/**
*
* @Description: 獲取空閒連線 1).在空閒池(idleFastDFSConnectionPool)中彈出一個連線;
* 2).把該連線放入忙碌池(busyFastDFSConnectionPool)中; 3).返回 connection
* 4).如果沒有idle connection, 等待 wait_time秒, and check again
*
* @throws AppException
*
*/
public TrackerServer checkout() throws FastException {
log.info("[獲取空閒連線(checkout)]");
TrackerServer trackerServer = idleFastDFSConnectionPool.poll();
if (trackerServer == null) {
if (nowPoolSize < maxPoolSize) {
createTrackerServer(COUNT);
try {
trackerServer = idleFastDFSConnectionPool.poll(waitTimes, TimeUnit.SECONDS);
} catch (Exception e) {
log.error("[獲取空閒連線(checkout)-error][error:獲取連線超時:{}]", e);
throw FastDFSERROR.WAIT_IDLECONNECTION_TIMEOUT.ERROR();
}
}
if (trackerServer == null) {
log.error("[獲取空閒連線(checkout)-error][error:獲取連線超時(" + waitTimes + "s)]");
throw FastDFSERROR.WAIT_IDLECONNECTION_TIMEOUT.ERROR();
}
}
log.info("[獲取空閒連線(checkout)][獲取空閒連線成功]");
return trackerServer;
}
/**
*
* @Description: 釋放繁忙連線 1.如果空閒池的連線小於最小連線值,就把當前連線放入idleFastDFSConnectionPool;
* 2.如果空閒池的連線等於或大於最小連線值,就把當前釋放連線丟棄;
*
* @param client1
* 需釋放的連線物件
*
*/
public void checkin(TrackerServer trackerServer) {
log.info("[釋放當前連線(checkin)][prams:" + trackerServer + "] ");
if (trackerServer != null) {
if (idleFastDFSConnectionPool.size() < minPoolSize) {
idleFastDFSConnectionPool.add(trackerServer);
} else {
synchronized (this) {
if (nowPoolSize != 0) {
nowPoolSize--;
}
}
}
}
}
/**
*
* @Description: 刪除不可用的連線,並把當前連線數減一(呼叫過程中trackerServer報異常,呼叫一般在finally中)
* @param trackerServer
*
*/
public void drop(TrackerServer trackerServer) {
log.info("[刪除不可用連線方法(drop)][parms:" + trackerServer + "] ");
if (trackerServer != null) {
try {
synchronized (this) {
if (nowPoolSize != 0) {
nowPoolSize--;
}
}
trackerServer.close();
} catch (IOException e) {
log.info("[刪除不可用連線方法(drop)--關閉trackerServer異常][異常:{}]", e);
}
}
}
private void initClientGlobal() throws Exception {
String classPath = FastDFSFastDFSConnectionPool.class.getResource("/").getPath().replaceAll("%20"," ");// 專案真實路徑
String fdfsClientConfigFilePath = classPath + CLIENT_CONFIG_FILE;// FastDFS客戶端配置檔案
ClientGlobal.init(fdfsClientConfigFilePath);
}
public LinkedBlockingQueue<TrackerServer> getIdleFastDFSConnectionPool() {
return idleFastDFSConnectionPool;
}
public long getMinPoolSize() {
return minPoolSize;
}
public void setMinPoolSize(long minPoolSize) {
if (minPoolSize != 0) {
this.minPoolSize = minPoolSize;
}
}
public long getMaxPoolSize() {
return maxPoolSize;
}
public void setMaxPoolSize(long maxPoolSize) {
if (maxPoolSize != 0) {
this.maxPoolSize = maxPoolSize;
}
}
public long getWaitTimes() {
return waitTimes;
}
public void setWaitTimes(int waitTimes) {
if (waitTimes != 0) {
this.waitTimes = waitTimes;
}
}
}
2. FastDFSHeartBeat 定時檢測連線類
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.csource.fastdfs.TrackerServer;
public class FastDFSHeartBeat {
private final Log log = LogFactory.getLog("FastDFSHeartBeat.class");
/** fastdfs連線池 */
private FastDFSFastDFSConnectionPool pool = null;
/** 小時毫秒數 */
public static int ahour = 1000 * 60 * 5 * 1;
/** 等待時間 */
public static int waitTimes = 200;
public FastDFSHeartBeat(FastDFSFastDFSConnectionPool pool) {
this.pool = pool;
}
/**
*
* @Description: 定時執行任務,檢測當前的空閒連線是否可用,如果不可用將從連線池中移除
*
*/
public void beat() {
log.info("執行心跳方法");
TimerTask task = new TimerTask() {
@Override
public void run() {
log.info("執行檢測連線方法");
LinkedBlockingQueue<TrackerServer> idleConnectionPool = pool.getIdleFastDFSConnectionPool();
TrackerServer ts = null;
for (int i = 0; i < idleConnectionPool.size(); i++) {
try {
ts = idleConnectionPool.poll(waitTimes, TimeUnit.SECONDS);
if (ts != null) {
org.csource.fastdfs.ProtoCommon.activeTest(ts.getSocket());
idleConnectionPool.add(ts);
} else {
/** 代表已經沒有空閒長連線 */
break;
}
} catch (Exception e) {
/** 發生異常,要刪除,進行重建 */
log.error("重新設定檔案連線");
pool.drop(ts);
}
}
}
};
Timer timer = new Timer();
timer.schedule(task, ahour, ahour);
}
}
備註:常用的命令
檔案儲存目錄
/opt/fastdfs_storage_data
啟動服務
service fdfs_trackerd start
service fdfs_storaged start
/nginx/sbin/nginx
檢視服務
netstat -unltp|grep fdfs
相關推薦
分散式檔案系統之-FastDFS
FastDFS分佈檔案系統介紹: 1.FastDFS是一個開源的輕量級分散式檔案系統,它對檔案進行管理,功能包括:檔案儲存、檔案同步、檔案訪問(檔案上傳、檔案下載)等,解決了大容量儲存和負載均衡的問題。特別適合以檔案為載體的線上服務,如相簿網
分散式檔案系統之FastDFS安裝部署
前面我們瞭解了分散式檔案系統mogilefs的框架以及安裝部署和簡單使用,回顧請參考https://www.cnblogs.com/qiuhom-1874/tag/MogileFS/;今天我們來了解下FastDFS叢集的安裝部署; FastDFS是由國人研發的一個輕量級分散式檔案系統,主要由track
分散式檔案系統之 FastDFS
### [FastDFS 百度百科](https://baike.baidu.com/item/fastdfs/5609710?fr=aladdin) > `FastDFS` 是一個開源的輕量級分散式檔案系統,它對檔案進行管理,功能包括:檔案儲存、檔案同步、檔案訪問(檔案上傳、檔案下載)等,解決了大容
【FastDFS分散式檔案系統之二】:FastDFS小檔案上傳效能測試及Python客戶端上傳操作
由於要對比swift上傳小檔案以及fdfs上傳小檔案的效能,故做效能測試。 1.1 測試環境: FastDFS叢集的搭建方法:【FastDFS分散式檔案系統之一】:搭建、部署、配置 tracker server1:node2 tracker server2:node3
Fastdfs分散式檔案系統之檔案同步機制
原連結 http://blog.csdn.net/mr_smile2014/article/details/52118541 FastDFS同步相關檔案: a)10.100.66.82_23000.mark 內容如下: binlog_index=0 binlog
fastdfs分散式檔案系統之TrackerServer連線池實現
非常感謝 http://blog.csdn.net/Mr_Smile2014/article/details/52441824 公司使用fastdfs檔案系統來儲存檔案和圖片,為了避免每個系統都直接通過客戶端直接訪問fastdfs檔案系統,所以我們做了一個
分散式檔案系統之GPFS
GPFS是IBM公司通過完善和發展其Tiger Shark檔案系統發展而來。GPFS通過共享磁碟結構來實現其強大的擴充套件性。一個GPFS系統由許多叢集節點組成,GPFS檔案系統和應用程式在上面執行。這些節點通過互動網路架構(Switch Fabric)網路連線磁碟
找到一個適合的分散式檔案系統之各種分散式檔案系統優缺點對比
一、各種分散式檔案系統對比 1.1 表格對比 技術 優點 缺點 總結 1、 HDFS 1、大資料批量讀寫,吞吐量高; 2、一次寫入,多次讀取
分散式檔案系統之MogileFS的安裝使用
一、簡介 MogileFS是一個開源的分散式檔案儲存系統,由LiveJournal旗下的Danga Interactive公司開發;它主要由三部分組成,第一部分是server端,server端主要包括mogilefsd和mogstored兩個應用程式。mogilefsd實現的是tracker,它通過資
Atitit 分散式檔案系統 hdfs nfs fastfs 目錄 1. 分散式檔案系統 1 2. 什麼是FastDFS 1 2.1. FastDFS特性: 1 2.1.1. fastdfs是否可在
Atitit 分散式檔案系統 hdfs nfs fastfs 目錄 1. 分散式檔案系統 1 2. 什麼是FastDFS 1 2.1. FastDFS特性: 1 2.1.1. fastdfs是否可在windows系統下安裝?可以的話,哪位可以..._百度知道 2
FastDFS分散式檔案系統配置與部署
一文搞定FastDFS分散式檔案系統配置與部署 閱讀目錄 1 分散式檔案系統介紹 2 系統架構介紹 3 FastDFS效能方案 4 Linux基本命令操作 5 安裝VirtualBox虛擬機器並配置Ubuntu
CentOS 7 安裝配置分散式檔案系統 FastDFS 5.11
CentOS 7 安裝配置分散式檔案系統 FastDFS 5.11 前言: FastDFS是現在比較流行的分散式檔案系
(三)CentOS7搭建FastDFS V5.11分散式檔案系統
第一篇主要講下載相關的軟體安裝包; 第二篇主要講FastDFS的搭建; 第三篇主要講FastDFS與Nginx的整合; 1、FastDFS與Nginx的整合並測試 前面兩篇博文已對FastDFS的安裝和配置,做了比較詳細的講解。FastDFS的基礎模組都搭好了,現在開始測試下載。
(二)CentOS7搭建FastDFS V5.11分散式檔案系統
第一篇主要講下載相關的軟體安裝包; 第二篇主要講FastDFS的搭建; 第三篇主要講FastDFS與Nginx的整合; 1、CentOS7中FastDFS搭建 1.1整理一下我們下載的軟體包 fastdfs-5.11 fastdfs-nginx-m
(一)CentOS7搭建FastDFS V5.11分散式檔案系統
宣告:本文章參考 https://blog.csdn.net/m0_37797991/article/details/73381648,此博文連線為我老師的博文連結,在搭建FastDFS V5.11分散式檔案系統環境中為記錄適合自己的環境搭建過程,特重寫此博文! 1、緒論 因學習以
分散式檔案系統FastDFS詳解
本文轉載自:Ubuntu下FastDFS分散式檔案系統配置與部署 Ubuntu下FastDFS分散式檔案系統配置與部署 白寧超 2017年4月15日09:11:52 摘要: FastDFS是一個開源的輕量級分散式檔案系統,功能包括:檔案儲存、檔案同步、檔案訪問(檔案上傳、檔案下載)等,
FastDFS(分散式檔案系統)
什麼是FastDFS? FastDFS是用c語言編寫的一款開源的輕量級分散式檔案系統。 個人的理解)hadoop也是一個分散式檔案系統,hadoop是處理大資料的,什麼是大資料呢?就是海量資料。海量資料你一塊磁碟估計存不下,那麼就需要把資料存到多個磁碟上,還得統一管理,這時就需要一個分散式檔
FastDFS分散式檔案系統 -- 工作原理
FastDFS介紹 FastDFS分散式檔案管理系統,是用 c 語言編寫的一款開源的分散式檔案系統。FastDFS 為網際網路量身定製, 充分考慮了冗餘備份、負載均衡、線性擴容等機制,並注重高可用、高效能等指標,使用 FastDFS 很容易搭建一套高效能的檔案伺服器叢集提供檔案上傳、
上傳圖片至fastdfs分散式檔案系統並回顯
事件,當我們瀏覽完圖片選中一張時,觸發onchange事件將圖片上傳到伺服器並回顯、 1 <img width="100" height="100" id="allUrl" src="${brand.imgUrl }"/> 2 <input type="hidden" name
fastdfs操作,基礎知識, 分散式檔案系統fastdfs
fastdfs概念圖 fastdfs操作順序 fastdfs 安裝 //查詢: docker search fastdfs //下載: docker pull season/fastdfs // 本機方