fastfdfs with nginx
- download fastdfs-nginx -module module
- wget https://github.com/happyfish100/fastdfs-nginx-module/archive/5e5f3566bbfa57418b5506aaefbe107a42c9fcb1.zip
- unzip 5e5f3566bbfa57418b5506aaefbeli107a42c9fcb1.zip fastdfs-nginx-module-5e5f3566bbfa57418b5506aaefbe107a42c9fcb1 fastdfs-nginx-module-master
- Download nginx
- Installation dependencies
- sudo apt-get install build-essential
- sudo apt-get install libtool
- sudo apt-get update
- sudo apt-get install libpcre3 libpcre3-dev
- sudo apt-get install zlib1g-dev
- sudo apt-get install openssl
- wget -c https://nginx.org/download/ nginx-1.12.1.tar.gz
- tar -zxvf nginx-1.12.1.tar.gz
- cd nginx-1.12.1
- ./ configure –add-module=../fastdfs-nginx-module-master/src
- make && make install
- Installation dependencies
- Copy the configuration file in the fastdfs-nginx-module source code to the /etc/fdfs directory, and modify
- cp mod_fastdfs.conf / etc/fdfs/
- vim /etc/fdfs/mod_fastdfs.conf
-
1 # Connection timeout
2 connect_timeout=10
3
4 # Tracker Server
5 tracker_server=Tracker Server ip and port number
6
7 # StorageServer default port
8 storage_server_port=23000
9
10 # If the uri of the file ID contains /group**, set it to true
11 url_have_group_name = true
12
13 # The store_path0 path configured by Storage must be the same as that in storage.conf
14 store_path0= The store_path0 path configured by Storage must be the same as that in storage.conf< /li>
- Enter the conf in the fast_dfs installation package
- cp anti-steal.jpg http.conf mime.types /etc/fdfs/
- Configure nginx.conf
- Find nginx.conf
-
Add this line to start nginx
- /usr/local/nginx/sbin/nginx
- Upload a picture
- fdfs_upload_file /etc/fdfs/client.conf 856154-20171011135658074-1715166829.png
- Open the browser to access
-
Done
ul>
< pre> 1 # Connection timeout
2 connect_timeout=10
3
4 # Tracker Server
5 tracker_server=Tracker Server ip and port number
6
7 # StorageServer default port
8 storage_server_port=23000
9
10 # If the uri of the file ID contains /group**, set it to true
11 url_have_group_name = true
12
13 # The store_path0 path configured by Storage must be the same as that in storage.conf
14 store_path0= The store_path0 path configured by Storage must be the same as that in storage.conf
< p>