In the previous section we set up a single-node Fastdfs system, but it is not enough to build the system, we must configure the FASTDFS to make the system run correctly.
I. Environmental statement
We're still like the last time. First, let's talk about the environment. We use VirtualBox installed Ubuntu 14.04 TLS 64-bit virtual machine, with the Network Bridge network card, so the virtual opportunity has a and native in the same network segment IP address, so that the purpose is to configure the server to access the virtual machine after the completion of the computer, check whether the file is really able to download down.
All of the commands in this article are executed under the root user.
Second, configure tracker Server
Modify the%fastdfs%/conf/tracker.conf file and modify the following
base_path=/home/xing/fastdfs
You can specify the directory location yourself, but the directory must exist to store information such as logs and storage server, or tracker server cannot start
If your HTTP port is already occupied, then you have to change it to another port, the default port is 8080, if your machine 8080 is Apache occupied, then this can also use 8080, because Fastdfs is actually using Apache, I stay here unchanged
http.server_port=8080
Reserved storage area for the system, default to 10%, here I keep the default
reserved_storage_space = 10%
Here is the port that tracker server serves for storage server, using the default
port=22122
All other options remain the default. Execute the following command to start tracker Server.
fdfs_trackerd %FastDFS%/conf/tracker.conf
Enter/home/xing/fastdfs/logs/trackerd.log to view tracker's startup log, and if you see a similar message, the startup is successful.
Third, configure storage Server
Modify the%fastdfs%/conf/storage.conf file.
Like tracker.conf, we set up the same directory, which is used to store information about log and group.
base_path=/home/xing/fastdfs
Where the file is stored, you can specify multiple storage locations on one storage server, in order to facilitate the management I simply set the storage location and the log directory is just the same, you can actually change this directory according to your own needs, upload files uploaded to the server is stored in this directory.
store_path0=/home/xing/fastdfs
The group to which this server belongs must be specified, and the default is group1.
group_name=group1
Modified to Tracker server IP and port information, according to their actual situation to modify, everyone is different.
tracker_server=211.87.226.134:22122
After the configuration is complete, we use the following command to start the storage Server.
fdfs_storaged %FastDFS%/conf/storage.conf
This time will create a large list of directories, waiting for the completion of the/home/xing/fastdfs/logs/storage.log under the log, if you see a similar message to indicate success.
Distributed File storage Fastdfs (iii) FASTDFS configuration