# Installing using ports without internet connection



## jemate18 (Jan 26, 2009)

Hello guys!

I'm really not sure about this, but is there a way that a installing using ports be done without internet connection? Like can the sources be cached and later be installed?

Because, when I install using ports, I've noticed, that it is downloading the sources/packages, and after that installs it.

Is there like a download first or cache it and install it even without having internet connection?

What are the steps to achieve this?

Thanks

Jemate18


----------



## jb_fvwm2 (Jan 26, 2009)

cd /usr/ports/category/port
make checksum-recursive 
(there are variants of that, several, including portmanager etc ways)


----------



## jemate18 (Jan 26, 2009)

jb_fvwm2 said:
			
		

> cd /usr/ports/category/port
> make checksum-recursive
> (there are variants of that, several, including portmanager etc ways)



Thanks. Does this step downloads first the sources? If so then I can execute the 

```
make install clean
```
 at a later time?
Therefore, I need to be connected first to the internet using 
	
	



```
make checksum-recursive
```
 then for some reason, my internet connection fails, I can use 
	
	



```
make install clean
```
anytime...

Is my understanding right?

Thanks for bearing with me...


----------



## ale (Jan 26, 2009)

Yes.
make checksum verifies the md5/sha256 sum in the port distinfo file.
If a required file is missing make fetch is invoked, and the file is downloaded.
For more info read ports()


----------



## jb_fvwm2 (Jan 26, 2009)

I usually do not use "clean" (because I never have, and
suspect it deletes the distinfo, ie source files )  3 of 4 years on
dialup,   (someone will correct me it it just deletes the
/work/...)


----------



## tobe (Jan 26, 2009)

'make clean' doesn't delete distfiles


----------



## jb_fvwm2 (Jan 26, 2009)

okay, thanks.  So it is probably just the
default action of "portupgrade"


----------



## tobe (Jan 27, 2009)

Yes, using portupgrade is safe for you, it will leave all downloaded files in distfiles. You can use it with the -F flag so it will only fetch sources that aren't already available and you'll be able to build them later.


----------



## ale (Jan 27, 2009)

jb_fvwm2 said:
			
		

> okay, thanks.  So it is probably just the
> default action of "portupgrade"


portupgrade will not delete your distfiles.
portupgrade provides the portsclean utility for that.


----------



## krzysztof (May 12, 2011)

Hello 

It is possible to install software on FreeBSD (using ports) when I donâ€™t have internet connection?

 Example: I donâ€™t have internet in my home, where I have my computer with FreeBSD. All source files I downloaded from computer of my friend. How can I install/compile (for example bash shell) from source files without internet connection? Where should put source files in bash-port directory? (When I type make-command shell displays error-"I canâ€™t fetch it")

I donâ€™t find any answer on this questions or tutorial in internet  

Could you help me? (I will be very grateful for links to tutorials or instructions).

Ps very big sorry for my bad English!


----------



## SirDice (May 12, 2011)

Move the source files to /usr/ports/distfiles/. The file will be searched there first before it attempts to fetch it.


----------

