Linux安全网 - Linux操作系统_Linux 命令_Linux教程_Linux黑客

会员投稿 投稿指南 本期推荐: 强烈推荐:Ylmf OS 3.0 正式版发布附迅雷高 XP系统下硬盘安装Fedora 14图文教程
搜索:
您的位置: Linux安全网 > Linux入门 > » 正文

LAMP 网页镜像同步

来源: liming004 分享至:

 同步rsyncd设置  rsyncd软件包

    1. rsyncd配置文件       vi /etc/rsyncd.conf        uid=root      gid=root      use chroot=no      max connections=20        pid file= /var/run/rsyncd.pid      lock file= /var/run/rsyncd.lock      log file= /var/run/rsyncd.log      [web]         path=/var/www/html/bbs/       lgnore errors       read only=yes       hosts allow=169.254.1.0/16       hosts  deny = 0.0.0.0/32     2. 启动rsync 守护进程       /usr/bin/rsync --daemon -----------------------------------------------   mkdir /var/www/html/bbs/   vi /var/www/html/bbs/abc.txt     在本机上测试 rsync -av 169.254.1.233::web /tmp/bbs/  测试本地同步     在客户机上测试          rsync -av 169.254.1.233::web ./bbs/  测试非本地同步           --------------------------------------   windows 客户端批处理       2秒中自动同步     @echo off :1 echo 同步中     rsync -av 169.254.1.233::web \bbs\   ping 127.0 -n 2 >nul 2>nul   goto 1   -----------------------------------------   linux 自动同步         脚本   #!/bin/bash   while true   do      /usr/bin/rsync -av 169.254.1.233::web ./bbs/ >/dev/null 2 >&1     sleep 20   done  --------------------------------------------   rsync -vzrtopg 169.254.1.233::web ./bbs/     参数 -----------------------------------           站点压力测试         安装   tar zxvf webbench-1.5.tar.gz   cd webbench-1.5   make && make install   测试   webbench -c 650 -t 30 http://127.0.0.1/test.php   参数说明: -c 表示并发数 -t 表示时间秒  

Tags:
分享至:
最新图文资讯
1 2 3 4 5 6
验证码:点击我更换图片 理智评论文明上网,拒绝恶意谩骂 用户名:
关于我们 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 发展历史