Users of Linux want to skillfully use Linux. So I installed a lot of software on my computer. This section describes how to configure and use rsync in Linux. I hope you can learn how to configure and use rsync in Linux. The testing environment in this test uses Redhat AS42 servers, one server and one client)
Ip address of the rsync server: 192.168.23.102
Ip address of the rsync client: 192.168.23.100
Configure the server first:
1. Install the rsync package
[Root @ rhel403 old] # rpm-q rsync
Rsync-2.6.3-1
2. rsync only uses one configuration file:/etc/rsyncd. conf.
- [Root @ rhel403 old] # more/etc/rsyncd. conf
- Uid=Nobody
- Gid=Nobody
- MaxConnections=200
- Timeout=600
- UseChroot=No
- ReadOnly=Yes
- PidFile=/Var/run/rsyncd. pid
- Host_allow=192. 168.23.100 // write the Client IP address here
- # SyslogFacility=Local7
- # LogFile=/Var/log/rsyncd. log
- # Rsync config
- # The 'standard' things
- [Rsync_gmmold] // defines the synchronization path. The client uses this keyword for Link)
- Path=/Gmm/old // path to be synchronized
- Comment=Gmmold// Unknown for the moment
3. Start the service
#/Usr/bin/rsync -- daemon
4. Add to boot
Echo "/usr/bin/rsync -- daemon">/etc/rc. local
5. Start during rsync check
# Ps-ef | grep rsync
6. Stop the service
# Kill 'cat/var/run/rsyncd. Pi'
The configuration of the client is as follows:
1. Install the rsync package
[Root @ rhel403 old] # rpm-q rsync
Rsync-2.6.3-1
2. synchronize with the server:
# Rsync-auqz 192.168.23.102: rsync_gmmold/tmp/old
After completing the preceding steps, you will learn how to configure and use rsync in Linux.
- Use logs to make Linux management easier
- Operation notes: Linux Framebuffer Programming
- Detailed introduction to Linux File Types
- Command Daquan: Linux advanced command line skills
- Introduction Linux screenshot tool: import