RSYNC --The tool every Admin should know
0 comments 8/24/2009 01:28:00 AM Posted by Surendra Kumar AnneLabels: Administration, Backup/Restore-Mgmt, File Sharing Servers, How-To's, Tutorials
Recently I came accross rsync utility... Its an awesome command it is a sub service under xinetd along with some other services such as tftp, rcp, rsh, rlogin, telnet etc..
Let us list advantages of this command then we will know how to configure it.
Advantages of rsync :
Configuration : rsync
Some points to be remembered when dealing with rsync
#yum install xinetd
Step2 : Configure rsync to allow connections, the configuration file for rsync is located in /etc/xinetd.d
#cd /etc/xinetd.d
#vi rsync
# default : off
# description: The rsync server is a good addition to an ftp server, as it \
# allows crc checksumming etc.
service rsync
{
disable = yes
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
}
In this configuration file just change disable = yes to no, then save the file and exit. Here is the updated configured file.
# description: The rsync server is a good addition to an ftp server, as it \
# allows crc checksumming etc.
service rsync
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
}
Step3 : Start the rsync service, so how to do it? As i mention earlier that rsync is a part of xinetd service so just restart the xinetd service.
#service xinetd restart
Step4 : Permanently on the service
#chkconfig rsync --levels 345 on
Same configurations should be done on the other system too, in order to rsync executed properly.
Let us list advantages of this command then we will know how to configure it.
Advantages of rsync :
- This tool will keep both the destination and source folder synced.
- rsync is fast, because it will not copy entire data every time it got synced, it just copes the date which got changed from previous copy.
- For security reasons, rsync will support ssh to transfer data between two machines.
- rsync is used to download RPM updated repository to local machine.
Configuration : rsync
Some points to be remembered when dealing with rsync
- This utility is the part of xinetd so there is no special package for this.
- When we are doing rsync between two systems, both the systems should be configured to allow rsync connections.
- rsync uses 873.
#yum install xinetd
Step2 : Configure rsync to allow connections, the configuration file for rsync is located in /etc/xinetd.d
#cd /etc/xinetd.d
#vi rsync
# default : off
# description: The rsync server is a good addition to an ftp server, as it \
# allows crc checksumming etc.
service rsync
{
disable = yes
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
}
In this configuration file just change disable = yes to no, then save the file and exit. Here is the updated configured file.
# description: The rsync server is a good addition to an ftp server, as it \
# allows crc checksumming etc.
service rsync
{
disable = no
socket_type = stream
wait = no
user = root
server = /usr/bin/rsync
server_args = --daemon
log_on_failure += USERID
}
Step3 : Start the rsync service, so how to do it? As i mention earlier that rsync is a part of xinetd service so just restart the xinetd service.
#service xinetd restart
Step4 : Permanently on the service
#chkconfig rsync --levels 345 on
Same configurations should be done on the other system too, in order to rsync executed properly.
Implementing ext3 partations and mounting
0 comments 8/20/2009 10:02:00 AM Posted by Surendra Kumar AnneLabels: Administration, Disk-Mgmt, Videos
[埋込みオブジェクト:http://www.youtube.com/v/VxV5-kx1X3M&hl=en&fs=1&]
Implementing ext2 mounting
0 comments 8/19/2009 10:04:00 AM Posted by Surendra Kumar AnneLabels: Administration, Disk-Mgmt, Videos
[埋込みオブジェクト:http://www.youtube.com/v/LqF_86iwjIs&hl=en&fs=1&]
Unconfiguring RAID5 in Redhat
0 comments 8/18/2009 10:03:00 AM Posted by Surendra Kumar AnneLabels: Administration, Disk-Mgmt, Videos
[埋込みオブジェクト:http://www.youtube.com/v/1J9UX75tRfA&hl=en&fs=1&]
Implementing RAID5
0 comments 8/17/2009 10:01:00 AM Posted by Surendra Kumar AnneLabels: Administration, Disk-Mgmt, Videos
[埋込みオブジェクト:http://www.youtube.com/v/gWEm1JulAvg&hl=en&fs=1&]
Unconfiguring RAID1 in Redhat
0 comments 8/16/2009 09:56:00 AM Posted by Surendra Kumar AnneLabels: Administration, Disk-Mgmt, Videos
[埋込みオブジェクト:http://www.youtube.com/v/o3sNky6zmDs&hl=en&fs=1&]
Implementing RAID1
0 comments 8/15/2009 10:00:00 AM Posted by Surendra Kumar AnneLabels: Administration, Disk-Mgmt, Videos
[埋込みオブジェクト:http://www.youtube.com/v/PrxkE2TKvdI&hl=en&fs=1&]
Unconfiguring RAID0
0 comments 8/14/2009 09:56:00 AM Posted by Surendra Kumar AnneLabels: Administration, Disk-Mgmt, Videos
[埋込みオブジェクト:http://www.youtube.com/v/EZ42aa0Aj8Y&hl=en&fs=1&]
Implementing RAID0
0 comments 8/13/2009 09:56:00 AM Posted by Surendra Kumar AnneLabels: Administration, Disk-Mgmt, Videos
Here in this Video you will see how to implement RAID0
[埋込みオブジェクト:http://www.youtube.com/v/AH2nWSW9E_Q&hl=en&fs=1&]
FILE'S and FOLDER'S Part-2
0 comments 8/12/2009 02:20:00 AM Posted by Surendra Kumar AnneLabels: Basic-Commands, Basics, How-To's, Tutorials
FILES & FOLDERS PART-II
CREATING FOLDERS :
Cmd4a : Creating a single folder.
Example :
#mkdir test
Cmd4b : Creating multiple folders at a time
#mkdir 1{1,2,3}
This command will create folders with name 11,12,13. You can see weather this folders are created or not by using ls or dir command.
Cmd4c : Creating multiple directories and sub directories at a time. This is very much advanced and very much useful command. Some times we have to create a directory structure with sub directories in it. Which are not exist before.
For example I want to create the directory structure as below
/test
/ \
/ \
/ \
user1 user2
/ \ / \
/ \ / \
/ \ / \
apple goa pine tom
So if I want to create these many folders at a time i have to execute the following commands.
First i have to create test directory, then I have to change the directory to it and the create two more directories as user1 and user2 and so on as below.
#mkdir test
#cd test
#mkdir user1
#mkdir user2
#cd user1
#mkdir apple
#mkdir goa
#cd ..
#cd user2
#mkdir pine
#mkdir tom
So you see these many commands i have to execute to create that directory structure. But in linux, its very much easy if you know this option with mkdir command. Execute the mkdir command with -p option it will create subdirectories though they didnt exist.
#mkdir -p test/{user1/{apple,goa}, user2/{pine,tom}}
Thats it you are done. This will create all the folders and sub folders.
Plese visit for remaining posts on files and folders operations..
0
comments
8/08/2009 02:19:00 AM
Posted by
Surendra Kumar Anne
Labels: Basic-Commands, Basics, How-To's, Tutorials
Please check linuxnix.com for updates.
Cmd2 : Creating files using cat command in combination of output redirecting operator(>)
#cat > filename
Once enter this command you have to enter the content of the file and once you finish it just press Ctrl+dthis will save the file. Use again ls command to display the files created.
Cmd3 : Creating a file with any editor(either VI,emacs etc)
#vi filename
Once you execute this command the file will be opened and in order to enter any data we have to first press i to go in to insert mode. Once you type the content in to the file just press esc and :wq to save and quit the file.
Have look at other related posts too.
Like the post? Please Subscribe to free RSS feed to get updates
Labels: Basic-Commands, Basics, How-To's, Tutorials
FILES & FOLDERS PART-I
There is one saying in Linux/*nix world, that if you can play with files and folders in Unix you are almost there to become a Unix expert. So let us start our first lesson to become Unix expert by learning about files and folder operations.
CREATING FILES:
Cmd1 : Use touch command to create empty file's
Cmd1 : Use touch command to create empty file's
to create file's
SYNTAX:
#touch filename
Example:
#touch test
#touch test
To create multiple files at a time..
#touch {filename1 filename2 filename3}
#touch {1,2,3}{4,5,6}
The above command will create files with 14,15,16,24,25,26,34,35,36 as names by using this you can create n number of files at a time.
For checking weather your files/folders are created you can use ls command.
#touch {1,2,3}{4,5,6}
The above command will create files with 14,15,16,24,25,26,34,35,36 as names by using this you can create n number of files at a time.
For checking weather your files/folders are created you can use ls command.
Please check linuxnix.com for updates.
Cmd2 : Creating files using cat command in combination of output redirecting operator(>)
#cat > filename
Once enter this command you have to enter the content of the file and once you finish it just press Ctrl+dthis will save the file. Use again ls command to display the files created.
Cmd3 : Creating a file with any editor(either VI,emacs etc)
#vi filename
Once you execute this command the file will be opened and in order to enter any data we have to first press i to go in to insert mode. Once you type the content in to the file just press esc and :wq to save and quit the file.
Have look at other related posts too.
Installing YUM server in RHEL4
0 comments 8/05/2009 12:33:00 AM Posted by Surendra Kumar AnneLabels: Administration, Package-Mgmt
If you are looking for YUM server in RHEL5 you can clickhere other wise just read on..
Recently I came across a strange issue.. ie implementing YUM(Yellow dog Updater and Modifier) server in RHEL4 :(. By the time of RHEL4 released there is no YUM server implementation..
Recently I came across a strange issue.. ie implementing YUM(Yellow dog Updater and Modifier) server in RHEL4 :(. By the time of RHEL4 released there is no YUM server implementation..
so I did some research and collected some documentation on net and implemented YUM server in RHEL4
configuring YUM server in RHEL4 as follows..
Stpe1:Download following packages
sqlite-2.8.16-1.2.el4.rf.i386.rpm
python-sqlite-0.5.0-1.2.elr4.rf.i386.rpm
python-urlgrabber-2.9.6-1.2.el4.rf.noaarch.rpm
pytyhon-elementtree-1.26-1.2.el4.rf.noarch.rpm
python-celementtree-1.0.2-1.2.el4.rf.i386.rpm
yum-2.4.2-1.noarch.rpm
yum-utils-0.3.1-1.fc4.noarch.rpm ( we need for repository)
createrepo-0.3.1-1.noarch.rpm
Stpe2: Install the above mention packages in the same sequence once you download them.
rpm -Uvh sqlite-2.8.16-1.2.el4.rf.i386.rpm
rpm -Uvh python-sqlite-0.5.0-1.2.elr4.rf.i386.rpm
rpm -Uvh python-urlgrabber-2.9.6-1.2.el4.rf.noaarch.rpm
rpm -Uvh pytyhon-elementtree-1.26-1.2.el4.rf.noarch.rpm
rpm -Uvh python-celementtree-1.0.2-1.2.el4.rf.i386.rpm
rpm -Uvh yum-2.4.2-1.noarch.rpm
rpm -Uvh yum-utils-0.3.1-1.fc4.noarch.rpm
rpm -Uvh createrepo-0.3.1-1.noarch.rpm
Step3:Now dump your rpms from your RHEL4 cds/dvd
cp -ar * /var/ftp/pub/Server/
Step4: Create repository
#createrepo -v /var/ftp/pub/Server/
Here yum server will create a repository and metadata once creation of metadata is done we can configure yum client on the same mechine.. as follows
Step5:Creating a repo file and updating with the repository details
#vi /etc/yum.repo.d/server.repo
[server]
name= Redhat repository
baseurl=file:///var/ftp/pub/Server
gpgcheck=0
save the file and exit and start using yum to install packages in RHEL4.
Subscribe to:
Comments (Atom)