- rsyncd 服务搭建
- vim /etc/rsyncd.conf 配置文件内容
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29uid = root
gid = root
use chroot = no
read only = yes
#limit access to private LANs
hosts allow=10.10.1.2,10.10.1.3
hosts deny=*
max connections = 5
pid file = /var/run/rsyncd.pid
#This will give you a separate log file
log file = /opt/logs/rsync.log
#This will log every file transferred - up to 85,000+ per user, per sync
transfer logging = yes
log format = %t %a %m %f %b
syslog facility = local3
timeout = 300
# MODULE OPTIONS
[test]
path = /opt/test
list=yes
ignore errors
comment = test
exclude = .svn - 启动服务rsync 服务
1
killall rsync;/usr/bin/rsync --daemon
- 客户端同步
1
rsync -avzP rsync://10.132.35.216/test /opt/test
- 配置http代理(使用epel源)
1
2
3
4
5
6
7
8
9
10
11
12
13yum install 3proxy
a. vim /etc/3proxy.cfg
nscache 1000
timeouts 1 5 30 60 180 1800 15 60
daemon
log /opt/logs/3proxy.log D
logformat "- +_L%t.%. %N.%p %E %U %C:%c %R:%r %O %I %h %T"
rotate 2
auth iponly
allow * 10.10.0.0/16 * *
proxy -n -a -p6666 - 客户端启用http代理
- wget 等代理
1
export http_proxy=http://10.10.1.2:6666
- yum 启用http代理
1
2
3
4vim /etc/yum.conf
[main]
proxy=http://10.10.1.2:6666