Linux Installation and Package Management

Objective 1: Design a Hard Disk Layout

Guidelines

  • Keep / small by distributing larger parts of the directory tree to other filesystems.

  • Separate a small /boot partition below cylinder 1024 for kernels.

  • Separate /var into its own partition to prevent runaway logs from filling /.

  • Separate /tmp.

  • Separate /usr if it is to be shared read-only among other systems via NFS.

  • Set swap size to be somewhere between one and two times the size of main memory.

Objective 2: Install a Boot Manager

LILO

  • LILO has historically been the default Linux boot loader.

  • LILO consists of the lilo command, which installs the boot loader, and the boot loader itself.

  • LILO is configured using /etc/lilo.conf.

GRUB

  • GRUB can boot Linux as well as most other PC-based operating systems.

  • GRUB relies on various files in the /boot/grub directory to support reading from various types of filesystems.

  • GRUB is configured using /boot/grub/menu.lst (or /boot/grub/grub.conf on some distributions).

  • GRUB can be configured to present a text or graphical menu interface and also has a command-line interface.

Objective 3: Make and Install Programs from Source

Source Files

  • Software often comes in a compressed tar archive file.

  • Larger source code packages include a configure script to verify that everything is in order to compile the software.

make

  • make is then used to build the software.

  • make is also often used to install the software into directories such as /usr/local/bin.

Objective 4: Manage Shared Libraries

Concepts

  • System libraries provide many of the functions required by a program.

  • A program that contains executable code from libraries is statically linked because it stands alone and contains all necessary code to execute.

  • Since static linking leads to larger executable files and more resource consumption, system libraries can be shared among many executing programs at the same time.

Commands

  • A program that contains references to external , shared libraries is dynamically linked at runtime by the dynamic linker, ld.so.

  • New locations for shared libraries can be added to the LD_LIBRARY_PATH variable. As an alternative, the locations can be added to /etc/ld.so.conf, which lists library file directories. After this, you must run ldconfig to translate this file into the binary index /etc/ld.so.cache.

Objective 5: Use Debian Package Management

Commands

  • dpkg automates the installation and maintenance of software packages and offers a number of options.

  • dselect uses a text based interactive menu to select (or deselect) packages for installation.

  • alien can install RPM packages on Debian-based systems .

  • apt-get is a powerful tool that interfaces with online repositories of Debian packages to install and upgrade Debian packages by package name and resolves each package's dependencies automatically.

Objective 6: Use Red Hat Package Manager (RPM)

Concepts

  • RPM automates the installation and maintenance of software packages.

  • Package dependencies are defined but not resolved automatically.

  • -i, -e, -U, -v, -h, --nodeps, and --force are common options.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset