Freebsd – How to set default versions of MySQL, Postgres, Apache, etc. prior to installing anything from ports in FreeBSD

dependenciesfreebsd

When I install software from ports on a FreeBSD system, sometimes rather outdated versions of Apache/MySQL/Perl/etc are installed as dependencies. Is there any way to set the versions of these ports beforehand so that if they're ever required, the ports system would choose an appropriate version?

Best Answer

You can look in /usr/ports/Mk/bsd.*.mk for corresponding variables and set them in /etc/make.conf. But it's safer to just install needed versions of such software and then continue with everything else.