PDA

View Full Version : yum auto update?



urmom9388
28th May 2006, 03:48 AM
Is there a way to make yum update by itself? I have looked around and havent been able to find an answer. Also, do I really need a virus scanner on linux? I am new to the penguin and if I do need one, what do you suggest? :confused: :confused: :confused:

jbannon
28th May 2006, 04:02 AM
Use either yum update-on-boot or the version to update automatically from crontab. Update on boot is available in the extras repository.

On the virus scanner side, you don't really need one but it would be advisable to take a belt-and-braces approach and install clamav. Another tool you might want to consider is a security checked like rkhunter. However, provided you haven't disabled the firewall and Selinux it should be OK.

urmom9388
28th May 2006, 04:10 AM
can you give me some instructions on how to do this? Sorry, but I am still trying to get use to Linux (which is awesome by the way). Oh and I will try clamav

Seve
28th May 2006, 04:19 AM
can you give me some instructions on how to do this? Sorry, but I am still trying to get use to Linux (which is awesome by the way). Oh and I will try clamav
Hello:
I know that you can enable Yum to run once daily in your /System/Administration/Server Settings/Services .. which will run as long as your machine is up.
To change the time it runs etc, then you will have to edit the cron files as jbannon described.
You can read more here:http://fedora.redhat.com/docs/yum/sn-updating-your-system.html#sn-automatic-updating
Seve

jbannon
28th May 2006, 11:45 AM
can you give me some instructions on how to do this? Sorry, but I am still trying to get use to Linux (which is awesome by the way). Oh and I will try clamav

I'm assuming you're running Gnome (the default desktop) and have installed the default tools.

If you go into Desktop -> Administration -> Services you will see a list of available services for your machine, one of which will be called "yum". This is the crontab version that updates so long as your machine is turned on. To enable it choose "Runlevel All" from the Edit Runlevels menu and put a tick in all 3 boxes and click the start button. Save the settings and exit.

If, like me, you turn your machine off when it's not in use (electricity is damned expensive and I don't want to contribute to pollution more than I can help) then you need to install yum-updateonboot from the extras repository. You will be able to find this in the software installer app called Pirut on your menu. Once installed, you just repeat the same process except that you choose the update on boot service. This will slow down your boot time a fair bit, but it will update every time you switch on the machine.

P.S. IMHO that Pirut is useless so I'd recommend getting rid of it ('yum remove pirut') and replacing it with Yumex ('yum install yumex') as yumex is much better - you can see what yu're installing, you get a list of all the files installed and their locations as well as the changelogs.

urmom9388
28th May 2006, 04:47 PM
Well there's two problems there for me, I am running kde (I have gnome installed), and second I would prefer to setup yum to update at a certain time of day since I only reboot if my pc crashes. Sorry for the trouble.

urmom9388
28th May 2006, 04:48 PM
Thanks, I think the link was what I needed.

arun_kc
10th October 2007, 03:48 AM
1
I tried to do this
To enable it choose "Runlevel All" from the Edit Runlevels menu
and no need to put a tick in all 3 boxes
since all background services are selected to run level all
should i go ahead and save runlevel all for all background processes or select only yumand click the start button. Save the settings and exit.pls advise me
2.
How to do this
where to do this
I am new to this
('yum remove pirut') and replacing it with Yumex ('yum install yumex') as yumex is much better

arun_kc
10th October 2007, 03:49 AM
Hello:
I know that you can enable Yum to run once daily in your /System/Administration/Server Settings/Services .. which will run as long as your machine is up.
To change the time it runs etc, then you will have to edit the cron files as jbannon described.
You can read more here:http://fedora.redhat.com/docs/yum/sn-updating-your-system.html#sn-automatic-updating
Seve
1
I tried to do this
To enable it choose "Runlevel All" from the Edit Runlevels menu
and no need to put a tick in all 3 boxes
since all background services are selected to run level all
should i go ahead and save runlevel all for all background processes or select only yumand click the start button. Save the settings and exit.pls advise me
2.
How to do this
where to do this
I am new to this
('yum remove pirut') and replacing it with Yumex ('yum install yumex') as yumex is much better
Reply With Quote

bob
10th October 2007, 04:03 AM
http://fedoraforum.org/forum/showthread.php?t=165221

tho.mei
13th October 2007, 10:09 AM
Hallo all

To run daily automatic online system update i use a self written script:

/etc/cron.daily/update.system.cron

#!/bin/bash

# check if yum all ready is running.
if [ -e /var/run/yum.pid ]
then

# log it
echo "# run yum.cron locked $(date)" >> /var/log/yum.update.system.cron
echo "--------------------------------" >> /var/log/yum.cron

else

# log it
echo "# run yum.update.system.cron clean ... $(date)" >> /var/log/yum.cron
# save the fastestmirror-plugin speed list.
mv /var/cache/yum/timedhosts.txt /var/cache/yum/.timedhosts.old
# tidy up yum's mess ;-)
yum -e 0 -d 0 clean all
# revcover fastestmirror-plugin speed list.
mv /var/cache/yum/.timedhosts.old /var/cache/yum/timedhosts.txt
# log it
echo "# run yum.update.system.cron yum ..... $(date)" >> /var/log/yum.cron

# update yum it self and log it
yum -R 3 -y upgrade yum >> /var/log/yum.cron
# log the end of the task
echo "# run yum.update.system.cron upgrade . $(date)" >> /var/log/yum.cron

# update the system and log all messages.
yum -R 3 -y upgrade >> /var/log/yum.cron
# log the end of the task
echo "# run yum.update.system.cron done .... $(date)" >> /var/log/yum.cron

# set an end line in the logfile
echo "--------------------------------" >> /var/log/yum.cron

fi

You will need to stop and turn off yum-updatesd. Look in system-config-services.

This script have done the update on 5 workstations since 3 years. No problems.
It work's in the background and does not need any interaction of a user. You can control the success the daily update in the logfile: /var/log/yum.cron