LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-31-2013, 04:07 PM   #1
arcolombo698
Member
 
Registered: Nov 2013
Posts: 31

Rep: Reputation: Disabled
Installing Rsync


Hello. I am a novice Linux user, trying to install Rsync for the first time.

the install apt-get rsync command does not work.

how do I first install rsync application to start using it?
 
Old 12-31-2013, 04:11 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
What distro are you using? Most come with rsync pre-installed.

Also, it's not
Code:
install apt-get rsync
it's
Code:
apt-get install rsync
"apt-get" is the package management program, "install" is what you're telling it to do, and "rsync" is the name of the program you want to install.

Last edited by suicidaleggroll; 12-31-2013 at 04:13 PM.
 
Old 12-31-2013, 04:16 PM   #3
arcolombo698
Member
 
Registered: Nov 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
Installation

Hello. thank you.

yes if I type "apt-get install rsync"

my system outputs
apt-get: Command not found.


My distribution is Linux
my shell is TCSH

---------- Post added 12-31-13 at 05:16 PM ----------

Hello.

how do i see if rsync is already installed?
 
Old 12-31-2013, 04:22 PM   #4
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Linux is not a distribution. Linux is the kernel of an operating system. Distributions include the Linux kernel and a multitude of supporting software, an installer, a desktop environment, etc. You are apparently using a distribution that does not use apt-get for package management, which is why there is no apt-get on your system. apt-get is used by Debian-based distributions. Redhat and its derivatives use yum, openSUSE uses zypper, etc.

