Rate This Document
Findability
Accuracy
Completeness
Readability

Configuring the Environment

  1. Obtain the installation packages listed in OS and Software Requirements and upload the required packages to the corresponding directory (/usr/local/src is used as an example).
  2. Go to the /usr/local/src directory.
    cd /usr/local/src
  3. Install the dependencies.
    yum install git gcc gcc-c++ make automake autoconf libtool pcre pcre-devel zlib zlib-devel openssl-devel wget vim -y
  4. Install libfastcommon.
    1. Decompress the package and go to the installation path.
      tar -zxvf libfastcommon-1.0.43.tar.gz
      cd libfastcommon-1.0.43
    2. Perform compilation and installation.
      ./make.sh && ./make.sh install
  5. Install FastDFS.
    1. Go to the /usr/local/src directory of the installation package.
      cd /usr/local/src
    2. Decompress the package and go to the installation path.
      tar -zxvf fastdfs-6.06.tar.gz
      cd fastdfs-6.06
    3. Perform compilation and installation.
      ./make.sh && ./make.sh install
    4. Copy related configuration files.
      cp /etc/fdfs/tracker.conf.sample /etc/fdfs/tracker.conf
      cp /etc/fdfs/storage.conf.sample /etc/fdfs/storage.conf
      cp /etc/fdfs/client.conf.sample /etc/fdfs/client.conf # Client file used for testing
      cp /usr/local/src/fastdfs-6.06/conf/http.conf /etc/fdfs/ # For Nginx access
      cp /usr/local/src/fastdfs-6.06/conf/mime.types /etc/fdfs/ # For Nginx access
  6. Install fastdfs-nginx-module.
    1. Go to the /usr/local/src directory of the installation package.
      cd /usr/local/src
    2. Decompress the fastdfs-nginx-module installation package and copy the mod_fastdfs.conf file to the /etc/fdfs directory.
      tar -zxvf fastdfs-nginx-module-1.22.tar.gz
      cp /usr/local/src/fastdfs-nginx-module-1.22/src/mod_fastdfs.conf /etc/fdfs
  7. Install Nginx.
    1. Go to the /usr/local/src directory of the installation package.
      cd /usr/local/src
    2. Obtain the installation package.
      wget http://nginx.org/download/nginx-1.16.1.tar.gz
    3. Decompress the package and go to the installation path.
      tar -zxvf nginx-1.16.1.tar.gz
      cd nginx-1.16.1/
      ./configure --add-module=/usr/local/src/fastdfs-nginx-module-1.22/src/
    4. Perform compilation and installation.
      make && make install
    5. Modify environment variables.
      vim /etc/profile
      PATH=$PATH:/usr/local/nginx/sbin
    6. Make the environment variables take effect.
      source /etc/profile