摘要:基于索引号一一配置路径。 保存文件时,使用两个级别的目录。 如果仅此参数,则将在第一次运行期间自动创建用于存储文件的子目录。 系统同步的默认期限在一天之内具有多个活动连接。 它通常用于避免峰同步引起的一些问题。
centosBuild Monolithic Fastdfs
centosBuild Monolithic Fastdfs centos build monolithic Fastdfs1, install dependency package 2, libfatscommon1.1 install uzip1.2 install libfatscommon3, install fastdfs4, configure risher 4.1, edit confictory 4.5.1, edit configuration file 5.2, create directory 5.3,启动跟踪器5.4,检查跟踪器和存储是否正在通信,文件上传测试6.1,更改客户端配置文件6.2,上传官方网站地址。 GCC - C ++
2。 libfatscommon
安装libfatscommon
1.1安装uzip
安装unzip压缩软件包unzip yum安装- y unzip zip
1.2安装libfatscommon #unzip unzip unzip unzip unzip unzip unzip unzipmaster.zip #depressurization目录CD libfastCommon - master/#compile./make.sh#install。/make.sh install 3. fastdfs#decompress#decompress tar - zxvf fastdfs - 6.07.tar.gz instruct.tar.gz安装4。 /etc/fdfs/tracker.conf 4.1。编辑配置文件#是否启用了配置文件,false是否有效禁用= false#service port = 22122#跟踪器数据和日志目录地址(必须存在root Directory地址,必须存在子目录必须存在,必须存在子目录)base_path =/home/home/fastdfs/fastdfs/tracker#http http http http.server_port.server_port = 80 4.2。创建目录
mkdir/home/fastdfs/tracker
4.3。 您可以启动[tracker] /etc/init.d/fdfs_trackerd start#start#您也可以以这种方式开始。 /etc/fdfs/storage.conf.sample /etc/fdfs/storage.conf 5.1。编辑配置文件#配置文件是否无效,false无效= falSE#指定该存储服务器位于group_name = group1#存储服务器服务端口= 23000#心跳间隔时间的组(卷),以秒为单位(此处是指主动将心跳发送到跟踪器服务器)存储服务器支持多个路径。 在这里,配置了要存储文件的基本epath数量,通常仅包含一个目录。 store_path_count = 1#配置store_path_count路径基于一个路径,索引号基于0。SOTER_PATH0=/home/fastdfs/file#当FastDFS保存文件时,使用了两个级别的目录。 存储文件的目录数量如下:#如果此参数仅为n(例如:256),如果存储服务器首先运行,则将存储文件存储的n*n子目录将在store_path中自动创建。 subdir_count_per_path = 256#如果有多个tracker服务器,则tracker_servers列表将积极连接到tracker_server。每个Tracker Server都会编写允许LINE TRACEER_SERVER = 192.168.10.31:22122#系统同步(默认)的时间段。 它通常用于避免峰同步引起的一些问题。 sync_start_time = 00:00 sync_end_time = 23:59#访问端口http.server_port = 80 5.2,创建一个项目录音
mkdir/home/fastdfs/file mkdir/home/fastdfs/storage
5.3。 启动跟踪器#you start /etc/init.d/fdfs_storaged start#您也可以以这种方式开始。检查跟踪器和存储是否正在通信
/usr/bin/fdfs_monitor /etc/fdfs/storage.conf
6。文件上传测试6.1。 Change the tracker server client configuration file #cp /etc/fdfs/client.conf.sample /etc/fdfs/client.conf
#client data and log directory base_path =/home/fastdfs/client#tracker#tracker porter_server =/home/fastdfs/client#tracker base_path =/home/fastdfs/client#tracker base_path =/home/fastdfs/client#tracker test/usr/bin/fdfs_upload_file /etc/fdfs/client.conf code.jpg/usr/bin/fdfs_test /etc/fdfs/client.conf Upload code.jpg
return file Upload ID FileID and file suffix name (specified primarily by the client used to distinguish file types).
评论前必须登录!
注册