FastDFS-5.05 Tracker Server Installation nginx+php

Source: Internet
Author: User
Tags install php

1. Next, Fastdfs installed Nginx, install PHP program for development upload and call, install Fdfs PHP module, if you install PHP

Cd/usr/local/src/fastdfs-5.05/php_client//usr/local/php/bin/phpize./configure--with-php-config=/usr/local/php/ Bin/php-configmake && make INSTALLLL/USR/LOCAL/PHP-5.6.20/LIB/PHP/EXTENSIONS/NO-DEBUG-NON-ZTS-20131226/CP /usr/local/src/php-5.6.20/php.ini-production/usr/local/php/lib/phh.ini

2. Append the Fdfs file to the PHP file

Cd/usr/local/src/fastdfs-5.05/php_client/vim fastdfs_client.inicat Fastdfs_client.ini >>/usr/local/php/lib/ Ini

3. Check if PHP is normal in Fastdfs

[Email protected] fdfs]#/usr/local/php/bin/php/usr/local/src/fastdfs-5.05/php_client/fastdfs_test.php 5.05fastdfs_tracker_make_all_connections Result:1array (1) {  ["G1"]=>    int (0) file exist:1token= F6aeb826add3678e438582ca65683443file Content:thisisatest. (Storage_download_file_to_file1 result:1storage_set_metadata1 result:1string ()) "G1/m00/00/00/ RBABKVe8AKKAJpMZAAAAD61kmgs955.part2.txt "Delete file G1/m00/00/00/rbabkve8akkajpmzaaaad61kmgs955.part2.txt return : 1delete file G1/m00/00/00/rbabkve8akkajpmzaaaad61kmgs955.bin Return:1bool (True) tracker_close_all_connections Result:1

4.php Client Testing

[[email protected] web_test]# echo ' php_upload_test '  >/tmp/upload.txt[[email protected] web_test]# vim test.php <?php        var_dump (function_exists (' fastdfs_storage_upload_by_filename '));         $ret = Fastdfs_storage_upload_by_filename ('/tmp/upload.txt ');         Var_dump ($ret);?>

5. Upload Effect

[[email protected] web_test]#/usr/local/php/bin/php Test.phpbool (True) array (2) {  ["group_name"]=>  String (2) "G1"  ["filename"]=>  string "M00/00/00/rbabkve4oo6azt5naaaaeixdrhw352.txt"}

Http://192.168.1.29/G1/M00/00/00/rBABKVe4oo6AZT5NAAAAEIxdRHw352.txt

FastDFS-5.05 Tracker Server Installation nginx+php

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.