12.07.2015 Views

download

download

download

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 3In the above example, the sjitter utility is installed with a single command. The-i switch turns on the interactive mode, in which the user will be prompted beforebuilding and installing the package.If you prefer to install a package instead of building an application from the sourcecode, you can use the -P flag to tell portinstall to look for a package file in thelocal repository. If a package is not locally available, portinstall will try to fetch thepackage from the online package repository. And finally if a package file cannot befetched for some reason, portinstall will build it from the source (the port method).The portinstall utility (which is the same as portupgrade utility) is a complicatedtool with many different arguments that are not covered in this chapter. It is highlyrecommended to take a look at the management pages to review all the possibilitieswhile using this utility.pkg_deinstallBasically, the pkg_deinstall utility is a wrapper for the original pkg_delete utilitywith two advantages. They are:• The utility understands wildcards. So you do not have to know the fullpackage name.• The utility supports recursion through dependencies.# pkg_deinstall -ri wget---> Deinstalling 'rkhunter-1.2.9'delete rkhunter-1.2.9? y---> Deinstalling 'wget-1.10.2_1'[Updating the pkgdb in /var/db/pkg ... - 427packages found (-1 +0) (...) done]delete wget-1.10.2_1? y[Updating the pkgdb in /var/db/pkg ... - 426packages found (-1 +0) (...) done]---> Listing the results (+:done / -:ignored / *:skipped / !:failed)+ rkhunter-1.2.9+ wget-1.10.2_1---> Packages processed: 2 done, 0 ignored, 0 skipped and 0 failedIn the above example, pkg_deinstall was called to remove wget and all thepackages that depend on it (note that -r switch is for recursion). It goes through thepackage database and finds that the rkhunter package depends on wget and asks ifit should be removed.[ 57 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!