• Fastdfs的安装流程


    一.修改ip地址

    1.查看网卡一的mac地址

    cat /etc/udev/rules.d/70-persistent-net.rules

    2.修改ip地址文件

    cd /etc/sysconfig/network-scripts/

    mv ifcfg-eth0 ifcfg-eth1

    vi ifcfg-eth1

    编辑后的结果:
    2.修改ip地址文件
    DEVICE=eth1     //把eth0修改为eth1
    HWADDR=00:0c:29:33:b3:20 //修改为网卡一的mac地址
    TYPE=Ethernet
    UUID=0133d8eb-4c7c-4e04-b56e-4864782e35da
    ONBOOT=yes
    NM_CONTROLLED=no
    BOOTPROTO=dhcp
    3.重启网卡

    service network restart

    查看ip

    ifconfig

    4.vi命令

    vi 文件名 -> i -> 修改内容 -> esc -> : -> wq/q!

    二.配置Fastdfs

    1.修改client.conf

    vi /etc/fdfs/client.conf -> 把ip修改为当前虚拟机ip

    2.修改storage.conf

    vi /etc/fdfs/storage.conf -> 把ip修改为当前虚拟机ip

    3.启动fastdfs

    service fdfs_trackerd start

    service fdfs_storaged start

    4.查看是否启动成功

    netstat -unltp|grep fdfs

    5.查看监控信息

    /usr/bin/fdfs_monitor /etc/fdfs/storage.conf

    6.启动Nginx

    /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf

    7.关闭防火墙/开放防火墙 80 端口
    service iptables stop

    /sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT
    /etc/rc.d/init.d/iptables save

    注意:网络使用的是桥接模式

    8.测试Nginx

    在虚拟机里面: curl http://127.0.0.1:80

    在宿主机测试:浏览器访问 http://127.0.0.1:80

    9.测试上传

    fdfs_test /etc/fdfs/client.conf upload /root/install.log

    10.测试预览

    浏览器访问:fastdfs返回的路径:虚拟机IP地址

  • 相关阅读:
    UESTC
    Education Round 8 A
    Gym
    Gym
    hdoj 1159 Common Subsequence
    UVA
    UESTC
    51Nod 1068 Bash游戏 V3 (这规律不好找)
    51Nod 1066 Bash游戏
    51Nod 1002 数塔取数问题
  • 原文地址:https://www.cnblogs.com/htq29study/p/11604218.html
Copyright © 2020-2023  润新知