nedeľa 19. februára 2012

Ports install/deinstall and upgrade

As I mentioned before, there are two ways of "installing" ports.
One way is via "pkg_add" with "-r" parameter which fetches pre-compiled package from a public server. Check previous article. Without "-r" option, package is installed from hard drive, so you have to download package manually. Benefit of doing it this way is speed.
Second way is via compilation of source code. Search for package you want, go to relevant directory in ports tree and type "make install clean". This means shorten version to include three commands: "make"+"make install"+"make clean".
Every port can have additional parameters to be compiled with.
For example original port "cvsup" can be compiled with/without X11 support. To show additional parameters type:
make showconfig


To configure parameters type: "make config". Or to reset parameters and start again type: "make rmconfig".
To find more option look into "man ports". 

To upgrade installed ports, I use "portmaster". It's very efficient and quick tool to upgrade ports. You can check in handbook, there are many ways how to do that but I prefer this one.
Do "make install clean" in ".../ports/ports-mgmt/portmaster/". 
In manbook, there is a lot of options that are useful in case of automatized update or so. 
Basically I use two options: "-L" and "-a". 
First one shows installed ports and available updates if any and second updates all ports which have update available. 


Do deinstall ports, three basic options exists. 
1. Use "make deinstall clean" in relevant port directory.
2. Use "pkg_delete". "-r" for dependencies remove and "-n" for dry run so you can see what will happen if...
3. Install "pkg_cutleaves" and check man. This one is useful to safely remove ports with dependencies. Quite interactive.







Žiadne komentáre:

Zverejnenie komentára