LAMP 网页镜像同步
2011-11-27 02:08
218 查看
同步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 表示时间秒
本文出自 “我是一只小小鸟” 博客,请务必保留此出处http://litclive.blog.51cto.com/628198/726119
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 表示时间秒
本文出自 “我是一只小小鸟” 博客,请务必保留此出处http://litclive.blog.51cto.com/628198/726119
相关文章推荐
- Cache之过: 网页或头像 无法 同步更新
- 使用Linux的rsync命令实现:多服务器镜像同步
- Docker + CentOS7 + LAMP + memcached 镜像
- 一步一步教你网站数据库同步镜像
- 同步、更新、下载Android Source & SDK from 国内镜像站
- 两台服务器网站同步镜像
- 原生JS的网页手机音乐播放器 歌词同步播放
- 数据库同步产品对比三(PAC vs 浪擎镜像产品)
- UIWebView发送异步(同步)请求加载网页
- 如何快速发现网站恶意镜像与网页劫持?
- Lsyncd搭建同步镜像-用Lsyncd实现本地和远程服务器之间实时同步
- 一步一步教你网站同步镜像(转载)
- 一步一步教你网站同步镜像
- [php]同步下载html网页下的图片
- 利用Unison实现双向同步镜像
- 同步、更新、下载Android Source & SDK from 国内镜像站
- docker 加载ushios/lamp-ubuntu 镜像
- 网站同步镜像制作!
- OpenStack-heat笔记之为diskimage-builder编写elements生成一个lamp镜像