How to create local repository in the zone for test package

 

creating a new repository pool, don't use rpool:

$ sudo zpool create data c2t1d0

create new dataset for repository:

$ sudo zfs create -o compression=on -o mountpoint=/data/repo data/repo

creating a new directory to store the repository configuration:

$ mkdir -p /data/repo/conf

create configuration file :

create new zone for build package and use this guide for build package.

after building the package, put it in the repository:

after that, you should see the following structure in /data/report:

create an apache2 deployment zone. Add zone access to this directory:

 

check your zone directories.

installing, configuring, and running apache2:

create a zone for testing the repository:

write to /etc/apt/sources.list in test zone:

now you can install your package.