# Local repository



## maziar (Jul 25, 2015)

Hi every one,
I have too many FreeBSD servers in my network but I have poor internet.  How can I set up a local repository in one server, and set up other servers to install packages from that?


----------



## storvi_net (Jul 25, 2015)

For "many Servers" I am a fan of building the packages on one machine using poudriere (https://www.freebsd.org/doc/handbook/ports-poudriere.html) and just use these packages inside the network.

Advantage: You can configure all the options on the BuildBox and just use pkg install on the production machines.
I don't want to stress the CPUs of the production machines with compiling and building. Most of the time I don't need a special option on each server, so I can save a lot of computing resources.

Regards
Markus


----------



## maziar (Jul 26, 2015)

storvi_net said:


> For "many Servers" I am a fan of building the packages on one machine using poudriere (https://www.freebsd.org/doc/handbook/ports-poudriere.html) and just use these packages inside the network.
> 
> Advantage: You can configure all the options on the BuildBox and just use pkg install on the production machines.
> I don't want to stress the CPUs of the production machines with compiling and building. Most of the time I don't need a special option on each server, so I can save a lot of computing resources.
> ...


Is there any good "how to" or tutorial for it?


----------



## xavi (Jul 26, 2015)

maziar said:


> is there any good "how to " or tutorial for it ?



http://www.bsdnow.tv/tutorials/poudriere
https://www.digitalocean.com/commun...m-to-create-packages-for-your-freebsd-servers


----------



## hukadan (Jul 26, 2015)

There is also this thread : Thread pkg-package-repository-using-ports-mgmt-poudriere-no-zfs-required.38859.


----------



## maziar (Jul 26, 2015)

xavi said:


> http://www.bsdnow.tv/tutorials/poudriere
> https://www.digitalocean.com/commun...m-to-create-packages-for-your-freebsd-servers


iI'm use :
https://www.digitalocean.com/commun...m-to-create-packages-for-your-freebsd-servers
bBut on when iI use my IP address of my server iI get this error:

```
Invalid request or no data available yet.
```
hHow should iI fix it?

aAdditional info, iI get this error on nginx error-log:

```
[LIST=1]
[*]T /data/.data.json HTTP/1.1", host: "LocalHost", referrer: "http://LocalHost"
[*]2015/07/26 15:34:03 [error] 3495#0: *3 open() "/usr/local/poudriere/data/logs/bulk/.data.json" failed (2: No such file or directory), client: LocalHost, server: LocalHost, request: "GET /data/.data.json HTTP/1.1", host: "172.16.33.223", referrer: "http://LocalHost"
[*]2015/07/26 15:34:05 [error] 3495#0: *3 open() "/usr/local/poudriere/data/logs/bulk/.data.json" failed (2: No such file or directory), client: LocalHost, server: LocalHost, request: "GET /data/.data.json HTTP/1.1", host: "172.16.33.223", referrer: "http://LocalHost"
[*]2015/07/26 15:34:07 [error] 3495#0: *3 open() "/usr/local/poudriere/data/logs/bulk/.data.json" failed (2: No such file or directory), client: LocalHost, server: LocalHost, request: "GET /data/.data.json HTTP/1.1", host: "172.16.33.223", referrer: "http://LocalHost"
[*]2015/07/26 15:34:09 [error] 3495#0: *3 open() "/usr/local/poudriere/data/logs/bulk/.data.json" failed (2: No such file or directory), client: LocalHost, server: LocalHost, request: "GET /data/.data.json HTTP/1.1", host: "172.16.33.223", referrer: "http://LocalHost"
[/LIST]
```
(iI change my IP address to localhost).


----------



## maziar (Jul 27, 2015)

maziar said:


> iI'm use :
> https://www.digitalocean.com/commun...m-to-create-packages-for-your-freebsd-servers
> bBut on when iI use my IP address of my server iI get this error:
> 
> ...



Do you have any idea?


----------



## SirDice (Jul 27, 2015)

You need to configure nginx correctly. See the example in /usr/local/share/examples/poudriere/nginx.conf.sample.


----------

