fastfdfs with nginx
- Download fastdfs-nginx-module module
- wget https://github.com/happyfish100/fastdfs-nginx-module/archive/5e5f3566bbfa57418b5506aaefbe107a42c9fcb1.zip
- unzip 5e5f3566bbfa57418b5506aaefbe107a42c9fcb1.zip
- mv fastdfs-nginx-module-5e5f3566bbfa57418b5506aaefbe107a42c9fcb1 fastdfs-nginx-module-master
- Download nginx
- Installation depends
- 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 depends
- Copy Profile fastdfs-nginx-module of the source / etc / fdfs directory, and modify
- mod_fastdfs.conf cp / etc / FDF /
- vim /etc/fdfs/mod_fastdfs.conf
-
1 # connection time 2 connect_timeout The = 10 . 3 . 4 # Tracker Server . 5 tracker_server = IP and port number of Tracker Server . 6 . 7 # StorageServer default port . 8 storage_server_port = 23000 . 9 10 # If uri document ID contained / ** Group , the to set to true . 11 url_have_group_name = to true 12 is 13 is # store_path0 the Storage path configuration, the same must storage.conf 14 store_path0 store_path0 = Storage path configuration, and must be consistent in storage.conf
- Enter conf fast_dfs installation package
- cp anti-steal.jpg http.conf mime.types /etc/fdfs/
- Configuration nginx.conf
- Find nginx.conf
-
Add this line to start the nginx
- /usr/local/nginx/sbin/nginx
- upload image
- fdfs_upload_file /etc/fdfs/client.conf 856154-20171011135658074-1715166829.png
-
- Open a browser to access
-
carry out