Centos7软件安装系列【七】安装fastdfs

 mkdir -p /home/fdfs/data

git clone https://github.com/happyfish100/libfastcommon.git
cd libfastcommon/
./make.sh
./make.sh install
rm -f /usr/local/lib/libfastcommon.so
rm -f /usr/lib/libfastcommon.so
rm -f /usr/local/lib/libfdfsclient.so
rm -f /usr/lib/libfdfsclient.so

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

git clone https://github.com/happyfish100/fastdfs.git
cd fastdfs/
make
make install

配置文件修改
cd /etc/fdfs/
cp tracker.conf.sample tracker.conf
cp storage.conf.sample storage.conf
cp client.conf.sample client.conf


#修改ip
local_ip=`/sbin/ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:"`
echo $local_ip

#sed -i 's/^base_path=\/home\/yuqing\/fastdfs/base_path=\/home\/fdfs\/data/g' /etc/fdfs/tracker.conf 
sed -i 's/^base_path=.*$/base_path=\/home\/fdfs\/data/g' /etc/fdfs/tracker.conf
sed -i 's/^bind_addr=.*$/bind_addr='"$local_ip"'/g' /etc/fdfs/tracker.conf

sed -i 's/^base_path=.*$/base_path=\/home\/fdfs\/data/g' /etc/fdfs/storage.conf
sed -i 's/^bind_addr=.*$/bind_addr='"$local_ip"'/g' /etc/fdfs/storage.conf
sed -i 's/^store_path0=.*$/store_path0=\/home\/fdfs\/data/g' /etc/fdfs/storage.conf
sed -i 's/^tracker_server=.*$/tracker_server='"$local_ip:22122"'/g' /etc/fdfs/storage.conf

sed -i 's/^base_path=.*$/base_path=\/home\/fdfs\/data/g' /etc/fdfs/client.conf
sed -i 's/^tracker_server=.*$/tracker_server='"$local_ip:22122"'/g' /etc/fdfs/client.conf

#启动
fdfs_trackerd /etc/fdfs/tracker.conf
fdfs_storaged /etc/fdfs/storage.conf

   转载规则


《Centos7软件安装系列【七】安装fastdfs》 Euler 采用 知识共享署名 4.0 国际许可协议 进行许可。
  目录