# General Question



## Ependi Silalahi (Aug 28, 2016)

I hope I am posting on the right room anyway.

Here are my general questions.

Doing install:
1. `pkg install` means I am installing from internet and I must be connected to internet
2. doing /usr/ports/appsname is doing installation from my local computer am I right?
3  how do I know that I am installing the latest version is that by doing `pkg install`

Thank you


----------



## drhowarddrfine (Aug 28, 2016)

https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports.html
https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/pkgng-intro.html
https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html


----------



## Ependi Silalahi (Aug 28, 2016)

drhowarddrfine said:


> https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports.html
> https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/pkgng-intro.html
> https://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports-using.html


So I was half right then that pkg check the internet and local ports from ports collection
Why is it then installing from port collections is a little bit longer? Or is just me ?


----------



## tobik@ (Aug 28, 2016)

Ependi Silalahi said:


> so i was half right then that Pkg check the imternet and local ports from ports collection
> why is it then installing from port collections is a little bit longer? or is just me ?


`pkg` downloads pre-compiled binary packages from the internet. The ports collection downloads source tarballs which are then compiled and build into packages. This is a quite CPU-intensive thing to do so takes a whole lot longer.

Both `pkg` and ports require an internet connection and download files from the internet.


----------



## kpa (Aug 28, 2016)

tobik said:


> `pkg` downloads pre-compiled binary packages from the internet. The ports collection downloads source tarballs which are then compiled and build into packages. This is a quite CPU-intensive thing to do so takes a whole lot longer.
> 
> Both `pkg` and ports require an internet connection and download files from the internet.



Pkg requires an internet connection only if you have a repository configured that uses a remote access method such as HTTP(S) to download the repostitory catalogues and the packages. This is of course the default if you're not using your own custom repo but in case you're building your ports yourself like me you can configure pkg to use only the local filesystem when accessing the repo.


----------



## Ependi Silalahi (Aug 29, 2016)

kpa said:


> Pkg requires an internet connection only if you have a repository configured that uses a remote access method such as HTTP(S) to download the repostitory catalogues and the packages. This is of course the default if you're not using your own custom repo but in case you're building your ports yourself like me you can configure pkg to use only the local filesystem when accessing the repo.


+++++
Howto use local port
How do people in the different country to use ports when internet access is not always available


----------



## a6h (Aug 29, 2016)

Ependi Silalahi said:


> How do people in the different country to use ports when internet access is not always available


When net is OFF: change to the directory of the port to be installed, e.g. editors/vim and:

```
# cd /usr/ports/editors/vim
# make config-recursive
```

_Do it several times until port option screens no longer appear._

When net is ON: change to the directory of the port to be installed, e.g.
editors/vim and:

```
# cd /usr/ports/editors/vim
# make fetch-recursive
```


----------



## Ependi Silalahi (Aug 29, 2016)

+++
thanks for the tip


----------

