2004.07_Yast-the Power Behind the Suse Package Management Tool.pdf

(2289 KB) Pobierz
Layout 1
COVER STORY
Ya ST
tion tends to polarize, and one of
the reasons for this is the distribu-
tion-specific system maintenance tool.
YaST is a laconic comment and stands
for “Yet Another Setup Tool”. Fans love
it, but its license has been a source of
irritation to Open Source purists (Suse’s
new owner, Novell, has reacted to this
criticism by announcing its intention to
remove the source of this contention by
placing YaST under the GPL this year)
[1]), and many refuse to use the tool as it
is too powerful, claiming that Suse users
may learn how to manage a Suse Linux
system, but not a Linux system.
YaST offers users who are leery of con-
figuration files the ability to manage a
Linux system without the obstacles that
typically implies. This said, YaST is not
specifically targeted at newbies. The
dialogs will not mean much to users
without appropriate IT and Linux skills.
YaST’s tasks now include configuring
most system components, ranging from
user management, to setting up the net-
work, configuring the GUI-based
X-Window system, or adding peripheral
devices.
Experienced Suse users appreciate
YaST’s flexibility and prefer its text mode
as an alternative to the GUI. Both inter-
faces uses the same accelerator keys,
while the GUI also supports a mouse.
The thing that makes text mode so
interesting is the speed with which it can
handle tasks, once you get used to it (see
Figure 1). Text mode appeals to users
wanting to just install a new piece of
software, as the YaST GUI can really
slow them down, especially on
older systems.
Debian users rightly
dote on apt-get . Their
typical advice
The Other Side
The Suse installation and configuration tool, YaST, has developed into a power-
ful utility over the years. Unfortunately, some of its useful features are so
obscure that they are hardly used. BY NICO LUMMA
is: “Just type apt-get install package-
name !” and Suse fans can actually do
something like this. This implies that
Apt4RPM [2] is the “Advanced Package
Tool”. However, it is simply “apt” that is
the “Advanced Package
Tool”.
Before you take this
option, you might just
like to look into the
option of using YaST
more effectively. To do
so, launch the program
as the root user by
typing yast in the com-
mand line.
thus select FTP… , type ftp.gwdg.de as
the Server name , and press [Tab] to
move to the Directory on this server item.
When you get there add pub/linux/suse/
ftp.suse.com/suse/ (without a leading / !)
Table 1: Mirror servers for ftp.suse.com
Protocol
Server name
Directory on server (for Suse Linux 9.0)
FTP
ftp.mirror.ac.uk
sites/ftp.suse.com/pub/
FTP
ftp.plig.org
pub/suse/
FTP
ftp.heanet.ie
mirrors/ftp.suse.com/pub/suse/
FTP
ftp.esat.net
mirrors/ftp.suse.com/pub/suse/
FTP
mirror.pacific.net.au
linux/suse/
FTP
ftp.mirror.nl
pub/mirror/suse/
FTP
mirrors.usc.edu
pub/linux/distributions/suse/
FTP
mirror.mcs.anl.gov
pub/suse/
FTP
mirror.storagetek.com
pub/systems/suse/
Software Sources
When installing soft-
ware, YaST assumes by default that you
will want to access the media from
which you originally installed the sys-
tem. If you do not want to pile up the
CDs or DVDs next to your computer and
also have a quick Internet connection,
can move the arrow key down to the
Software item, press [Enter], and hit
[Enter] to select Change Installation
Source , or use the icons from the
graphical YaST version as
shown in Figure 2.
Pressing [Alt-H] opens
a menu where you
can use the arrow
keys, and then
hit [Enter], to
select an alterna-
tive installation
source, including
the ftp.suse.com Mir-
ror Servers (see Table 1).
Suse distributions are typically
available from the FTP servers just a
few weeks after the release. You can
FTP
ftp-linux.cc.gatech.edu
pub/suse/suse/
to select the directory for your computer
architecture (this is i386/ for PCs) and
the distribution version (such as 9.0 ).
Then press the [Tab] key again and hit
[Enter] to confirm that you will be using
the Anonymous user account (assuming
that you do not have an account on the
server). [Alt-O] adds the new installation
source to the list.
If that does not keep you happy, you
can always download a copy of the dis-
tribution to a server of your own and
then use NFS, FTP, HTTP, or Samba to
access the copy. To quit the dialog, press
the [Tab] to access [Quit] and again
press [Enter].
Nico Lumma is the
Head of IT at
Orangemedia.de
GmbH and looks back
on years of
experience with the
practical application
of Linux in enterprise
environments.
20
July 2004
www.linux-magazine.com
Ya ST in the command line
L ike it or hate it. The Suse distribu-
564383301.001.png
Ya ST
COVER STORY
Figure 1: Not pretty, but a lot quicker – YaST in text mode.
Figure 2: Adding a FTP server as an installation source.
Online Update
Users wanting to keep their systems up
to date, both from a security point of
view and in general, definitely need
Internet access. There is a tool for this
task: “YaST Online Update” (YOU),
which is configurable below Software |
Online Update . You need to select a mir-
ror from the list provided by YaST below
Installation source (see Figure 3).
Users with leased lines might like to
hit [Tab] to move to [Configure fully
automatic update..] , where they can con-
figure YOU to tell YaST to automatically
look for updates at a specific time every
day.
Your other option is to select [Con-
tinue] in the dialog box shown in Figure
3 to perform a manual online update
(see Figure 4). The command line ver-
sion of you provides an even quicker
way of doing this, but Suse 9.0 only has
a GUI-based version of this tool.
In contrast to rpm -i , this command auto-
matically resolves dependencies and, if
needed, launches SuSEConfig to config-
ure the package after the install.
yast -i is quick and it delivers the
goods, but it is also error-prone. If the
RPM package name is not spelt exactly
right, nothing happens. A small, but
extremely useful tool called pin can help.
As the tool is included with the distribu-
tion, you can enter yast -i pin to install it,
and then copy the ARCHIVES.gz file from
the mirror server, or your installation
media, to the /var/lib/pin directory.
Whenever you need to install a pro-
gram (such as the file searching tool
locate ) without knowing the package
that contains the program, you can ask
pin , as shown in Listing 1. This example
finds the findutils-locate package. You
can then type yast -i findutils-locate to
install the tool.
If the software you need is located in a
messy package with dependencies that
Listing 1: pin finds software
01 kiwi:/home/nico # pin locate
02 pin 0.29 - package info for locate
03
04 ------------------------------------------------------------------
05 *** no rpm named locate installed
06 ------------------------------------------------------------------
07
08 ------------------------------------------------------------------
09 *** zgrep locate /var/lib/pin/ARCHIVES.gz
10 ------------------------------------------------------------------
11
12 ---> ./CD1/suse/i586/findutils-locate-4.1.7-748.i586.rpm
New Software!
If YaST has details of an installation
source, the Software | Install or remove
software item allows you to select new
packages, resolve dependencies, and add
packages to your system. However, hav-
ing said that, the procedure is slightly
over the top, if you only need to install a
single application.
There is a quicker way of doing this in
the command line:
Box 1: The alternative update tool – fou4s
If you do not like YOU, check out the
“Fast Online Update for Suse”, an alter-
native tool. Although this is a “simple”
shell script, the installation and application
are extremely straightforward. That makes
it well worth a try.
To use fou4s, first install the current
RPM, which is available from
http://fou4s.gaugusch.at/ by typing
yast -i fou4s-0.x.y-z.noarch.rpm
After you have completed this step, fou4s --
server will output a list of the mirror servers,
allowing you to choose a different server (if
you are not happy with the default mirror at
ftp.gwdg.de ).
fou4s -u --checkfou4s downloads the list of
patches for the distribution, and at the same
searches for fou4s updates. fou4s -e does a
test run of the update, without download-
ing or installing anything. You need to run
fou4s -i (as root ) to update your system for
real.
You can then copy the /usr/share/doc/pack-
ages/fou4s/fou4s-crontab file to /etc/cron.d .
This configures a cronjob that regularly
searches for updates and automatically
installs them.
yast -i packagename
GLOSSARY
Mirror server: A computer that has a 1:1 mir-
ror copy of the data on another server (ftp.
suse.comin our example), and can thus load
balance the main server.
www.linux-magazine.com
July 2004
21
564383301.002.png 564383301.003.png
COVER STORY
Ya ST
Figure 3: The “[New server…]” and “[Edit server…]” items allow you to config-
ure alternative mirror servers for online updates.
Figure 4: The YaST Online Update (YOU) displaying the packages for the
update.
you can’t fulfill, despite installing all the
required libraries, you can either use the
secret weapon, rpm -Uhv --nodeps pack-
age.rpm , or alternatively yast -i . If you
run this command directly for a package
that you previously downloaded (Box 1
shows an example of a package that is
not included by the Suse distribution),
YaST short-circuits and simply ignores
any dependencies.
Unfortunately, yast does not have a
simple option such as -i for uninstalling
packages. Your only option is to use rpm
-e packagename , or take the long way
home, via Software | Install or remove
software .
Professional sysadmins and power
users would welcome more command
line options. It remains to be seen
whether the announced GPL release will
prove to be an additional incentive. It
might even make the tool an interesting
proposition for other distributions.
Completely Modular
At least there is a shorter way of launch-
ing the YaST module: yast sw_single . You
can use a similar approach to launch
other YaST configuration dialogs, by
specifying their module names.
yast -l gives you a list of modules (see
Table 2). If you regularly need to add
new users, you can type yast users to
access the user management module
directly.
INFO
[1] YaST under the GPL:
http://www.novell.com/news/press/
archive/2004/03/pr04022.html
[2] Apt4RPM for Suse:
http://apt4rpm.sourceforge.net/
Table 2: Overview of YaST modules
Module Task
answering_machine Sets up an answering machine
backup
joystick
Gaming fans can add a joystick
here
profile-manager
Change the SCPM profile of a
machine
Simple backup solution for system
data
kerberos-client
Configure a Kerberos client for
secure authentication
proxy
Use a system global proxy server
restore
Restore a system backup
bootfloppy
Creates a boot floppy
keyboard
Change the keyboard settings
routing
Routing configuration
bootloader
Changes the boot loader
lan
Set up the network adapter
runlevel
Overview of runlevels and the
system services launched in them
(on booting for example)
cdrom
Configure CD/DVD drives
language
Change the system global
language settings
controller
Allows you to configure additional
hard disk controllers
ldap
Set up an LDAP directory service
samba-client
Samba client configuration
dhcp-server
Set up and manage a DHCP server
lvm_config
Configure the Logical Volume Ma-
nager for hard disk management
samba-server
Set up a Samba server
disk
Partition hard disks (n)
scanner
Add a scanner
dns
Configuration the hostname and
the name server
mail
Set up mail transfer
security
Settings to improve system
security
modem
Set up a modem
dns-server
Set up your own name server
mouse
Fine tune the mouse
sound
Configure the sound card
dsl
Configure a DSL connection
nfs
Manage the NFS mountpoints,
allows you to mount remote
filesytems
support
If you need to contact Suse
support…
fax
Set up a fax system for one or
more users
sw_single
Install and remove software
firewall
Advanced Firewall configuration
nfs_server
Set up your own NFS server
sysconfig
An editor for miscellaneous files
below /etc/sysconfig
host
Modify the /etc/hosts file
nis
Use the Network Information
Service (NIS) client
tftp-server
Set up a TFTP server
http-server
Simple configuration of the
Apache Web server
nis_server
Set up the NIS server
timezone
Configure the timezone
hwinfo
Detailed information on hardware
nisplus
Configure a NIS+ client
tv
Set up a TV card
idedma
For experts only: change the IDE
hard disk configuration
ntp-client
Set up a client for automatic time
synchronization
update
Update the system
users
User management
inetd
Set up the Internet services on the
machine
online_update
YaST Online Update (YOU)
vendor
Import driver CD from hardware
manufacturer
powertweak
Expert tool for editing system
settings
inst_source
Change the installation sources
view_anymsg
Display various logfiles
isdn
Configure an ISDN connection
printer
Set up the printer
x11
Set up the X-Window system
22
July 2004
www.linux-magazine.com
564383301.004.png
Zgłoś jeśli naruszono regulamin