[oi-dev] beginners customized distro_const question
Randy S
sim.ple at live.nl
Fri Apr 4 13:43:55 UTC 2014
Thanks for this post.
I will study it and see if it solves my issue
From: ilya at arhipkin.com
To: oi-dev at openindiana.org
Date: Fri, 4 Apr 2014 19:38:21 +0600
Subject: Re: [oi-dev] beginners customized distro_const question
Creating OpenSolaris 2009.06 repository The procedure for setting the repository consists of the following stages:
- Preparation of ISO-image from the OpenSolaris repository
- Preparation of the file system
- Copy the contents of the image repository
- Setting up a server through the services
- Configure client and server health check
- Upgrading packages and fix checksums
- Final testing
Next, consider what to do at each stage.
Obtaining ISO-image with the repository OpenSolaris
So to set up a repository, we need an image repository containing packages
it can be downloaded, such as genunix.org or sun.com, or more precisely as follows:
# Wget http://www.genunix.org/dist/indiana/osol-repo-0906-full.iso
or as follows:
# Wget http://dlc.sun.com.edgesuite.net/osol/opensolaris/2009/06/osol-repo-0906-full.iso
The repository can be downloaded in the form of 2-images that fit on a DVD-disk capacity
4.7GB, either as a single image the size of about 7.2 GB. These links
point to the repository in a single image. However, the version in two images can be
found close by.
Preparation filesystem
Create a separate ZFS file system for that would place her
repository. Separate file systems and ZFS repository gives us the following
Advantages:
l results in better performance
l Ability to set individual parameters for the file system, such
as compression and update access time
l Create snapshots and backups of the file system to the repository
To save disk space applies compression (optional compression), and for
improve performance, disable access time updates (optional atime).
Naturally, all the team here and should continue to run as
superuser. Create:
# Zfs create-o compression = on-o atime = off rpool / repo
Now we have a file system repository and the actual data itself in
image, copy the data from the image to your hard drive.
Copying the contents of the image repository
To copy the data you need to mount the image repository, and then copy all
data prepared in the previous step, place:
# Mount-F hsfs $ (lofiadm-a / downloads/osol-repo-0906-full.iso) / mnt
# Rsync-aP / mnt / repo / rpool / repo
Please note: no trailing slash ways fundamentally (for
details, refer to the man rsync.). Once copied image repository
can unmount:
# Umount / mnt
# Lofiadm-d / dev/lofi/1
The last line can be different depending on the number of connected active
the devices. So repository obtained and copied proceed to configure the service.
Setting up the server through the services
Now we need to set up housekeeping service repository, its executable
The file is located in / usr / lib and called pkg.depotd (for details see man pkg.depotd).
Please specify the root directory of our repository which we have prepared
previously:
# Svccfg-s pkg / server setprop pkg / inst_root = / rpool / repo / repo
Optionally, you can specify the port (default is 80). Set the value to 10000:
# Svccfg-s pkg / server setprop pkg / port = 10000
Copy the configuration file and specify the path for the service:
# Cp-p / rpool / repo / repo / cfg_cache / rpool / repo /
# Svccfg-s pkg / server setprop pkg / cfg_file = / rpool / repo / cfg_cache
Next, we correct the configuration file:
# Vi / rpool / repo / cfg_cache
Need to change the setting origins and specify the address of the repository for available for
network name, such http://sunadm.spb.su:10000. Optional, but you can change some
other settings and add the name of your organization eg.
Then you can check if we changed the tincture:
# Svcadm refresh application / pkg / server
# Svcprop pkg / server
And see in the output of the last command made whether our changes. If everything is in order
run the service:
# Svcadm restart application / pkg / server
# Svcadm enable application / pkg / server
The configuration repository is finished. Then configure the client to use
our repository and verify that it is working, and then update the repository and
carry out a final check.
To configure the client and server health check
The client can use our repository or as the main repository or as
mirror repository pkg.opensolaris.org. When using our repository as a mirror
we lose autonomy. In this case, the client performs the search and other operations
metadata using the primary server pkg.opensolaris.org, when you install the package if it
present on our mirror he downloaded from him. When you reach the main server
our system will not work. When using our repository as the core, all
interaction only be with him and our system will gain autonomy. But
Then, if our repository is not updated we will not be the latest version available
packets. To install our repository as mirrors should pkg.opensolaris.org
execute on the client:
# Pkg set-publisher-m http://sunadm.spb.su:10000 opensolaris.org
to set as the main repository:
# Pkg set-publisher-PO http://sunadm.spb.su:10000 vniira.spb.su
Once the repository is set up and connected can check it. For example update
Our data repository, try to update the system, if possible and
install the package, such as nmap:
# Pkg refresh-full
# Pkg image-update
# Pkg search nmap
# Pkg install SUNWnmap
If all goes well, then the repository is functioning normally.
Unfortunately repository version of the ISO image is old enough and therefore not relevant
raises the question of updating it, proceed to the next step.
Update packages and fix checksums
In order to have the current version of the repository in theory there are 3 ways
(Maybe more):
- Setting repository pumping out all packages through pkgrecv / pkgsend
(Http://developers.sun.ru/content/view/338/31/)
- Synchronization via rsync, I have to practice and did not work. Or were
crammed all 8 possible connections or remote server does not answer
this port
- Synchronization with a script language Python ips-mirror.py written by Andrzej
Szeszo and laid out in his blog at http://aszeszo.blogspot.com/2009/07/ipsrepository-
mirror-script_27.html
In this tutorial, we will look at the third method, you will need two script ipsmirror.
py for synchronization and ips_check.py to troubleshoot control
sums.
Download them and copy to the root of our repository:
# Wget http://aszeszo.googlepages.com/ips-mirror.py
# Wget http://github.com/seisen/opensolaris-scripts/raw/master/ips/ips_check.py
# Cp ips-mirror.py / rpool / repo / repo
# Cp ips_check.py / rpool / repo / repo
Now run ips-mirror.py, like this:
# Cd / rpool / repo / repo
# Python ips-mirror.py-l-a i386 http://pkg.opensolaris.org/release
The script will check the contents of the repository OpenSolaris, check the contents of your
repository, update the manifest and packages remove the older versions.
The-l switch indicates that we need only the latest packages and the key-a
architecture. For a complete list of keys, run the script with no parameters.
Often it turns out that in the course of downloading and updating some packages repository
damaged and as a result when you try that either set can be seen around
this error:
pkg: Maximum number of network retries exceeded during download. Details follow:
Invalid content for action with path usr/lib/python2.4/vendorpackages /
radialnet / gui / HostsViewer.py chash failure: expected:
4a28ca3c93af77363b82a1aa442f9f88b49b7d65 computed:
a71f073fa1949496173dcf69675ee8d1f8f67262. (Happened 4 times)
It will help us correcting script ips_check.py, run it like this:
# Cd / rpool / repo / repo
# Python ips_check.py - dir =. /
This script will check all the checksums and remove packages that it does not
true. Accordingly, after he completed if there were reports of damaged
packages should run the script again ips-mirror.py with the same parameters as
primarily for missing packets. Then check again with the help of
ips_check.py, that's all right.
Now you need to run the server once with the key-rebuild for what he recreates
catalog. As it is necessary to rebuild the search indexes, and then can activate the server
normally through the services. Making it all the way:
# Cd / rpool / repo / repo
# / Usr / lib / pkg.depotd-d $ (pwd)-p 10000-rebuild
wait until he finally start then push further:
# Rm-rf. / Index / *
# / Usr / lib / pkg.depotd-d $ (pwd)-p 10000-refresh-index
wait again until he okonchaleno then click Start, then:
# Svcadm enable pkg / server
On this server upgrade is complete, check it as the previous time:
# Pkg refresh - full
# Pkg image-update
# Pkg search nmap
# Pkg install SUNWnmap
Now you have your new repository OpenSolaris. Further Update
can be carried out by the same scheme. Repository also can be written to a file and then
disk (as defined herein http://developers.sun.ru/content/view/338/31/), that would be with someone
share or just to have a backup:
# Zfs snapshot rpool / repo @ distrib
# Zfs send rpool / repo @ distrib> repo.distrib.zfs
If everything works, then that's it. --
http://www.arhipkin.com
Я на Facebook: http://www.facebook.com/ilya.arhipkin
Я на Facebook: http://www.facebook.com/profile.php?id=100000965843704
_______________________________________________
oi-dev mailing list
oi-dev at openindiana.org
http://openindiana.org/mailman/listinfo/oi-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://openindiana.org/pipermail/oi-dev/attachments/20140404/e4d1af7f/attachment-0005.html>
More information about the oi-dev
mailing list