这篇文章主要介绍Linux系统如何安装FastDFS,文中介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们一定要看完!
环境:CentOS 7.4.1708 FastDFS版本: 6.04
yum -y install gcc gcc+ gcc-c++ openssl openssl-devel pcre pcre-devel
下载libfastcommon https://github.com/happyfish200/libfastcommon/releases
解压并安装libfastcommon:
tar zxvf libfastcommon-1.0.42.tar.gz
cd libfastcommon-1.0.42
./make.sh
./make.sh install
下载FastDFS https://github.com/happyfish200/fastdfs/releases
解压并安装FastDFS:
tar zxvf fastdfs-6.04.tar.gz
cd fastdfs-6.04
./make.sh
./make.sh install
进入fastdfs配置文件夹 cd /etc/fdfs
拷贝:cp tracker.conf.sample tracker.conf
编辑tracker.conf:vim tracker.conf
#tracker数据文件和日志存储路径,若不存在请自行创建
base_path=/data/fastdfs/tracker
#tracker服务端口,默认22122
port=22122
# HTTP 服务端口
http.server_port=8080
启动: /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf start
拷贝: cp storage.conf.sample storage.conf
编辑storage.conf: vim storage.conf
#storage所在组名称
group_name=group1
#storage数据文件和日志目录,若不存在请自行创建
base_path=/data/fastdfs/storage
#storage服务的存储路径个数,需要和store_path个数匹配
store_path_count=1
#storage服务的实际文件存储路径
store_path0=/data/fastdfs/storage_data
#tracker服务的ip和端口,不要使用127.0.0.1
tracker_server=192.168.1.168:22122
启动:/usr/bin/fdfs_storaged /etc/fdfs/storage.conf start
查看:/usr/bin/fdfs_monitor /etc/fdfs/storage.conf
拷贝:cp client.conf.sample client.conf
编辑client.conf:vim client.conf
#tracker服务中配置的路径
base_path=/data/fastdfs/tracker
#tracker服务的ip 端口
tracker_server=192.168.1.168:22122
#storage服务的实际文件存储路径
store_path0=/data/fastdfs/storage_data
测试上传文件123.log:/usr/bin/fdfs_upload_file /etc/fdfs/client.conf 123.log
以上是“Linux系统如何安装FastDFS”这篇文章的所有内容,感谢各位的阅读!希望分享的内容对大家有帮助,更多相关知识,欢迎关注亿速云行业资讯频道!
亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。