CentOS610FASTDFS stand-alone mode – FASTDFS and Nginx integration configuration

Centos610 series configuration

We have completed the installation of FastDFS in Centos610FastDFS stand-alone mode-FastDFS installation, and then we will install the FastDFS scheduler.

1. Find the fast/conf directory that was previously unzipped

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

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

2. Find and unzip the fastdfs-nginx-module/src directory

Copy mod_fastdfs. conf file

cp mod_fastdfs.conf /etc/fdfs/

3. Modify mod_fastdfs.conf file

# tracker path

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
=group1

# Whether the address contains the group name
url_have_group_name
= true

# Number of storage paths
store_path_count
=1

# Storage path
store_path0
=/opt/fastdfs/data

# Number of groups
group_count
= 1

# Group configuration
[group1]
group_name
=group1
storage_server_port
=23000
store_path_count
=1
store_path0
=/opt/fastdfs/data

4. Modify http.conf

vi http.conf

Share picture

Modify it to the screenshot

5. Create soft connection

Create M00 to storage directory connection

ln -s /opt/fastdfs/data/M00

6.nginx installation

During the nginx installation process, please click to connect nginx installation

The difference is: nginx needs to add the fastdfs-nginx-module-master installation module, and Enable https_ssl module

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

After nginx is installed

7. nginx configuration

cd /usr/local/nginx/conf

mkdir siteconf

vi nginx .conf

Before the first server configuration in the http node, add include siteconf/*.conf

Save and exit

cd siteconf

< p> vi fastdfs.conf

# Add a new service, open the configuration before monitoring Port number

server {
listen
9100; #corresponds to the port number previously opened by tracker.conf
server_name localhost;

location
/ {
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 {
root html;
}
}

So far, nginx installation based on fastdfs-nginx-module is complete

< p> Start nginx

service nginx start

# tracker path

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
=group1

# Whether the address contains the group name
url_have_group_name
= true

# Number of storage paths
store_path_count
=1

# Storage path
store_path0
=/opt/fastdfs/data

# Number of groups
group_count
= 1

# Group configuration
[group1]
group_name
=group1
storage_server_port
=23000
store_path_count
=1
store_path0
=/opt/fastdfs/data

# Add a service, before listening Configure the open port number

server {
listen
9100; #corresponds to the port number previously opened by tracker.conf
server_name localhost;

location
/ {
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 {
root html;
}
}

Leave a Comment

Your email address will not be published.