Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Oracle Solaris 11 Advanced Administration Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
Oracle Solaris 11 Advanced Administration Cookbook

Oracle Solaris 11 Advanced Administration Cookbook

By : Borges
4.7 (7)
close
close
Oracle Solaris 11 Advanced Administration Cookbook

Oracle Solaris 11 Advanced Administration Cookbook

4.7 (7)
By: Borges

Overview of this book

If you are a Solaris administrator who wants to learn more about administering an Oracle Solaris system and want to go a level higher in utilizing the advanced features of Oracle Solaris, then this book is for you. A working knowledge of Solaris Administration is assumed.
Table of Contents (11 chapters)
close
close
10
Index

Mounting, unmounting, installing, and uninstalling a package in an inactive boot environment

Many times, we want to install a package in an inactive BE and later (maybe at night), boot this BE and test whether the programs are working. Furthermore, we can keep all BEs consistent with each other and have them contain the same packages without booting each one to install a new package.

Getting ready

To follow this recipe, it's necessary that we have a machine (physical or virtual) running Oracle Solaris 11; we log in to the system as the root user and open a terminal.

How to do it…

We use the following commands to install a new package into a new BE (solaris_test_1):

root@solaris11:~# mkdir /solaris_test_1
root@solaris11:~# beadm mount solaris_test_1 /solaris_test_1
root@solaris11:~# beadm list
BE               Active Mountpoint      Space  Policy Created          
--               ------ ----------      -----  ------ -------          
solaris          NR     /               25.94G static 2013-10-05 20:44 
solaris-backup-1 -      -               303.0K static 2013-10-26 22:49 
solaris-backup-a -      -               7.26G  static 2013-10-10 19:57 
solaris_test_1   -      /solaris_test_1 27.37M static 2013-11-05 22:38 

We install the package in this mounted boot environment by running the following command:

root@solaris11:~# pkg -R /solaris_test_1 install unrar
Packages to install: 1
DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                                1/1           6/6      0.1/0.1  656k/s
PHASE                                          ITEMS
Installing new actions                         19/19
Updating package state database                 Done 
Updating image state                            Done 
Creating fast lookup database                   Done

The unrar package was installed into the new BE (solaris_test_1) and not into the current one (solaris). Proving this fact is easy:

root@solaris11:~# unrar
bash: unrar: command not found
root@solaris11:~#

Note

The same package can be removed using the following command:

root@solaris11:~# pkg -R /solaris_test_1 uninstall unrar

Once the unrar package has been installed, we can unmount the BE by running the following commands:

root@solaris11:~# beadm umount solaris_test_1
root@solaris11:~# beadm list
BE               Active Mountpoint Space   Policy Created          
--               ------ ---------- -----   ------ -------          
solaris          NR     /          25.94G  static 2013-10-05 20:44 
solaris-backup-1 -      -          303.0K  static 2013-10-26 22:49 
solaris-backup-a -      -          7.26G   static 2013-10-10 19:57 
solaris_test_1   -      -          122.88M static 2013-11-05 22:38 

An overview of the recipe

This neat recipe taught us how to mount an inactive boot environment and install a package into this inactive BE by using the -R option to specify the mount point.

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY