unzip -d /opt/fastdfs/ /saasdata/soft/libfastcommon-master.zip tar -zxvf /saasdata/soft/fastdfs-6.06.tar.gz -C /opt/fastdfs/
修改安装路径
1 2 3
sed -i '3c TARGET_PREFIX=/opt/fastdfs/fastdfs-6.06' /opt/fastdfs/fastdfs-6.06/make.sh sed -i '4c TARGET_CONF_PATH=/opt/fastdfs/fastdfs-6.06/conf' /opt/fastdfs/fastdfs-6.06/make.sh sed -i '5c TARGET_INIT_PATH=/opt/fastdfs/fastdfs-6.06/init.d' /opt/fastdfs/fastdfs-6.06/make.sh
编译安装
1 2
cd /opt/fastdfs/libfastcommon-master && ./make.sh && ./make.sh install > /dev/null cd /opt/fastdfs/fastdfs-6.06 && ./make.sh && ./make.sh install > /dev/null
在 cnode1,cnode2 上进行同样的操作。
3.3 编辑配置文件
1 2 3 4 5 6 7 8 9 10 11
sed -i '23c base_path=/data/fastdfs/fastdfs_tracker' /opt/fastdfs/fastdfs-6.06/conf/tracker.conf sed -i '11c group_name=group1' /opt/fastdfs/fastdfs-6.06/conf/storage.conf sed -i '24c port = 23000' /opt/fastdfs/fastdfs-6.06/conf/storage.conf sed -i '49c base_path = /data/fastdfs/fastdfs_storage' /opt/fastdfs/fastdfs-6.06/conf/storage.conf sed -i '119c store_path_count = 2' /opt/fastdfs/fastdfs-6.06/conf/storage.conf sed -i '129c store_path0 = /data/fastdfs/fastdfs_storage_data1' /opt/fastdfs/fastdfs-6.06/conf/storage.conf sed -i '130c store_path1 = /data/fastdfs/fastdfs_storage_data2' /opt/fastdfs/fastdfs-6.06/conf/storage.conf sed -i '145c tracker_server = cnode1:22122' /opt/fastdfs/fastdfs-6.06/conf/storage.conf sed -i '146c tracker_server = cnode2:22122' /opt/fastdfs/fastdfs-6.06/conf/storage.conf sed -i '180c file_distribute_path_mode = 0' /opt/fastdfs/fastdfs-6.06/conf/storage.conf sed -i '352c http.server_port = 8888' /opt/fastdfs/fastdfs-6.06/conf/storage.conf