FastDFS installation configuration

Source: Internet
Author: User
FastDFS installation configuration Step 1: install fastdfs1.decompress fastdfs_v4.07.tar.gz & gt; FastDFS2.cdFastDFS & gt; vimmake. sh modify the following content: TARGET_PREFIX/usr/local/fdfsTARGET_CONF_PATH/usr/local/fdfs/conf FastDFS installation configuration Step 1: install FastDFS 1. decompress FastDFS_v4.07.tar.gz ==> FastDFS 2. cd FastDFS ==> vim make. sh modify the following content: TARGET_PREFIX =/usr/local/fdfs TARGET_CONF_PATH =/usr/local/fdfs/conf mkdir-p/usr/local/fdfs /conf modify if ["$ uname" = "Linu X "]; then if [" $ WITH_LINUX_SERVICE "=" 1 "]; then if [! -D $ TARGET_CONF_PATH]; then mkdir-p $ TARGET_CONF_PATH cp-f conf/tracker. conf $ TARGET_CONF_PATH cp-f conf/storage. conf $ TARGET_CONF_PATH cp-f conf/client. conf $ TARGET_CONF_PATH cp-f conf/http. conf $ TARGET_CONF_PATH cp-f conf/mime. types $ TARGET_CONF_PATH fi cp-f init. d/fdfs_trackerd/etc/rc. d/init. d/cp-f init. d/fdfs_storaged/etc/rc. d/init. d // sbin/chkconfig -- add fdfs_trackerd/sbin/chkco Nfig -- add fdfs_storaged fi Step 2: install libevent-2.0.19-stable.tar.gz 1. extract libevent-2.0.19-stable.tar.gz => libevent-2.0.19-stable 2. enter the libevent-2.0.19-stable installation. /configure -- prefix =/usr/local/libevent make install 3. add soft connection ln-s/usr/local/libevent/lib/libevent-2.0.so.5/usr/lib/libevent-2.0.so.5 ln-s/usr/local/libevent/lib/libevent-2.0.so.5/usr/lib64/libevent-2.0.so.5 ln-s/usr/local/libeve Nt/lib/libevent-2.0.so.5/lib64/libevent-2.0.so.5 ln-s/usr/local/libevent/lib/libevent-2.0.so.5/lib/libevent-2.0.so.5 ln-s/usr/local/libevent/lib/libevent-2.0.so.5/ usr/local/lib64/libevent-2.0.so.5 ln-s/usr/local/libevent/lib/libevent-2.0.so.5/usr/local/lib/libevent-2.0.so.5 Step 3: install FastDFS. /make. sh C_INCLUDE_PATH =/usr/local/libevent/include LIBRARY_PATH =/usr/local/libevent/lib. /make. sh I Nstall Step 4: if the/usr/local/fastdfs/conf file does not contain fdfs_trackerd and fdfs_storaged, copy the last step from the/FastDFS/tracker and FastDFS/storage/Directories: modify mkdir-p/home/softinstall/data/tracker 1. modify tracker. conf base_path =/home/softinstall/data/tracker bind_addr = 192.168.9.169 1.1 modify storage_ids.conf 100001 group1 192.168.9.169 2. start tracker. /fdfs_trackerd .. /conf/tracker. step 6: configure storage mkdir-p/home/softi Nstall/data/store mkdir-p/home/softinstall/data/store/store0 mkdir-p/home/softinstall/data/store/store1 mkdir-p/home/softinstall/data /store/store2 1. modify storage. conf base_path =/home/softinstall/data/store store_path_count = 3 store_path0 =/home/softinstall/data/store/store0 store_path1 =/home/softinstall/data/store/store1 store_path2 = /home/softinstall/data/store/store2 tracker_server = 192.168.9.169: 22122 # Limit 6*6 = 36 directories default 256*256 subdir_count_per_path = 6 2. start storage. /fdfs_storaged .. /conf/storage. conf check whether Port 23000 is enabled Step 7: install nginx + fastdfs Module 1. install pcre-8.32 into pcre-8.32. /configure make install if there is a problem with some of the default packages, you can execute: yum groupinstall "Development Tools" Step 8: uncompress fastdfs-nginx-module_v1.15.tar.gz and nginx-1.4.2.tar.gz 1. go to the fastdfs-nginx-module_v1.15/src vim fastdfs-nginx-module_v1.15/src/config and modify to the following content ng X_addon_name = export HTTP_MODULES = "$ HTTP_MODULES modules" NGX_ADDON_SRCS = "$ export $ ngx_addon_dir/export" CORE_INCS = "$ CORE_INCS/usr/local/fdfs/include/fastdfs/usr/local/ fdfs/include/fastcommon/"CORE_LIBS =" $ CORE_LIBS-L/usr/local/fdfs/lib-lfastcommon-lfdfsclient "CFLAGS =" $ CFLAGS-D_FILE_OFFSET_BITS = 64-bit =' 256*1024' -DFDFS_MOD_CONF_FILENAME = '\ "/usr/local/fdfs/conf/mod_fastdfs.conf \"' "2. install to the nginx-1.4.2 directory. /configure -- prefix =/home/softinstall/nginx-fastdfs-install -- with-pcre =/home/softinstall/nginx/pcre-8.32 -- add-module =/home/softinstall/ if any problem occurs during nginx/fastdfs-nginx-module/src installation, install the following package: yum-y install gcc-c ++ zlib-devel openssl-devel 3. configure nginx. conf: enter nginx-fastdfs-install/conf vim nginx. conf configuration Location/M00 {root/home/softinstall/data/store/store0/data; ngx_fastdfs_module ;} location/M01 {root/home/softinstall/data/store/store1/data; ngx_fastdfs_module;} location/M02 {root/home/softinstall/data/store/store2/data; ngx_fastdfs_module;} 4. configure mod_fastdfs.conf mkdir-p/home/softinstall/data/nginx_mod to enter the/usr/local/fdfs/conf directory vim mod_fastdfs.conf base_path =/home/softinstall/da Ta/nginx_mod tracker_server = 192.168.9.169: 22122 store_path_count = 3 store_path0 =/home/softinstall/data/store/store0 store_path1 =/home/softinstall/data/store/store1 store_path2 =/home/softinstall/data/store/store2 5. start nginx to enter/home/softinstall/nginx-fastdfs-install/sbin. /error while loading shared libraries: libfdfsclient cannot be found during nginx startup. so: cannot open shared object file: No such file or dire Ctory error while loading shared libraries: libfastcommon. so: cannot open shared object file: No such file or directory please use the following soft connection ln-s/usr/local/fdfs/lib/libfastcommon. so/usr/lib/libfastcommon. so ln-s/usr/local/fdfs/lib/libfastcommon. so/usr/lib64/libfastcommon. so ln-s/usr/local/fdfs/lib/libfdfsclient. so/usr/lib64/libfdfsclient. so ln-s/usr/local/fdfs/lib/libfdfsclient. so/usr/lib/libfdfsc Lient. so ==================================== fastDHT ============== =============================== [Step 1:] install Berkley DB [1. the tar-zxvf db-4.7.25.tar.gz enters the db-4.7.25/build_unix .. /dist/configure -- prefix =/usr [Step 2:] install FastDHT mkdir-p/usr/local/fdht/conf 1. tar-zxvf FastDHT_v1.23.tar.gz enter FastDHT_v1.23 vim make. sh modify TARGET_PREFIX =/usr/local/fdht TARGET_CONF_PATH =/usr/local/fdht/conf if ["$1" = "Install"]; then cd .. cp-f restart. sh $ TARGET_PREFIX/bin cp-f stop. sh $ TARGET_PREFIX/bin if ["$ uname" = "Linux"]; then if ["$ WITH_LINUX_SERVICE" = "1"]; then if [! -D $ TARGET_CONF_PATH]; then mkdir-p $ TARGET_CONF_PATH cp-f conf/fdhtd. conf $ TARGET_CONF_PATH cp-f conf/fdht_servers.conf $ TARGET_CONF_PATH cp-f conf/fdht_client.conf $ TARGET_CONF_PATH fi cp-f init. d/fdhtd/etc/rc. d/init. d // sbin/chkconfig -- add fdhtd fi [2.] installation. /make. sh ------------------------------------------------------------------------------ if global appears. h: 18: 19: error: event. h: No such file or directory enter/home/softinstall/fastdfs/libevent-2.0.19-stable and then execute. /configure -- prefix =/usr make install ---------------------------------------------------------------------------------. /make. sh install [3. configure fdht [3.1] vim/usr/local/fdht/conf/fdhtd. conf port = 11411 bash_path =/home/softinstall/data/fastdht cache_size = 32 MB store_sub_keys = true use_storage_id = true # include/u Sr/local/fdht/conf/fdht_servers.conf) [3.2] vim/usr/local/fdht/conf/fdht_server.conf group_count = 1 group0 = 192.168.9.165: 11411 [3.3] vim/usr/local/fdht/conf/fdht_client.conf keep_alive = 1 (this option is associated with storaged. conf file) base_path =/home/softinstall/data/fastdht # include/usr/local/fdht/conf/fdht_servers.conf [3.4] configure the storaged of FastDFS. conf file vi storaged. conf (default location:/usr/loc Al/fdfs/conf/storaged. conf) check_file_duplicate = 1 this configuration item explains: Check whether the uploaded file already exists. If it already exists, there is no file content. create an index link to save disk space. key_namespace = FastDFS this configuration item explains: when the parameter is set to 1, in FastDHT, the namespace keep_alive = 1 this configuration item explains: persistent connection configuration options, if the value is 0, transient connection 1 is a persistent connection # include/usr/local/fdht/conf/fdht_servers.conf this configuration item is described as follows: you can use the # include filename method to load the FastDHT servers configuration [3.5] ==================== ======================================================= === start tracker/usr/local/fdfs/bin/fdfs_trackerd/usr/local/fdfs/conf/tracker. conf: stop tracker/usr/local/fdfs/bin/stop. sh/usr/local/fdfs/conf/tracker. conf starts storage/usr/local/fdfs/bin/fdfs_storaged/usr/local/fdfs/conf/storage. conf: stop storage/usr/local/fdfs/bin/stop. sh/usr/local/fdfs/conf/storage. conf start nginx/home/softinstall/nginx-fastdfs-install/sbin/nginx start/usr/local/fdht/bin/fdhtd/usr/local/fdht/conf/fdhtd. conf stop/usr/local/fdht/bin/stop. sh/usr/local/fdht/conf/fdhtd. check whether there is an error in the conf test: /usr/local/fdht/bin/fdht_test/usr/local/fdht/conf/fdht_client.conf ============== ========================================================== =====
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.