previous Installing and Updating Applications in Linux
apt-get upgrade
yum [options] command [packagenames]
Yum consults its configuration file, /etc/yum.conf, and does everything needed to update the packages installed on your system.
If you want to update only certain packages, you can specify the package names. For example, to update the kernel and xorg-x11 packages, use the following Yum command:
yum update kernel* xorg-x11*
This command updates all packages whose names begin with kernel and xorg-x11.
Each Linux distribution comes with utilities that enable you to update the software online. The following sections provide an overview of the update methods in Debian, Fedora, SUSE, Ubuntu, and Xandros.
You need a fast Internet connection (such as a DSL or cable modem) to easily update your Linux applications or download new software packages. Make sure that your Internet connection is up and running before you attempt to update your Linux system online.
Keeping Debian and Ubuntu updated with APT
The best way to keep your Debian system updated is to use APT. More specifically, you use the apt-get command-line utility with appropriate options. Because Ubuntu is Debian-based, you can use APT to update Ubuntu as well.
In a nutshell, assuming the APT sources were configured during Debian installation, you can keep the current collection of software updated with the following two commands, typed in this order:
apt-get update apt-get upgrade
The apt-get update command checks the current list of packages against the ones available from the locations specified in /etc/apt/sources. list file and gathers information about new versions of installed packages.
The apt-get upgrade command installs any available new versions of the packages installed in your Debian system. You must perform apt-get upgrade to install any available upgrades.
To install a new package in Debian, use apt-cache search to find the package name in APT’s package cache and then use apt-get install to install the package.
Updating Fedora Applications
Fedora comes with a graphical Update Agent that can download any new RPM files your system requires and install those files for you.
To update Fedora software packages using the Software Update agent, follow these steps:
- Log in as root, and choose System➪Administration»Software Update. The Update Agent starts and displays a list of updates that are available (see Figure 4-1).
- Click Install Updates to continue.
The updater resolves dependencies for the updates. You may be asked to confirm the downloading of additional software needed to resolve these dependencies. If so, Software Update downloads the packages. Then Software Update updates the software. A progress bar is displayed during all steps of the operation. - Click the OK button to exit Software Update.
Ideally, you want to keep your system up-to-date and receive messages when you open Software Update like those shown in Figure 4-3.
In Fedora, you can also use Yum (which, by the way, stands for Yellow dog Updater, Modified) to keep your packages up-to-date. Yum is a command line utility for updating as well as installing and removing RPM packages. Yum downloads RPM package headers from a specified Web site and uses the rpm utility to figure out any interdependencies among packages and what needs to be installed on your system. Then it downloads and uses rpm to install the necessary packages. Because Yum downloads just the headers, which are much smaller than the complete RPM packages, Yum is much faster than the alternative, where you manually download the complete RPM packages using the rpm command.
Typically, you keep your system up-to-date with the graphical Package Updater because it’s easy to use. However, knowing how to run Yum from the command line is good, just in case you have problems with the GUI.
You can read more about Yum and keep up with Yum news by visiting the Yum Web page at http://yum.baseurl.org.
The command line for Yum has the following syntax: yum [options] command [packagenames]
options is a list of Yum options, command specifies what you want Yum to do, and packagenames are the names of a packages on which Yum performs that action. You must provide command, but options and package names are optional (which is why they are shown in square brackets in the syntax). Table 4-2 summarizes the Yum commands and Table 4-3 lists some common Yum options.
Table 4-2
|
Yum Commands
|
Command
|
Yum Will
|
check-update
|
Check for available updates for your system
|
clean
|
Clean up the cache directory
|
info
|
Display summary information about the specified packages
|
install
|
Install latest versions of specified packages, making sure that all dependencies are satisfied
|
list
|
List information about available packages
|
list installed
|
List packages already installed on your machine
|
List updates
|
List installed packages that have updates available
|
provides
|
Provide information on which package provides a file
|
remove
|
Remove specified packages as well as any packages that depend on the packages being removed
|
search
|
Find packages whose header contains what you specify as the package name
|
update
|
update Update specified packages, making sure that all dependencies are satisfied
|
Table 4-3
|
Some Common Yum Options
|
Option
|
Yum Will
|
--download-only
|
Download but not install the packages.
|
--exclude=pkgname
|
Exclude the specified package. (You can use this option more than once on the command line.)
|
--help
|
Display a help message and quit
|
--installroot=path
|
Use the specified pathname as the directory under which all packages are installed.
|
-y
|
Assume that your answer to any question is yes.
|
If you simply want Yum to update your system, type the following. (You have to be logged in as root.)
yum update Yum consults its configuration file, /etc/yum.conf, and does everything needed to update the packages installed on your system.
If you want to update only certain packages, you can specify the package names. For example, to update the kernel and xorg-x11 packages, use the following Yum command:
yum update kernel* xorg-x11*
This command updates all packages whose names begin with kernel and xorg-x11.
You may use the options to further instruct Yum what to do. For example, if you want to download but not install the updated packages, type
yum --download-only update
Another typical option is --exclude, which enables you to exclude one or more packages from the update process. Suppose you want to update everything except the GNOME packages (whose names begin with gnome) and the rhythmbox package. You would type the following Yum command:
yum --exclude=gnome* --exclude=rhythmbox update
Updating SUSE online
SUSE comes with YOU — YaST Online Update — for online software updates. To access YOU, choose System➪YaST from the main menu. Then, from the YaST Control Center’s Software category, click Online Update. This brings up the YaST Online Update window.
To set up YOU automatic updates, click the Configure Fully Automatic Update button. You can then specify a time of the day when you want YOU to download any available patches and install them. You can instead specify that YOU download but not install the patches.
To update your SUSE system online, select the installation source and click Next. YOU then downloads the list of patches and displays them.
Select the patches (some are recommended and preselected for you) and then click Accept. YOU then downloads the required packages and installs them on your SUSE system.
Using Xandros Networks
In Xandros, use Xandros Networks to update applications or install new ones. From the main menu, choose Xandros Networks (or double-click the Xandros Networks icon on the desktop) to open the Xandros Networks window.
To install the latest updates from Xandros, choose File➪Install All Latest Updates from Xandros or click the Update button. Xandros Networks then downloads information about the available updates and shows a summary of the packages to be downloaded and the disk space needed to install them.
Click OK. Xandros Networks prompts you for the root password. After you enter the root password, it downloads and installs the software updates.
Behind the scenes, Xandros Networks uses Debian’s apt-get command to download and install the software updates.
The Xandros Networks window also offers options to install new software. You can even shop for new applications through Xandros Networks. If you have to install RPM or DEB files, you can do so in Xandros Networks by choosing File»Install RPM File or File»Install DEB File.
next Linux Security
0 comments:
Post a Comment