Centos7 上安装 FastDFS-6.06和nginx-1.18.0及fastdfs-nginx-module
前言
需要同时安装nginx
一、准备安装包
这里我从同事那里拿到了FastDFS-6.06的安装包和fastdfs-nginx-module安装包,还差两个
[root@yy sf_share]# cd fastdfs/
[root@yy fastdfs]# ls
fastdfs-6.06.tar.gz fastdfs-nginx-module-1.22.tar.gz
#FastDFS分离出的一些公用函数包
[root@yy fastdfs]# wget -c "https://github.com/happyfish100/libfastcommon/archive/V1.0.43.tar.gz"
#ngnix安装包
[root@yy fastdfs]# wget -c http://nginx.org/download/nginx-1.18.0.tar.gz
[root@yy fastdfs]# ls
fastdfs-6.06.tar.gz fastdfs-nginx-module-1.22.tar.gz nginx-1.18.0.tar.gz V1.0.43.tar.gz
二、安装编译工具及库文件
[root@yy fastdfs]# yum -y install git gcc gcc-c++ make automake autoconf libtool pcre pcre-devel zlib zlib-devel openssl-devel wget vim
三、解压
[root@yy fastdfs]# tar -zxvf fastdfs-6.06.tar.gz
[root@yy fastdfs]#tar -zxvf fastdfs-nginx-module-1.22.tar.gz
[root@yy fastdfs]# tar -zxvf nginx-1.18.0.tar.gz
[root@yy fastdfs]# tar -zxvf V1.0.43.tar.gz
[root@yy fastdfs]# ls
fastdfs-6.06 fastdfs-6.06.tar.gz fastdfs-nginx-module-1.22 fastdfs-nginx-module-1.22.tar.gz libfastcommon-1.0.43 nginx-1.18.0 nginx-1.18.0.tar.gz V1.0.43.tar.gz
#把安装文件都移动到/usr/local目录下
[root@yy fastdfs]# mv fastdfs-6.06 /usr/local/
[root@yy fastdfs]# mv fastdfs-nginx-module-1.22 /usr/local/
[root@yy fastdfs]# mv libfastcommon-1.0.43 /usr/local/
[root@yy fastdfs]# mv nginx-1.18.0 /usr/local/
[root@yy fastdfs]# cd /usr/local
[root@yy local]# ls
bin etc fastdfs-nginx-module-1.22 include lib libexec mysql5.7 otp_src_21.3 redis-5.0.8 share
erlang fastdfs-6.06 games java lib64 libfastcommon-1.0.43 nginx-1.18.0 rabbitmq sbin src
四、编译安装libfastcommon
#进入解压后的目录
[root@yy local]# cd libfastcommon-1.0.43
#编译安装
[root@yy libfastcommon-1.0.43]# ./make.sh && ./make.sh install
#检查(出现libfastcommon.so即成功)
[root@yy libfastcommon-1.0.43]# ls /usr/lib|grep libfastcommon
libfastcommon.so
五、编译安装fastdfs
1.编译安装
[root@yy libfastcommon-1.0.43]# cd ../fastdfs-6.06
[root@yy fastdfs-6.06]# ./make.sh && ./make.sh install
#检查安装是否成功