I am new to the freeBSD world. I am trying to figure out how to do things like install some packages. I was not familiar with ports at all. All my experience is around linux repositories.
So firstly, i tried to figure out how to find available packages to install, and thus I discovered whereis command:
and the output is:
# whereis apache* apache-forrest: /usr/ports/www/apache-forrest apache-mode.el: /usr/ports/www/apache-mode.el apache22: /usr/ports/www/apache22 apache22-event-mpm: /usr/ports/www/apache22-event-mpm apache22-itk-mpm: /usr/ports/www/apache22-itk-mpm apache22-peruser-mpm: /usr/ports/www/apache22-peruser-mpm apache22-worker-mpm: /usr/ports/www/apache22-worker-mpm apache24: /usr/ports/www/apache24
after choosing the package I want to install, I go to it’s port directory. For example to install apache2.4 I have to go to :
and then I have to compile and install this package by executing:
make install clean
Now the problem sometimes is that most of the packages have configuration options in which, I have to manually choose the options. So if I install packageA with a lot of dependencies, those dependencies may have each a configuration option in which I have to make selections. There are a lot of interruptions, in the installing procedure. I need to be over the terminal and waiting for an interruption. This is time consuming and not productive at all.
So my first thought was to find a way to install packages with the default configuration options. I found this one:
make -DBATCH install clean
Then as a System Administrator, I thought that’s not my case, it’s a common usage case, but I need to know and configure some things. So I found how to make all the configurations needed recursively and then install the package:
make install clean
You have to run make config-recursive as many times as needed to configure all dependencies. You have to do this, until all dependent ports options have been defined, and ports options dialog(1) screens no longer appear, to be certain all ports options have been configured as intended.
In order you want to reconfigure the package(s) you want to compile, then you have to run:
I hope you find this post helpfull. As I go deeper with freeBSD, I like it more.