Centos610FastDFS stand-alone mode -FastDFS integration with Nginx configuration Centos610FastDFS install stand-alone mode -FastDFS

 Centos610 Series Configuration

We Centos610FastDFS stand-alone mode -FastDFS installation has been completed FastDFS installation, then we install FastDFS scheduler.

1. Find the previous extract from the fast / conf directory

   Copy http.conf, mime.types, mod_fastdfs.conf anti-steal.jpg file

  cp http.conf meme.types mod_fastdfs.conf anti-steal.jpg /etc/fdfs/

2. Locate the unzipped fastdfs-nginx-module / src directory

   File copy mod_fastdfs.conf

   mod_fastdfs.conf cp / etc / FDF /

3. Modify mod_fastdfs.conf file

Path Tracker # 
base_path = / opt / FastDFS / Tracker 

# Tracker service 
tracker_server = 192.168 . 125.139 : 22122 

# Storage service port number 
storage_server_port = 23000 

# Group name 
GROUP_NAME = named group1 

contains the group name in the address # 
url_have_group_name = to true 

number storage path # 
store_path_count = . 1 

# storage path 
store_path0 = / opt / FastDFS / Data 

number of packets # 
GROUP_COUNT = . 1 

# packet configuration 
[named group1] 
GROUP_NAME = named group1
storage_server_port=23000
store_path_count=1
store_path0=/opt/fastdfs/data

4. Modify http.conf

 vi http.conf

 

 Modified to look like the screenshot

 

5. Create a soft link

   Create a directory connected to the memory M00

  ln -s /opt/fastdfs/data/M00

6.fastdfs-nginx-module, nginx download

   6.1.FastDFS-nginx-module installation

     a. download the package

             wget https://github.com/happyfish100/fastdfs-nginx-module/archive/master.zip

        unzip master.zip

    6.2Nginx Download

        # wget https://nginx.org/download/nginx-1.9.9.zip

         wget https://nginx.org/download/nginx-1.9.9.tar.gz

        

7.nginx installation

   nginx installation process, please click on the link nginx installation

   The difference is: nginx need to add fastdfs-nginx-module-master install the module, and the module is enabled https_ssl

   ./configure --add-module=../fastdfs-nginx-module-master/src/ --with-http_ssl_module

   After installing nginx

 8.nginx Configuration

    cd /usr/local/nginx/conf

    mkdir siteconf

     force nginx.conf

     Before http node inside the first server configuration, add include siteconf / *. Conf

    Save and exit

    cd siteconf

    there fastdfs.conf

   

# Add a service open configuration before listening port number 
Server { 
    the listen     9100 ; tracker.conf before opening the corresponding port number # 
    server_name localhost; 

    LOCATION / { 
        the root HTML; 
        index index.html index.htm; 
    } 

    LOCATION ~ / Group ([ 0 - . 9 ]) / M00 { 
        ngx_fastdfs_module; 
    } 
    
    error_page 500  502  503  504 / 50x.html; 
    LOCATION = / 50x.html { 
        the root HTML; 
    } 
}

 

  At this point based on fastdfs-Module-nginx nginx installation is complete

   Start nginx

  service nginx start

  Browser and enter http://192.168.125.139

  If the page is displayed instructions to install nginx success, on the contrary you need to check the configuration

 

Guess you like

Origin www.cnblogs.com/oumi/p/11281370.html