Skip to Main Content
Linux Desktop Hacks
book

Linux Desktop Hacks

by Nicholas Petreley, Jono Bacon
March 2005
Beginner to intermediate content levelBeginner to intermediate
342 pages
15h 55m
English
O'Reilly Media, Inc.
Content preview from Linux Desktop Hacks
Prelink for Performance #85
Chapter 9, Administration and Automation
|
257
HACK
Run prelink
To use prelink, you need to ensure that you are running a compiler and
libraries that support this feature. You should aim for a
gcc newer than Ver-
sion 3.1 and a
glibc newer than 2.3. You also need to obtain the prelink tool
from ftp://people.redhat.com/jakub/prelink/. The
prelink tool is also available
in the Debian archive, and RPMs are available at http://www.rpmfind.net/
linux/rpm2html/search.php?query=prelink.
Once you have installed
prelink, you need to run the tool on the binaries and
libraries that are present on your system. To do this, you need to add a list
of the directories containing binaries to /etc/prelink.conf. Here is an example
listing of directories to add:
-l /usr/local/sbin
-l /sbin
-l /usr/sbin
-l /usr/local/bin
-l /bin
-l /usr/bin
-l /usr/X11R6/bin
-l /usr/games
-l /usr/local/lib
-l /lib
-l /usr/lib
-l /usr/X11R6/lib
The -l option included at the beginning of each line ensures that prelink
descends recursively into directories and works on dependent binaries and
libraries. This works under the condition that the directory does not span
across different filesystems or mount points.
To actually perform the prelinking, you need to run the following command
as root whenever you add new software to the system:
foo@bar:~# prelink -afmR
This command prelinks all (-a) binaries and libraries in the paths ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Server Hacks, Volume Two

Linux Server Hacks, Volume Two

William von Hagen, Brian K. Jones
Introducing Linux Distros

Introducing Linux Distros

Jose Dieguez Castro

Publisher Resources

ISBN: 0596009119Supplemental ContentCatalog PageErrata