So I ask again, what distribution are you using? You can usually find out by running:
Code:
cat /etc/*release*
If you want to see if rsync is already installed, just try running "rsync".

Last edited by suicidaleggroll; 12-31-2013 at 04:23 PM.
 
Old 12-31-2013, 04:26 PM   #5
arcolombo698
Member
 
Registered: Nov 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
Authorization Keys for ssh using rsync

Hello.

I do have rsync installed on my linux distribution. how to make sure I have the right authorization keys? Do you have any resources on how to use it?
 
Old 12-31-2013, 04:27 PM   #6
arcolombo698
Member
 
Registered: Nov 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
.

thank you in advance. Here is my output, it looks as though I have CentOS as the distribution ?

CentOS release 6.2 (Final)
cat: /etc/lsb-release.d: Is a directory
CentOS release 6.2 (Final)
CentOS release 6.2 (Final)
cpe:/o:centos:linux:6:GA
 
Old 12-31-2013, 04:30 PM   #7
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Yes you're running CentOS 6.2. CentOS is based on RedHat Enterprise and uses yum for package management

Code:
yum update
Code:
yum install rsync
etc.

6.2 is quite old, you should run an update to migrate to 6.5.

Authorization keys for what?
Code:
man rsync
will tell you more about its use.
 
Old 12-31-2013, 04:38 PM   #8
arcolombo698
Member
 
Registered: Nov 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
.

Thank you for your response.

this site gives the basic information.

http://everythinglinux.org/rsync/

it says I need to set up an rsyncd.conf file under the /etc directory.

It says "You must set up a configuration file on the machine meant to be the server and run the rsync binary in daemon mode. Even your rsync client machines can run rsync in daemon mode for two-way transfers."

So for the computer that will act as my "source" or server of which I will push files from, I need to set up the configuration file.

should I just read the manual for the rsyncd.conf to set up the security options across two different servers?
 
Old 12-31-2013, 04:42 PM   #9
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Be careful where you get advice. From the website you referenced...

Quote:
You must set up one machine or another of a pair to be an "rsync server" by running rsync in a daemon mode ("rsync --daemon" at the commandline) and setting up a short, easy configuration file (/etc/rsyncd.conf). Below I'll detail a sample configuration file. The options are readily understood, few in number -- yet quite powerful.
And that simply is not true, or at least not applicable to common rsync usage.

Read the manual and learn the simple commands.

It might also be helpful to tell us what you want to use rsync for, maybe we can give some simple variations to use.
 
Old 12-31-2013, 04:43 PM   #10
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
It depends on what you're trying to do and how you plan to run it. You can run rsync through ssh without any conf files or daemon mode, as long as you have an account and rsync installed on both machines.

Code:
rsync /path/to/source user@comp2:/path/to/destination
or
Code:
rsync user@comp2:/path/to/source /path/to/destination
just like you would with cp or scp

Depending on how you set the flags you can accomplish just about anything

edit: too slow
 
Old 12-31-2013, 04:46 PM   #11
arcolombo698
Member
 
Registered: Nov 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
Uses for Rsync

thank you for your response.

I wish to use rsync as a mirroring tool to replace the command I normally use 'scp -r path/to/source/push path/to/destination/serverath/to/directory/of/files/within/server'

I usually have issues using the scp -r because I am too hasty and run scp -r on two different linux terminals and flood the destination server. novice error.


I wish to use rsync as a mirror tool such that when I run the rsync in daemon mode I can transfer over files from serverA to serverB. I also need security options set.

I am looking at the configuration manual... not to sure what is the most important things I need
 
Old 12-31-2013, 04:50 PM   #12
arcolombo698
Member
 
Registered: Nov 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
Authorization Keys for ssh using rsync

This post #2 http://www.linuxquestions.org/questi...nc-4175483358/

talks about setting up the ssh keys. I need to do this too.

advice? I will click on his links now and read through them
 
Old 12-31-2013, 04:52 PM   #13
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Just change "scp" to "rsync" and swap out "-r" with "-a". Everything else should work exactly the same.

BTW - if you want to do mirroring, you should be using the "-p" flag in scp to preserve timestamps and modes. You may find it very difficult to hunt down the file you want from the backup when they all have [basically] the same timestamp.
 
Old 12-31-2013, 04:56 PM   #14
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Quote:
Originally Posted by arcolombo698 View Post
This post #2 http://www.linuxquestions.org/questi...nc-4175483358/

talks about setting up the ssh keys. I need to do this too.

advice? I will click on his links now and read through them
If you already set it up for your scp command, then it'll work on rsync too, and ssh. If you haven't set them up at all, it's pretty easy.

On the source machine:
Code:
ssh-keygen -t dsa
or rsa, there are some subtle differences. Type in a passphrase if you want, or if you want fully password/phrase-less login just keep hitting enter until you're back at a command prompt.

When it's done, you should have a ~/.ssh/id_dsa.pub (or rsa) file, which will have a single very long line
Copy that line and paste it into the ~/.ssh/authorized_keys2 file on the destination machine (create this file if it doesn't already exist). Make sure the permissions on the destination machine are as follows
Code:
chmod 750 ~
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys2
If the permissions are too lax, ssh will deny authorization and force you to use a password.

You may need to use authorized_keys instead of authorized_keys2, it depends on how the sshd config is set on the destination machine.

Last edited by suicidaleggroll; 12-31-2013 at 04:58 PM.
 
Old 12-31-2013, 05:08 PM   #15
arcolombo698
Member
 
Registered: Nov 2013
Posts: 31

Original Poster
Rep: Reputation: Disabled
auth keys

Hello. thank you response.

In generating the ssh-keygen -t rsa

it prompts me to

[acolombo@hpc-login2 ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/rcf-13/acolombo/.ssh/id_rsa):


not too sure how to proceeed?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Installing software (flyback, rsync, sumwars) AngryAngry Slackware 4 01-02-2013 05:22 AM
rsync solaris + ld.so.1: rsync: fatal: libiconv.so.2: open failed: xxx_anuj_xxx Solaris / OpenSolaris 25 02-23-2012 03:23 AM
Query on compiling / installing rsync khandu Programming 2 08-26-2011 02:50 AM
[SOLVED] rsync execution issue with crontab - Have given full path to rsync too!! Prabagaran Linux - Server 6 04-15-2011 01:39 AM
Could I run rsync to download files from a server without rsync daemon? Richard.Yang Linux - Software 1 09-18-2009 04:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration