Hitchhiker's Guide to Openbsd
- Making things easy: PKG_PATH
Download 1.27 Mb. Pdf ko'rish
|
obsd-faq49
- Bu sahifa navigatsiya:
- Prior to OpenBSD 4.4, every path in the PKG_PATH variable MUST end in a slash (/).
- 15.2.3 - Finding packages
15.2.2 - Making things easy: PKG_PATH
You can make things really easy by using the PKG_PATH environment variable. Just point it to your favorite location, and pkg_add(1) will automatically look there for any package you specify, and also fetch and install the necessary dependencies of this package automatically. A list of possible locations to fetch packages from is given in the following section . Example 1: fetching from your CDROM , assuming you mounted it on /mnt/cdrom $ export PKG_PATH=/mnt/cdrom/4.9/packages/`machine -a`/ Example 2: fetching from a nearby FTP mirror $ export PKG_PATH=ftp://your.ftp.mirror/pub/OpenBSD/4.9/ packages/`machine -a`/ It's usually a good idea to add a line similar to the above examples to your ~/.profile . As with the http://www.openbsd.org/faq/faq15.html (3 of 27)9/4/2011 10:02:29 AM 15 - The OpenBSD packages and ports system classic PATH variable, you can specify multiple locations, separated by colons. Prior to OpenBSD 4.4, every path in the PKG_PATH variable MUST end in a slash (/). That way, pkg_add(1) can split the path correctly even if it holds URL schemes containing colons. If the first entry in PKG_PATH fails, the next one will be tried, and so on, until the package is found. If all entries fail, an error is produced. Notice the use of machine(1) in the above command lines. This automatically substitutes your installed OpenBSD "application architecture", which is usually, but not always, your platform name. Of course, if you are using snapshots, you will replace "4.9" with "snapshots". 15.2.3 - Finding packages A large collection of pre-compiled packages is available for the most common architectures. Just look for your package in one of these places: ● On one of the three CD-ROMs , depending on your architecture. The CD-ROMs carry only the most commonly used, freely distributable packages for the most commonly used platforms. ● On the FTP mirror servers . Packages are located in the /pub/OpenBSD/4.9/packages directory. From there, packages are broken down depending on architecture. If you have the ports tree on your system, you can quickly find the package you are looking for as explained in Searching the ports tree . You will notice that certain packages are available in a few different varieties, formally called flavors. Others are pieces of the same application which may be installed separately. They are called Download 1.27 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling