Install FastDFS

Feedback


Installation environment

FastDFS supports UNIX system, such as Linux, FreeBSD and so on.

Here we use Red Hat Enterprise Linux Server release 6.2 64位(Santiago) system in the example.

Software requirement

FastDFS version should be 4.00 or higher. Here we use FastDFS_v4.00.

FastDHT version should be 1.21 or higher. Here we use FastDHT_v1.21.

libevent version should be 1.4.x or higher. It is recommended to use the latest stable version. Here we use libevent-2.0.20-stable.

Berkeley DB version should be 5.3 or higher. Here we use db-5.3.21.

Installation steps

Because FastDFS is binding libevent as http server, so you need install libevent first. If you have installed libevent, please make sure that the installation path is /usr. Because when FastDFS is compiling the source program, it needs to find some dependent files in this directory, or it will throw an error. If not, it is recommended to uninstall libevent, then install to /usr.

The installation of FastDHT depends on libevent and oracle Berkeley Db. If you installed libevent and db and the version is ok, do not need to install repeatedly.

The installation steps are as follows:

 

Step 1: Install libevent

  1. Decompress the libevent file. Enter the directory and input the orders as follows:

tar -xvf libevent-2.0.20-stable.tar.gz

cd libevent-2.0.20-stable

  1. Configure the installation directory. libevent should in installed in the directory of /usr. Input the following orders:

./configure --prefix=/usr

  1. Compile and install. Before compiling, you should clean. Input the following orders:

make clean

make

make install

Step 2: Install db

  1. Decompress the db file. Enter the directory and input the orders as follows:

tar -xvf db-5.3.21.tar.gz

cd db-5.3.21

  1. Configure the installation directory. Because the configure file locates in dist, and it should run in build_unix, and db should be installed in /usr, run the following orders:

cd build_unix

../dist/configure --prefix=/usr

  1. Compile and install. Before compiling, you should clean. Input the following orders:

make clean

make

make install

Step 3: Install FastDFS

  1. Decompress the FastDFS file. Enter the directory and input the orders as follows:

tar -xvf FastDFS_v4.00.tar.gz

cd FastDFS

  1. Compile and install. Input the following orders:

./make.sh clean

./make.sh

./make.sh install

Step 4: Install FastDHT

  1. Decompress the FastDHT file. Enter the directory and input the orders as follows:

tar -xvf FastDHT_v1.21.tar.gz

cd FastDHT

  1. Compile and install. Input the following orders:

./make.sh clean

./make.sh

./make.sh install