Configuring the Storage Server
- 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.
- Create a base data directory for the storage server.
mkdir -p /home/dfs/storage
- Start the storage server and set it to start upon system startup.
- Start the storage server.
service fdfs_storaged start
- 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
- Start the storage server.
Parent topic: Deploying FastDFS on a Single Node