开发步骤:
-
第一步:分别在linux和windows配置lhosts文件的域名信息(可以不做)
vim /etc/hosts
指定一个域名
192.168.68.130 www.zhiyou200.com
路径:C:\Windows\System32\drivers\etc\hosts
192.168.68.130 www.zhiyou200.com
-
第二步:下载安装libfastCommon插件
wget https://github.com/happyfish100/libfastcommon/archive/V1.0.7.tar.gz
请求被拒绝
不断尝试
-
第三步:解压下载的libfastCommon压缩包
tar -zxvf V1.0.7.tar.gz
-
第四步:进入libfastCommon目录中
cd libfastcommon-1.0.7
-
第五步:编译、安装
编译
./make.sh
安装
./make.sh install
-
建立软连接 原因是因为默认安装的位置不对 默认安装到/usr/lib64 fastdfs主程序的lib目录在 /usr/local/lib中
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/lib/libfdfsclient.so
ln -s /usr/lib64/libfdfsclient.so /usr/local/lib/libfdfsclient.so
下载安装FastDFS
-
下载FastDFS
wget https://github.com/happyfish100/fastdfs/archive/V5.05.tar.gz
如果被拒绝,继续多次不断的尝试
-
解压安装包
tar -zxvf V5.05.tar.gz
-
进入fastdfs-5.05目录中
cd fastdfs-5.05
-
编译、安装
./make.sh
./make.sh install
-
建立软连接
ln -s /usr/bin/fdfs_trackerd /usr/local/bin
ln -s /usr/bin/fdfs_storaged /usr/local/bin
ln -s /usr/bin/stop.sh /usr/local/bin
ln -s /usr/bin/restart.sh /usr/local/bin