LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 04-20-2011, 12:19 PM   #1
ace09
LQ Newbie
 
Registered: Apr 2011
Posts: 9

Rep: Reputation: 0
Question


With keeping many servers updated on time, how would you implement this? Using RPM? I know it is a hassle doing it manually. Maybe I can use source code? Thanks for answering!
 
Old 04-20-2011, 12:21 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,107

Rep: Reputation: 1516Reputation: 1516Reputation: 1516Reputation: 1516Reputation: 1516Reputation: 1516Reputation: 1516Reputation: 1516Reputation: 1516Reputation: 1516Reputation: 1516
put this in crontab...

Code:
5 08 * * * /usr/bin/yum update -y
Which will update all packages on the system at a specified time.
 
Old 04-20-2011, 12:39 PM   #3
savona
Member
 
Registered: Mar 2011
Location: Bellmawr, NJ
Distribution: Red Hat / Fedora
Posts: 195

Rep: Reputation: 50
I have a small perl script I use to keep the boxes up to date.

Here is the script:


Code:
#!/usr/bin/perl
chdir '/root/scripts';
$si = $ARGV[0];
@ooo = `yum -y update`;
open(Y,">yum.out");
print Y @ooo;
close Y;
$ss = 'yum output from ' . $si;
$sss = "mail -s \"$ss\" address\@email.com < yum.out";
system($sss);

This will create a file called yum.out and email it to you. I like to know what is being updated, specially when it's a kernel update.

then I set cron to run it using the name of the machine as a argument:

Code:
10 3 * * * /root/scripts/yum.cron.pl Hostname
 
Old 04-20-2011, 03:12 PM   #4
arizonagroovejet
Senior Member
 
Registered: Jun 2005
Location: England
Distribution: openSUSE, Fedora, CentOS
Posts: 1,088

Rep: Reputation: 196Reputation: 196
Both the answers so far say to use yum but the OP hasn't indicated which version of Linux they're using. If it's a current SUSE distro, zypper is the tool to use.

Keeping servers up to date using source code would be a lot harder than using whatever package management your distro uses.


'Question' is a useless title for a thread and example of the sort of things the new post dialogue tells you not to use. Change it to something which reflects what you're thread is about.
 
  


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
basic html question - download link to files on my webpage question Davno Linux - Server 5 12-25-2009 08:24 AM
linux distro question & mysql install question natalie.aloi Linux - Newbie 5 07-19-2009 09:28 PM
Question, Apples Contribution to Open Source + MacOs file structure question Higgy3k Other *NIX 5 07-25-2005 05:23 AM
Not your regular GRUB question - just a short question for a fried MBR!! ziphem Linux - General 3 01-31-2005 02:51 PM
login prompt question & kde scheme question JustinCoyan Slackware 2 06-09-2004 03:02 PM


All times are GMT -5. The time now is 03:53 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration