Download Installation Libfastcommonwget https://github.com/happyfish100/libfastcommon/archive/master.zip unzip master.zip CD Libfastcommon-master./ make.sh./make.sh Install
Download Installation Fastdfswget https://github.com/happyfish100/fastdfs/archive/master unzip master.zip cd fastdfs-master./make.sh./make.s H Install if there is no error, then success. The installation log prompts Fastdfs to be installed in the/etc/fdfs directory. Installed by default installation, the corresponding files and directories after installation:
A, service scripts in:
/etc/init.d/fdfs_storaged
/etc/init.d/fdfs_tracker
B, configuration file in (sample configuration file):
/etc/fdfs/client.conf.sample
/etc/fdfs/storage.conf.sample
/etc/fdfs/tracker.conf.sample
C, the command tool in the/usr/bin/directory:
Fdfs_appender_test
Fdfs_appender_test1
Fdfs_append_file
Fdfs_crc32
Fdfs_delete_file
Fdfs_download_file
Fdfs_file_info
Fdfs_monitor
Fdfs_storaged
Fdfs_test
Fdfs_test1
Fdfs_trackerd
Fdfs_upload_appender
Fdfs_upload_file
stop.sh
restart.sh
Modify configuration fileCreate directories, store logs and data, as follows-data-fdfs-tracker-storage-client configuration tracker Cd/etc/fdfs vim tra Cker.conf
After opening, focus on the following 4 configurations:
1.disabled=false #默认开启
2.port=22122 #默认端口号
3.base_path=/data/fdfs/tracker #我刚刚创建的目录
4.http.server_port=6666 #默认端口是8080
Configure storage Cd/etc/fdfs mv Storage.conf.sample storage.conf vi storage.conf/... base_path=/data/fdfs/storage St Ore_path0=/data/fdfs/storage tracker_server=192.168.58.128:22122 #指定tracker服务器地址//... 1. Disabled=false
2. Group_name=group1 #组名, modified according to the actual situation
3. port=23000 #设置storage的端口号, the default is 23000, the storage port number of the same group must be the same
4. Base_path=/data/fdfs/storage #设置storage数据文件和日志目录
5. Store_path_count=1 #存储路径个数, needs and store_path number matching
6. Base_path0=/data/fdfs/storage #实际文件存储路径
7. tracker_server=192.168.58.128:22122 #我CentOS7的ip地址
8. http.server_port=8888 #设置 http port number
Configure client Cd/etc/fdfs CP client.conf.sample client.conf VI client.conf//... base_path=/data/fdfs/client tracker _server=192.168.58.128:22122//...start Tracker and storage
Service Fdfs_trackerd start
service fdfs_storaged start
Log to see if it started successfully