solaris 11 ips software repositories

4
SOLARIS 11 IPS SOFTWARE REPOSITORIES DECEMBER 16, 2013 ADMIN Solaris 11 introduces the IPS or Image Packaging System. This provides a simple way to install, update and manage software across your Solaris 11 platforms. The installation of Solaris will normally provide you with the internet based repositories based in Oracle. Where you have many servers it does make sense to have your own local repository from where software updates can be delivered rather than each host accessing the internet. In this tutorial we look at setting up such a local repository and access the repo both locally from the repo host and remotely for other Solaris 11 Hosts. Download the ISO Files Of course to start this we have to download the repository data. One of the most convenient way is via ISO files on the oracle download site. On the main download page for Solaris : http://www.oracle.com/technetwork/server-storage/solaris11/d ownloads/index.html They are supplied separately for SPARC and Intel servers and as two ISO files for each platform. These need to be downloaded and merged into a single ISO file.

Upload: joao-oliveira-criscuolo

Post on 20-May-2017

218 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Solaris 11 Ips Software Repositories

SOLARIS 11 IPS SOFTWARE REPOSITORIESDECEMBER 16, 2013 ADMIN

Solaris 11 introduces the IPS or Image Packaging System. This provides a simple way to install, update and manage software across your Solaris 11 platforms. The installation of Solaris will normally provide you with the internet based repositories based in Oracle. Where you have many servers it does make sense to have your own local repository from where software updates can be delivered rather than each host accessing the internet. In this tutorial we look at setting up such a local repository and access the repo both locally from the repo host and remotely for other Solaris 11 Hosts.

Download the ISO FilesOf course to start this we have to download the repository data. One of the most convenient way is via ISO files on the oracle download site. On the main download page for Solaris :http://www.oracle.com/technetwork/server-storage/solaris11/downloads/index.html They are supplied separately for SPARC and Intel servers and as two ISO files for each platform. These need to be downloaded and merged into a single ISO file.

Merge the ISOs

Page 2: Solaris 11 Ips Software Repositories

Once downloaded, each file will be 3.8 GB or so, and we can us the cat command to merge them into a single file. Of course, this will mean that we will need double the disk space, so lets say 4 GB for each ISO and 8 for the final target ; 16GB .

# cat sol-11_1-repo-full-iso.a sol-11_1-repo-full-iso.b \

> sol-11-1-repo.full.iso

Mount the ISOmouWe will now mount to ISO file so we can copy the contents to a permanent location, generally using the /mnt directory is a good target for a temporary mount

# mount -F hsfs /iso/sol-11-1-repo.full.iso /mnt

Create the ZFS DatasetIt is worth while creating a ZFS data set to represent the repository data as we can set properties such as not to maintain the last access time and even compression if you feel it is needed. As we will look after just one repo then a top level directory with the name will be the way we approach this.

# zfs create -o mountpoint=/repo -o atime=off rpool/repo

We then simply copy the contents of the /mnt/repo directory through to the repo directory we just created. Make note of the trailing / indication we copy the contents of /mnt/repo/ ; without it we would copy the contents and the directory to the target.

 

# rsync -aP /mnt/repo/ /repo

 # cd /mnt/repo; tar cf - . | (cd /repo; tar xfp -)# cd /export/repoSolaris11

Page 3: Solaris 11 Ips Software Repositories

Configure the Packaging ServerOracle and Solaris do like to make life easy for the administrator, the packaging server ships with the product so we do not need to install and additional web server; we just need to configure it. If we were only to need local file access to this for the one machine then there is nothing to configure:

Set the web root for the repository # svccfg -s application/pkg/server setprop pkg/inst_root=/solaris11Set to read only # svccfg -s application/pkg/server setprop pkg/readonly=trueDouble check by reading back the properties and view the default port # svcprop -p pkg/inst_root application/pkg/server # svcprop -p pkg/readonly application/pkg/server # svcprop -p pkg/port application/pkg/serverHave the service refresh its configuration # svcadm refresh application/pkg/serverStart the service and set for auto-start # svcadm enable application/pkg/serverDisplay the service status # svcs application/pkg/server

Setup local accessIf we need access only for this one machine, perhaps as it will not have access to the internet then there is no need for the packJumpStartaging server as the host itself can access the file system locally. First we refresh the repository data. Then we delete current publishers with the -G option and add the new one with the alias of solaris using the -g option. Big difference between the upper case and lower case g. The command pkg publisher will just display the current repository settings.# pkgrepo -s /repo refresh

# pkg set-publisher -G ‘*’ -g file:///repo solaris

# pkg publisher

Page 4: Solaris 11 Ips Software Repositories

Enable remote clientsFor other Solaris 11 clients we do something very similar but access the repository via HTTP. The root of the server was set to the /repo directory so no addional URI is required at the end of the server name or IP Address on our example

# pkg set-publisher -G ‘*’ -g http://192.168.0.100 solaris

Access to the repository can always be tested via a browser, pointing to the same URL

SummaryWe have seen in this example how quickly it is possible to have a local IPS repository up and running to service software requests for Solaris 11.