# without internet connection, how to install pkg etc..



## john33 (Dec 16, 2016)

Hi ,
After installing freebsd 11 in my ibook g4 successfully, but no internet at all. As I tried
pkg, pkg install nano on console, they need an Internet connection to install packages.

Is it possible first to download all packages source and burn them into DVD , then install 
those packages from DVD ROM ? where is those source packages for freebsd 11 specific to PowerPC ?
the DVD 11_0_RELEASE_P1_POWERPC_CD seems not contain source package for pkg which is fetched from ftp on the internet. what could I do ? Thank you very much for advises !!!

Regards,

John


----------



## Maxnix (Dec 16, 2016)

john33 said:


> Hi ,
> After installing freebsd 11 in my ibook g4 successfully, but no internet at all. As I tried
> pkg, pkg install nano on console, they need an Internet connection to install packages.
> 
> ...


Yes, it's possible: move the packages you want to install in /var/cache/pkg, then `pkg add </path/to/package.txz>`. However, first you need to bootstrap pkg(8), or install it with ports(7).

Just a note: their are called packges, not source packages. Unless you refer to source code tarballs used by ports(7).


----------



## john33 (Dec 16, 2016)

Thank you Maxnix ! How do I do bootstrap pkg ? since I can't install pkg with ports without internet connection. That is why I want to
install those packages (i.e. pkg nano) from source files. Thank you so much !!!


----------



## Maxnix (Dec 17, 2016)

I did some researches to see if you could download the precompiled binary for pkg and install it that way, and discovered that PowerPC is a Tier 2 architecture, so there is not an official repository for it. You should install from ports directly or build your own repository with ports-mgmt/poudriere or ports-mgmt/synth and then use pkg.

UPDATE: I found this thread Thread 35675: hope could help you with your connection problem.


----------



## kpa (Dec 17, 2016)

If at all possible use the wired connection for initial bootstrap and installation. Your wired ethernet is a gem(4) device so this should be enough in /etc/rc.conf if you connect the machine to wired router:


```
ifconfig_gem0="SYNCDHCP"
```


----------



## ANOKNUSA (Dec 17, 2016)

kpa said:


> Your wired ethernet is a gem(4) device so this should be enough in /etc/rc.conf...



Just a quick addition: since john33 is trying to install editors/nano, I'm guessing using vi(1) is out of the question. However, ee(1) might be a suitable alternative to nano.  So you can at least use that to add the link kpa recommended to your configuration and get a network connection, then install whatever you want.


----------



## john33 (Dec 19, 2016)

@kpa
Yes, I changed ifconfig_fwe0="SYNCDHCP"  to ifconfig_gem0="SYNCDHCP" in /etc/rc.conf and connect the machine to wired router, but seems still no internet connection. below is my rc.conf content:

```
hostname="ibook"
ifconfig_gem0="SYNCDHCP"
sshd_enable="YES"
dumpdev="AUTO"
```
Do I still missing something?  Thank you very much!


----------



## john33 (Dec 19, 2016)

@Maxnix

Thank you for your effort ! I did a try invalid. could you tell me more in details. Thanks a ton.


----------



## john33 (Dec 19, 2016)

@ANOKNUSA

In fact, I always use vi which exists in my FreeBSD. Now there is still a problem of internet connection -- even I used  a wired router.


----------



## getopt (Dec 19, 2016)

For those having difficulties setting up their network configuration there is still the possibility using `# bsdinstall netconfig` as a guided after installation task.

See FreeBSD Handbook 2.8.2. Configuring Network Interfaces


----------



## john33 (Dec 21, 2016)

I switched to openbsd and make it work well. Thank you all.


----------



## thein (Jan 2, 2017)

I use install with port tree. After setup os then /usr/port/xx/xx then make install that appear /usr/ports/distfiles/ inside that location on pkg-xx.tar.bz2 and you need pkg requirement xx.tar.bz2.
Go to /usr/port/xx/xx make install.


----------

