LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 08-29-2006, 05:29 PM   #1
ACDII
Member
 
Registered: Aug 2006
Posts: 87

Rep: Reputation: 16
Exclamation YUM via SSH


If I am in the middle of a YUM upgrade and I get disconnected, does it continue yumming?
 
Old 08-29-2006, 10:45 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Not normally. However, when performing remote maintenance operations, the 'screen' command is your friend. You can run multiple terminal sessions from a single login, disconnect (intentionally or accidentally), and reconnect (even from another computer at another location). The man page has all the info, but here's all you need:

1- Login as normal (via ssh, or even with a local terminal session)
2- Issue the command: screen
3- You now have what appears to be a normal session, but notice the titlebar has changed
4- To add an addition session: ctrl-a,c (ctrl-a followed by hitting the letter 'c')
5- To end a session, exit as you normally would. You will drop back to other sessions, until you finally exit screen.
6- To switch sessions: ctrl-a,number (where number is the session - for example ctrl-a,1 or ctrl-a,2)
7- To disconnect: ctrl-a,d
8- To reconnect to a disconnected screen: screen -r (if there are multiple disconnected screens, you will be presented with a list).
 
Old 08-30-2006, 09:05 AM   #3
ACDII
Member
 
Registered: Aug 2006
Posts: 87

Original Poster
Rep: Reputation: 16
OK, well, I will find out soon if anything came of it. I had dropped the connection while in the middle of the update. The console is totally dead, no keyboard, mouse, or video, but ssh works fine. Happened in the middle of update through the gui.
 
Old 08-30-2006, 09:26 AM   #4
ACDII
Member
 
Registered: Aug 2006
Posts: 87

Original Poster
Rep: Reputation: 16
OK, I was able to log back in and did the screen command, worked like a charm, but tried to run YUM and got this.

# yum -y update
Loading "installonlyn" plugin
Existing lock /var/run/yum.pid: another copy is running. Aborting.


Hmm, is there any way to re-establish connection to that session?
 
Old 08-30-2006, 11:23 AM   #5
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
First, check to see if another process is actually running:

ps -Afl | grep yum

If so, then kill it: 'killall yum'. If that doesn't work (the process still shows in the 'ps' command), then 'killall -9 yum'.

If not, then the process did not clean up its lock file. Just remove it with 'rm -f /var/run/yum.pid'.

You should also clean the partially updated cache: 'yum clean all'.

You can rerun the yum command now.
 
Old 08-30-2006, 01:00 PM   #6
ACDII
Member
 
Registered: Aug 2006
Posts: 87

Original Poster
Rep: Reputation: 16
Excellent, works and I tested it running YUM and I was able to disconnect and then return to the session.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
yum question: How to update from backed up yum cache? Arodef Linux - Software 2 02-02-2010 11:42 PM
problem after yum yum yum (delicious) alaios Fedora 3 01-14-2009 02:34 AM
Yum Problem - /var/cache/yum/base/primary.xml.gz:1 ice99 Linux - Software 0 12-15-2005 01:08 PM
Yum Errors in parsing, whats wrong here (yum.conf pasted) thejokker Linux - Newbie 1 06-15-2004 02:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 11:30 AM.

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