FastDFS 安裝步驟


快速安裝
1.安裝libfastcommon
# ./make.sh
#./make.sh install 
2.安裝fastdfs
# ./make.sh
# ./make.sh install



詳細步驟
1.下載安裝包
   
源碼在google的code服務器上有,不想翻牆了,直接去源碼中國下載了。
   目前最新版本為5.05   全名  fastdfs-5.05.tar.gz
   或者去這里下載:(版本又更新了5.11)
      https://github.com/happyfish100/fastdfs/releases/tag/V5.10

    
2.安裝網絡驅動包(最新的fastdfs,安裝支持插件 libfastcommon即可,不在需要libevent了
   fastdfs 需要一個網絡驅動包  libevent;
    我直接用yum安裝了;
# yum list libevent
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base                                                                                         | 3.7 kB     00:00     
extras                                                                                       | 3.4 kB     00:00     
updates                                                                                      | 3.4 kB     00:00     
Installed Packages
libevent.x86_64                                          1.4.13-4.el6                                          @base
Available Packages
libevent.i686                                            1.4.13-4.el6                                          base 

 #yum install libevent.x86_64



3.安裝程序
解壓   tar -zxvf fastdfs-5.05.tar.gz
進入文件中 cd  fastdfs-5.05
開始安裝 ./make.sh
         *   報錯         ./make.sh: line 14: gcc: command not found
                                 gcc沒裝就會這樣子,裝上它就好了
                                 
# yum install gcc

繼續安裝 ./make.sh
          *報錯         make: *** [../common/fdfs_global.o] Error 1
               (
看源碼目錄下的INSTALL文件發現,需要安裝 libfastcommon

     下載安裝
libfastcommon
                到https://github.com/happyfish100/libfastcommon  點擊綠色按鈕下載  libfastcommon-master.zip
                上傳解壓    unzip libfastcommon-master.zip       
         安裝
libfastcommon  
                    
# ./make.sh
                #./make.sh install 
                  * 報錯
               
   [root@ libfastcommon-master]# ./make.sh install
                                                           mkdir -p /usr/lib64
                                                           mkdir -p /usr/lib
                                                           install -m 755 libfastcommon.so /usr/lib64
                                        install: cannot change permissions of `/usr/lib64/libfastcommon.so': Permission denied
                                                            make: *** [install] Error 1
                                    (經過測試,安裝程序和root身份都無法修改 libfastcommon.so這個文件權限為755
                                     (多個技術論壇發帖都無法解決,暫時跳過,放棄了原來的機器Centos6.3)
                                      (換了一台Centos7機器安裝,沒出現問題)
                                         原因找到了,原來那台裝了 安全狗,所以無法建目錄……
                                   
   重新整理一下:
       1.首先安裝支持插件 libfastcommon  
              
[root@localhost libfastcommon-master]# ./make.sh 
              
[root@localhost libfastcommon-master]# ./make.sh install
mkdir -p /usr/lib64
mkdir -p /usr/lib
install -m 755 libfastcommon.so /usr/lib64
install -m 755 libfastcommon.so /usr/lib
mkdir -p /usr/include/fastcommon
install -m 644 common_define.h hash.h chain.h logger.h base64.h shared_func.h pthread_func.h ini_file_reader.h _os_define.h sockopt.h sched_thread.h http_func.h md5.h local_ip_func.h avl_tree.h ioevent.h ioevent_loop.h fast_task_queue.h fast_timer.h process_ctrl.h fast_mblock.h connection_pool.h fast_mpool.h fast_allocator.h fast_buffer.h skiplist.h multi_skiplist.h flat_skiplist.h skiplist_common.h system_info.h fast_blocked_queue.h php7_ext_wrapper.h id_generator.h /usr/include/fastcommon
                安裝完成

     2.安裝FastFDS 
              # ./make.sh
                         報錯: ./make.sh: line 184: perl: command not found
                                     ./make.sh: line 185: perl: command not found
                                     ./make.sh: line 186: perl: command not found
                          安裝perl   # yum install perl

             # ./make.sh install


       


 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM