- 在能连外网的服务器上安装yum-utils工具(yum install yum-utils) ;
- 通过yum-utils中的工具yumdownloader命令导出需要的包,比如需要gcc的包,则执行:yumdownloader gcc;执行完成后会在当前目录下获取到gcc的rpm包;
- gcc需要的包有:
cpp-4.8.5-44.el7.x86_64.rpm glibc-devel-2.17-326.el7_9.i686.rpm kernel-headers-3.10.0-1160.108.1.el7.x86_64.rpm libmpc-1.0.1-3.el7.i686.rpm gcc-4.8.5-44.el7.x86_64.rpm glibc-devel-2.17-326.el7_9.x86_64.rpm libgcc-4.8.5-44.el7.i686.rpm libmpc-1.0.1-3.el7.x86_64.rpm glibc-2.17-326.el7_9.i686.rpm glibc-headers-2.17-326.el7_9.x86_64.rpm libgcc-4.8.5-44.el7.x86_64.rpm mpfr-3.1.1-4.el7.i686.rpm glibc-2.17-326.el7_9.x86_64.rpm gmp-6.0.0-15.el7.i686.rpm libgomp-4.8.5-44.el7.i686.rpm mpfr-3.1.1-4.el7.x86_64.rpm glibc-common-2.17-326.el7_9.x86_64.rpm gmp-6.0.0-15.el7.x86_64.rpm libgomp-4.8.5-44.el7.x86_64.rpm
比如:cpp-4.8.5-44.el7.x86_64.rpm 则执行yumdownloader cpp 即可获取到cpp-4.8.5-44.el7.x86_64.rpm包;
-
将获取到的包传到不能连外网的服务器上(两台服务器的centos版本保持一致)的任意目录后,进入目录执行指令:rpm -Uvh *.rpm --nodeps --force;
-
安装完gcc后,安装fastDFS,dfs需要两个包,分别为libfastcommon、fastdfs;官网下载好这两个包之后扔到服务器上任意目录,一般是tar.gz的压缩包,使用指令tar -zvxf xxx.tar.gz解压后,进入解压之后的目录,目录下一般会有INSTALL文件,文件中会指导如何安装;
-
先安装libfastcommon,再安装fastDFS;
libfastcommon的install文件里会有如下内容:
git clone https://github.com/happyfish100/libfastcommon.git cd libfastcommon; git checkout V1.0.43 ./make.sh clean && ./make.sh && ./make.sh install
因为我们已经获取到了压缩包,所以只要在解压后的压缩包下执行:./make.sh clean && ./make.sh && ./make.sh install 指令就可以了;
-
fastDFS的INSTALL文件比较大,截取其中主要内容如下,因为我们是通过安装包安装的,所以直接跳过 第一步,从第二步的./make.sh clean && ./make.sh && ./make.sh install开始执行即可:
1:git clone https://github.com/happyfish100/libfastcommon.git cd libfastcommon; git checkout V1.0.43 ./make.sh clean && ./make.sh && ./make.sh install 2:git clone https://github.com/happyfish100/fastdfs.git cd fastdfs; git checkout V6.06 ./make.sh clean && ./make.sh && ./make.sh install 3:./setup.sh /etc/fdfs 4:edit or modify the config files of tracker, storage and client : vi /etc/fdfs/tracker.conf vi /etc/fdfs/storage.conf vi /etc/fdfs/client.conf 5:启动服务: /usr/bin/fdfs_trackerd /etc/fdfs/tracker.conf restart /usr/bin/fdfs_storaged /etc/fdfs/storage.conf restart ....
fastDFS在Linux(centos7系统)上离线安装
最新推荐文章于 2024-08-16 15:56:49 发布