我要评分
获取效率
正确性
完整性
易理解

Configuring the Storage Server

  1. Open the storage.conf file.
    vim /etc/fdfs/storage.conf

    Modify lines 24, 49, 129, 145, and 352 as follows:

    port=23000
    base_path=/home/dfs/storage
    store_path0=/home/dfs/storage
    tracker_server=192.168.1.1:22122
    http.server_port=80

    Parameter description:

    • port: storage service port. The default value is 23000. Generally, you do not need to change the value.
    • base_path: root directory for storing data and log files
    • store_path0: the first storage directory
    • tracker_server: IP address and port of the tracker server. Change the IP address based on actual conditions.
    • http.server_port: port for accessing files through HTTP. The default value is 8888. The value must be the same as that in Nginx.
  2. Create a base data directory for the storage server.
    mkdir -p /home/dfs/storage
  3. Start the storage server and set it to start upon system startup.
    1. Start the storage server.
      service fdfs_storaged start
    2. Enable automatic startup.
      chkconfig fdfs_storaged on
    • If the tracker server is started successfully for the first time, the data and logs directories are created in /home/dfs/storage (the configured base_path).
    • Stop the storage server.
      service fdfs_storaged stop