# Understanding on port installation



## simontkk2005 (Feb 27, 2013)

Dear *a*ll, 

I have some doubts and confusion about port installing. Let's take an example to install the OpenSSL port


What is the difference between 
`portupgrade -N security/openssl`
(*make*, *make install*) manually from /usr/ports/security/openssl
`portsnap fetch extract`

I found that there are two openssl ports inside my FreeBSD now, while installing the port does not remove the base system version.
/usr/bin/openssl is included in the base system.
/usr/local/bin/openssl is installed by the security/openssl port.

The question is: 

What is the difference between two versions of OpenSSL in terms of its functions and role.
Since I have two version*s* of OpenSSL, if *I* am installing a software that using OpenSSL for example OpenVPN, which version of OpenSSL will it be using by default?

Sorry to have a lot of question*s* in mind, but thank you very much!

Best Regards,
SIMON TIONG


----------



## SirDice (Feb 27, 2013)

simontkk2005 said:
			
		

> 1) What is different between
> I) portupgrade -N security/openssl ;
> II)(make,make install) manually from /usr/ports/security/openssl ;


In effect, there is no difference. portupgrade(1) just makes things a little easier to work.



> III) portsnap fetch extract?


This has nothing to do with the openssl port in particular. This command updates the entire ports tree.



> 2) I found that there is two openssl port inside my FreeBSD now, while installing the port          does not remove the base system version
> I)/usr/bin/openssl is included in the base system.
> II)/usr/local/bin/openssl is installed by the security/openssl port.


That's correct. The version in the ports is newer. The one in the base however is up to date and most people don't need the port version. It's there for convenience.


----------



## kpa (Feb 28, 2013)

There are some features in the port version that the base system OpenSSL lacks and there are few ports that depend on those features, hence the separate port version.

Also the base system OpenSSL will not be updated to a newer version because the update would break ABI compatibility. On FreeBSD 9.x the version of /usr/lib/libssl.so will be version 6 with a fixed API/ABI in every version of FreeBSD 9 until the end of their lifetime.


----------

