CENTOS6 Environment Single Server Fastdfs+nginx+fastdfs-nginx-module installation configuration

Source: Internet
Author: User

But because the company internal testing Fastdfs server has a change, so have to re-build, not built before, so toss for two days, found many configuration documents on the Internet, but many problems. Finally, I found a successful building.

.

Install Fastdfs and Nginx required plugins

Yum install gettext gettext-devel libxft libxft-devel libxpm libxpm-devel automake autoconf libxtst-devel gtk+-devel gcc g Cc-c++zlib-devel libpng-devel gtk2-devel glib-devel pcre*
Fastdfs download page Address http://sourceforge.net/projects/fastdfs/files/

Nginx download page Address http://sourceforge.net/projects/fastdfs/files/

Fastdfs-nginx-module download page Address http://sourceforge.net/projects/fastdfs/files/FastDFS%20Nginx%20Module%20Source%20Code/


/configure--user=nginx--group=nginx--prefix=/usr/local/nginx--add-module=. /fastdfs-nginx-module/src
1. The system environment relies on the library to install itself .

Centosip Address 192.168.1.11
tracker1:192.168.1.11 storage1:192.168.1.11
2. Compiling the installation configurationFastdfs_v4.06.tar.gz
. Compiling the installation(1) VI make.sh with_linux_service=1
(2)./make.sh./make.sh Install
Tracker Configuration(1) vi/etc/fdfs/tracker.conf
Base_path=/home/tracker1/fastdfs
(2) Mkdir-p/home/tracker1/fastdfs
(3) Service Fdfs_trackerd start
(4) Netstat-ntl TCP 0 0 0.0.0.0:22122
Storage Configuration(1) vi/etc/fdfs/storage.conf
Http.server_port=80
Group_name=group1
Base_path=/home/storage1/fastdfs
Store_path0=/home/storage1/fastdfs T
racker_server=192.168.1.11:22122
(2) Mkdir-p/home/storage1/fastdfs
(3) Service fdfs_storaged start
(4) Netstat-ntl TCP 0 0 0.0.0.0:23000


0.0.0.0:*


LISTEN


0.0.0.0:*


LISTEN


3. Installation Configurationnginx-1.4.4 and Fastdfs-nginx-module_v1.15.tar.gz
(1)/configure--prefix=/usr/local/nginx--add-module=/home/fastdfs-nginx-module/src
Make make Install
(2) cp/home/fastdfs-nginx-module/src/mod_fastdfs.conf/etc/fdfs/
Vi/etc/fdfs/mod_fastdfs.conf
Base_path=/home/storage1/fastdfs
tracker_server=192.168.1.11:22122
Group_name=group1
Url_have_group_name = True
Store_path0=/home/storage1/fastdfs
(3) Mkdir-p/home/storage1/fastdfs
(4) vi/usr/local/nginx/conf/nginx.conf
User root;
location/group1/m00 {root/home/storage1/fastdfs/data;

Ngx_fastdfs_module;

}
(5) Ln-s/home/storage1/fastdfs/data/home/storage1/fastdfs/data/m00
(6) Service iptables stop
cd/usr/local/nginx/sbin/
./nginx
4. Test (1) vi/etc/fdfs/client.conf
Base_path=/tmp
tracker_server=192.168.1.11:22122
Http.tracker_server_port=80
(2)/usr/local/bin/fdfs_test/etc/fdfs/client.conf upload test.txt
(3) Use the browser to open the returned connection, and return the content consistent with Test.txt, indicating success


This article installs

CENTOS6 Environment Single Server Fastdfs+nginx+fastdfs-nginx-module installation configuration

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.