Steps for installing and configuring fastdfs under CentOS system

Time:2021-10-22

Steps for installing and configuring fastdfs under CentOS system:
1: Install libevent (libevent-2.0.16-stable)
##Uninstall the system’s own libevent
rpm -qa|grep libevent rpm -e libevent*
##Install libevent for trackerd and stored nodes
cd /home/ylh
wget http://unclelu-server.googlecode.com/files/libevent-2.0.16-stable.tar.gz
tar -zxvf libevent-2.0.16-stable.tar.gz
cd libevent-2.0.16-stable
make clean
./configure
make && make install
##Create a soft link for libevent to the / lib library, and the 64 bit system corresponds to / lib64
ln -s /usr/local/lib/libevent* /lib/
ln -s /usr/local/lib/libevent* /lib64/

2: Install fastdfs for trackerd node and modify the configuration file / etc / FDFS / tracker.conf (if trackerd needs to use the built-in web server, modify the make file and enable with_httpd = 1 for recompilation)
cd /home/ylh
wget http://fastdfs.googlecode.com/files/FastDFS_v3.06.tar.gz
tar -zxvf FastDFS_v3.06.tar.gz
cd FastDFS_v3.06
./make.sh
./make.sh install
##Create storage directory
mkdir /home/ylh/fastdfs
##Modify the configuration file. VIM / etc / FDFS / tracker.conf save and exit after modification
##Start trackerd
/usr/local/bin/fdfs_trackerd /etc/fdfs/tracker.conf

3: Install fastdfs for the stored node. The stored node also needs libevent. See Step 1 for the installation steps
cd /home/ylh
wget http://fastdfs.googlecode.com/files/FastDFS_v3.06.tar.gz
tar -zxvf FastDFS_v3.06.tar.gz
cd FastDFS_v3.06
./make.sh
./make.sh install

4: Install a web server for the stored node. The stored node can use nginx or Apache to provide HTTP download services. Here we choose nginx.
cd /home/ylh
wget http://nginx.org/download/nginx-0.8.55.tar.gz
tar zxvf nginx-0.8.55.tar.gz
cd nginx-0.8.55
./configure –prefix=/opt/nginx –with-http_stub_status_module
make && make install

5: Install fastdfs nginx module for the stored node
cd /home/ylh
wget http://fastdfs.googlecode.com/files/fastdfs-nginx-module_v1.10.tar.gz
tar xzf fastdfs_nginx_module_v1.05.tar.gz
cd /home/ylh/nginx-0.8.55 ./configure –add-module=/home/ylh/fastdfs-nginx-module/src
make; make install

6: Modify the nginx configuration file and save to exit (VIM / usr / local / nginx / conf / nginx. CONF)
location /M00 {
root /home/ylh/fastdfs/data;
ngx_fastdfs_module;
}

7: Copy and modify nginx module configuration file
cp /home/ylh/fastdfs-nginx-module/src/mod_fastdfs.conf /etc/fdfs
VIM modify / etc / FDFS / Mod_ Fastdfs.conf save exit
##Start nginx
/usr/local/nginx/sbin/nginx

8: Modify the configuration file / etc / FDFS / storage.conf of the stored node to start the stored node
##Create the storage directory MKDIR / home / YLH / fastdfs
##Modify the configuration VIM / etc / FDFS / storage.conf, save it and exit
##Start stored
/usr/local/bin/fdfs_storaged /etc/fdfs/storage.conf

9: Testing
##Modify the client configuration file / etc / conf / client.conf and save it to exit
##Test upload
/usr/local/bin/ fs_test /etc/conf/client.conf upload /home/a.jpg
If the upload is successful, the echo information contains the URL of the file. Enter the URL address in the browser, and the tracker server will automatically redirect to the storage server where the file is stored. The file is downloaded successfully.
So far, fastdfs has been successfully built

Recommended Today

Swift advanced (XV) extension

The extension in swift is somewhat similar to the category in OC Extension can beenumeration、structural morphology、class、agreementAdd new features□ you can add methods, calculation attributes, subscripts, (convenient) initializers, nested types, protocols, etc What extensions can’t do:□ original functions cannot be overwritten□ you cannot add storage attributes or add attribute observers to existing attributes□ cannot add parent […]