af99
![]() |
|
|
|
|
|||||||
| Howtos & FAQs (Moderated) Would you like to share some of your solutions for certain problems? Tips or tricks? Post here. All new topics are automatically moderated. |
![]() |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
This "HOWTO" hopes to explain and demonstrate how to make basic use of PC-BSD's ports-mgmt/pbi-manager to install, update and delete PC-BSD PBI style packages on FreeBSD. I may update this later to include changing the default repository and creating your own PBI files, if I ever do that myself.
Contents 1. Introduction - a. What is a PBI? - b. Why would I want to use PBIs? - c. What is ports-mgmt/pbi-manager? 2. Installation - a. From ports or packages - b. Setup and configuration 3. How to use ports-mgmt/pbi-manager - a. Find / check a repository - b. Find an application to install - c. Install your chosen application - d. Upgrade application(s) - e. Remove application(s) 1. Introduction A. What is a PBI? A PBI is an application packaging format first implemented on PC-BSD as part of its package management system, both of which are now available on FreeBSD via the ports-mgmt/pbi-manager application. B. Why would I want to use PBIs instead of regular FreeBSD ports/packages? Of course, to really learn FreeBSD I wholeheartedly recommend the ports system both for the knowledge and skills it provides and also for fine-grain control over your applications. However, I think that PBIs do in fact serve a very useful purpose on FreeBSD. PBIs are self-contained application packages containing all the files and libraries needed to run that application. The purpose of this is to separate the base system from the applications it runs as much as possible in order to protect the system from such problems as: broken ports and packages; broken, missing and/or incompatible libraries; botched un/installations; tricky updates and so-called "dependency hell". I personally use it for testing and running large, rarely needed, complicated graphical applications which require a large number of dependencies, toolkits and libraries, such as editors/libreoffice and deskutils/calibre. In this way, I can avoid lengthy, complicated and problematic install/update/deletion procedures and keep my base system as clean and unchanged as possible. C. What is ports-mgmt/pbi-manager? PBI Manager is a suite of command line utilities which can be used to find, install, remove, create, update and generally manage PBIs and their repositories. PBI manager features the following tools (but not only) which I hope to explain in this HowTo: pbid, pbi_add, pbi_browser, pbi_delete, pbi_info, pbi_update. For a full list see PC-BSD PBI Manager page 2. Installation A. Install ports-mgmt/pbi-manager via the ports system: # cd /usr/ports/ports-mgmt/pbi-manager# make install cleanOr install via packages: # pkg_add -r pbi-managerB. Configuration In order to use ports-mgmt/pbi-manger you should have the PBI daemon running: # /usr/local/etc/rc.d/pbid startTo have the PBI daemon run on system startup add the PBI daemon to /etc/rc.conf: # echo 'pbid_enable="YES"' >> /etc/rc.confIf the pbid daemon is running, the repository's index and meta files will be automatically fetched and made ready for browsing. 3. How to use ports-mgmt/pbi-manager A. Find / check the official PC-BSD repository using pbi_listrepo: # pbi_listrepo This should give you:Code:
[ID] [Description] ----------------------------------------------------- 001 Official PC-BSD Repository B. Find an application to install by name using pbi_browser: # pbi_browser -s APPLICATION_NAME.For example # pbi_browser -s libreoffice gives the output: Code:
Using RepoID: 001 Searching for: libreoffice ------------------------------------ Application: LibreOffice Version: 3.5.6 Created: 20120907 220121 RootInstall: NO Arch: i386 Author: The Document Foundation URL: http://www.libreoffice.org/ License: GPL Type: Graphical Keywords: Office,Word,Excel,SpreadSheet,Access,PowerPoint Icon: /var/db/pbi/repo-icons/dd3920955c2fcf9bcc66b20dc0d89354-LibreOffice.png Description: LibreOffice is the free power-packed Open Source personal productivity suite for Windows, Macintosh and Linux, that gives you six feature-rich applications for all your document production and data processing needs: Writer, Calc, Impress, Draw, Math and Base. To install this PBI: # pbi_add --rArch i386 --repo 001 -r LibreOffice # pbi_browser -c CATEGORY to list all applications listed in a specified category.# pbi_browser --listcats to list all available categories in your chosen repository.# pbi_browser --viewall to list all PBIs in a given repository.These options can be rather slow and cumbersome as they produce very many lines of text, however in this case, /usr/bin/grep is your friend ![]() C. Install your chosen PBI using [pbi_add[/file]: # pbi_add -r PACKAGE_NAMEYour systems architecture should be chosen automatically, and the PBI daemon should cycle through your listed repositories until the application you have specified is found. You could however, specify the architecture and the repository to be used with the --rArch and --repo options respectively: # pbi_add --rArch i386 --repo 001 -r LibreOfficeD. Upgrade PBIs using pbi_update: Check a specified PBI for updates: # pbi_update -c PBI_NAMECheck all PBIs for updates: # pbi_update --check-allUpdate a specified PBI: # pbi_update PBI_NAMEUpdate all PBIs: # pbi_update --update-allYou can also use the --enable-auto and --disable-auto options to enable or disable automatic updates of a specified PBI. E. Remove a PBI using pbi_delete: In order to remove a PBI from your system, the full name and version of the PBI should be given. An easy way to find this is to use pbi_info: % pbi_info. This will give you an output like:Code:
libreoffice-3.5.6-i386 # pbi_delete libreoffice-3.5.6-i386References: PC-BSD PBI Manager page Last edited by nickednamed; November 22nd, 2012 at 14:27. Reason: Spelling, grammar, punctuation, organization - the basics. |
| The Following 5 Users Say Thank You to nickednamed For This Useful Post: | ||
mcochris (December 2nd, 2012), paulfrottawa (October 20th, 2012), priyadarshan (February 11th, 2013), vermaden (October 18th, 2012), YZMSQ (February 10th, 2013) | ||
![]() |
| Tags |
| delete, install, pbi, ports, update |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Howto: Install FreeBSD using the UNetbootin img file | CodyWD | Howtos & FAQs (Moderated) | 1 | February 27th, 2011 22:46 |
| PBIs coming to 9.0 | noz | Porting New Software | 21 | December 9th, 2010 16:21 |
| HOWTO: Install FreeBSD with gcc45 | Pavick | Howtos & FAQs (Moderated) | 3 | November 9th, 2010 08:11 |
| howto install freeBSD on iMac/howto boot from CD | leizhenhua | Other Architectures | 1 | June 15th, 2009 06:09 |
| HOWTO: Install and setup MLDonkey on FreeBSD | tangram | Howtos & FAQs (Moderated) | 0 | November 17th, 2008 11:30 |