В началоUnix Toolbox → 15. INSTALL SOFTWARE
Gentoo-doc HOME Пред.: 14. USEFUL COMMANDSВ началоУровень выше: Unix ToolboxСлед.: 16. CONVERT MEDIA

15. 15. INSTALL SOFTWARE

15.1. 15.1 List installed packages

# rpm -qa # List installed packages (RH, SuSE, RPM based)

# dpkg -l # Debian, Ubuntu

# pkg_info -W smbd # FreeBSD show which package smbd belongs to

# pkginfo # Solaris

15.2. 15.2 Add/remove software

Front ends: yast2/yast for SuSE, redhat-config-packages for Red Hat.

# rpm -i pkgname.rpm # install the package (RH, SuSE, RPM based)

# rpm -e pkgname # Remove package

Debian

# apt-get update # First update the package lists

# apt-get install emacs # Install the package emacs

# dpkg --remove emacs # Remove the package emacs

FreeBSD

# pkg_add -r rsync # Fetch and install rsync.

# pkg_delete /var/db/pkg/rsync-xx # Delete the rsync package

Set where the packages are fetched from with the PACKAGESITE variable. For example:

# export PACKAGESITE=ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages/Latest/

# or ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/Latest/

FreeBSD ports. The port tree /usr/ports/ is a collection of software ready to compile and install. The ports are updated with the program portsnap.

# portsnap fetch extract # Create the tree when running the first time

# portsnap fetch update # Update the port tree

# cd /usr/ports/net/rsync/ # Select the package to install

# make install distclean # Install and cleanup (also see man ports)

# make package # Make a binary package for the port

15.3. 15.3 Library path

Due to complex dependencies and runtime linking, programs are difficult to copy to an other system or distribution. However for small programs with little dependencies, the missing libraries can be copied over. The runtime libraries (and the missing one) are checked with ldd and managed with ldconfig.

# ldd /usr/bin/rsync # List all needed runtime libraries

# ldconfig -n /path/to/libs/ # Add a path to the shared libraries directories

# ldconfig -m /path/to/libs/ # FreeBSD

# LD_LIBRARY_PATH # The variable set the link library path

Пред.: 14. USEFUL COMMANDSВ началоУровень выше: Unix ToolboxСлед.: 16. CONVERT MEDIA
В началоUnix Toolbox → 15. INSTALL SOFTWARE