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 :
$ vim /data/repo/conf/distributions Codename: du2-prebuild Suite: unstable Version: 2.0 Origin: DilOS Label: DilOS prebuild Description: DilOS Prebuild Repository Architectures: solaris-i386 solaris-sparc Components: main contrib non-free #SignWith: default DebIndices: Packages Release . .gz .bz2 .xz #DscIndices: Sources Release . .gz .bz2 .xz Contents: . .gz .bz2 .xz :wq!
create new zone for build package and use this guide for build package.
after building the package, put it in the repository:
$ cd /export/builds/du2/components/lynx/build/ $ reprepro -Vb /data/repo --export=never include du2-prebuild *.changes $ reprepro -Vb /data/repo export du2-prebuild
after that, you should see the following structure in /data/report:
$ cd /data/repo/ $ ls -la total 4 drwxr-xr-x 6 root root 6 февр. 11 15:28 . drwxr-xr-x 4 root root 4 февр. 11 15:10 .. drwxr-xr-x 2 root root 3 февр. 11 14:54 conf drwxr-xr-x 2 root root 8 февр. 11 15:28 db drwxr-xr-x 3 root root 3 февр. 11 15:28 dists drwxr-xr-x 3 root root 3 февр. 11 15:26 pool
create an apache2 deployment zone. Add zone access to this directory:
add fs set dir="/data/repo" set special="/data/repo" set type="lofs" end
$ sudo zonecfg -z apache_repo create -t SUNWdpkg set zonepath=/zones/apache_repo set ip-type=exclusive add fs set dir="/export/home/admin" set special="/export/home/admin" set type="lofs" end add fs set dir="/export/builds" set special="/export/builds" set type="lofs" end add fs set dir="/data/repo" set special="/data/repo" set type="lofs" end add net set physical="vnic2" set global-nic="stub0" add property (name=ip,value="192.168.0.2") add property (name=netmask,value="255.255.255.0") add property (name=gateway,value="192.168.0.254") add property (name=primary,value="true") end add attr set name="resolvers" set type="string" set value="192.168.0.254" end verify commit exit $ sudo zoneadm -z apache_repo install $ sudo zoneadm -z apache_repo boot
check your zone and install apache2:
$ df Filesystem 1K-blocks Used Available Use% Mounted on rpool/zones/apache_repo/ROOT/zbe-1 29057089 475941 28581148 2% / /data/repo 24372371 1866 24370505 1% /data/repo /export/builds 28581172 24 28581148 1% /export/builds /export/home/admin 28581192 44 28581148 1% /export/home/admin ...
installing, configuring, and running apache2:
$ sudo apt install apache2 ... $ sudo ln -s /data/repo /var/www/html/dilos $ sudo svcadm enable http $ sudo svcs http STATE STIME FMRI online 15:46:59 svc:/network/http:apache2
create a zone for testing the repository:
$ sudo zonecfg -z test_repo create -t SUNWdpkg set zonepath=/zones/apache_repo set ip-type=exclusive add fs set dir="/export/home/admin" set special="/export/home/admin" set type="lofs" end add fs set dir="/export/builds" set special="/export/builds" set type="lofs" end add fs add net set physical="vnic3" set global-nic="stub0" add property (name=ip,value="192.168.0.3") add property (name=netmask,value="255.255.255.0") add property (name=gateway,value="192.168.0.254") add property (name=primary,value="true") end add attr set name="resolvers" set type="string" set value="192.168.0.254" end verify commit exit $ sudo zoneadm -z test_repo install $ sudo zoneadm -z test_repo boot
write to /etc/apt/sources.list in test zone:
$ vim /etc/apt/sources.list deb [trusted=yes] http://192.168.0.2/dilos du2-prebuild main contrib non-free :wq $ sudo apt update
now you can install the assembled package.