Académique Documents
Professionnel Documents
Culture Documents
Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054 U.S.A.
Part No: 8196394 May 2008
Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is described in this document. In particular, and without limitation, these intellectual property rights may include one or more U.S. patents or pending patent applications in the U.S. and in other countries. U.S. Government Rights Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. This distribution may include materials developed by third parties. Parts of the product may be derived from Berkeley BSD systems, licensed from the University of California. UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd. Sun, Sun Microsystems, the Sun logo, the Solaris logo, the Java Coffee Cup logo, docs.sun.com, NetBeans, OpenSolaris, Sun HPC ClusterTools, VirtualBox, Java, and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc. The OPEN LOOK and SunTM Graphical User Interface was developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun's licensees who implement OPEN LOOK GUIs and otherwise comply with Sun's written license agreements. Products covered by and information contained in this publication are controlled by U.S. Export Control laws and may be subject to the export or import laws in other countries. Nuclear, missile, chemical or biological weapons or nuclear maritime end uses or end users, whether direct or indirect, are strictly prohibited. Export or reexport to countries subject to U.S. embargo or to entities identified on U.S. export exclusion lists, including, but not limited to, the denied persons and specially designated nationals lists is strictly prohibited. DOCUMENTATION IS PROVIDED AS IS AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. Copyright 2008 Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, CA 95054 U.S.A. Tous droits rservs.
Sun Microsystems, Inc. dtient les droits de proprit intellectuelle relatifs la technologie incorpore dans le produit qui est dcrit dans ce document. En particulier, et ce sans limitation, ces droits de proprit intellectuelle peuvent inclure un ou plusieurs brevets amricains ou des applications de brevet en attente aux Etats-Unis et dans d'autres pays. Cette distribution peut comprendre des composants dvelopps par des tierces personnes. Certaines composants de ce produit peuvent tre drives du logiciel Berkeley BSD, licencis par l'Universit de Californie. UNIX est une marque dpose aux Etats-Unis et dans d'autres pays; elle est licencie exclusivement par X/Open Company, Ltd. Sun, Sun Microsystems, le logo Sun, le logo Solaris, le logo Java Coffee Cup, docs.sun.com, NetBeans, OpenSolaris, Sun HPC ClusterTools, VirtualBox, Java et Solaris sont des marques de fabrique ou des marques dposes de Sun Microsystems, Inc. aux Etats-Unis et dans d'autres pays. Toutes les marques SPARC sont utilises sous licence et sont des marques de fabrique ou des marques dposes de SPARC International, Inc. aux Etats-Unis et dans d'autres pays. Les produits portant les marques SPARC sont bass sur une architecture dveloppe par Sun Microsystems, Inc. L'interface d'utilisation graphique OPEN LOOK et Sun a t dveloppe par Sun Microsystems, Inc. pour ses utilisateurs et licencis. Sun reconnat les efforts de pionniers de Xerox pour la recherche et le dveloppement du concept des interfaces d'utilisation visuelle ou graphique pour l'industrie de l'informatique. Sun dtient une licence non exclusive de Xerox sur l'interface d'utilisation graphique Xerox, cette licence couvrant galement les licencis de Sun qui mettent en place l'interface d'utilisation graphique OPEN LOOK et qui, en outre, se conforment aux licences crites de Sun. Les produits qui font l'objet de cette publication et les informations qu'il contient sont rgis par la legislation amricaine en matire de contrle des exportations et peuvent tre soumis au droit d'autres pays dans le domaine des exportations et importations. Les utilisations finales, ou utilisateurs finaux, pour des armes nuclaires, des missiles, des armes chimiques ou biologiques ou pour le nuclaire maritime, directement ou indirectement, sont strictement interdites. Les exportations ou rexportations vers des pays sous embargo des Etats-Unis, ou vers des entits figurant sur les listes d'exclusion d'exportation amricaines, y compris, mais de manire non exclusive, la liste de personnes qui font objet d'un ordre de ne pas participer, d'une faon directe ou indirecte, aux exportations des produits ou des services qui sont rgis par la legislation amricaine en matire de contrle des exportations et la liste de ressortissants spcifiquement designs, sont rigoureusement interdites. LA DOCUMENTATION EST FOURNIE "EN L'ETAT" ET TOUTES AUTRES CONDITIONS, DECLARATIONS ET GARANTIES EXPRESSES OU TACITES SONT FORMELLEMENT EXCLUES, DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS NOTAMMENT TOUTE GARANTIE IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A L'APTITUDE A UNE UTILISATION PARTICULIERE OU A L'ABSENCE DE CONTREFACON.
080507@19860
Contents
Getting Started With OpenSolaris 2008.05 ...................................................................................... 7 Overview of OpenSolaris 2008.05 ........................................................................................................7 Live CD and Installer ......................................................................................................................7 Image Packaging System (IPS) ......................................................................................................9 Upgrading and Managing Your Boot Environments .................................................................9 OpenSolaris Documentation .........................................................................................................9 Roadmap .............................................................................................................................................. 10 System Requirements .......................................................................................................................... 11 Login and Root Specifications ........................................................................................................... 11 How to Troubleshoot OpenSolaris Login ................................................................................. 12 Limitations for the OpenSolaris 2008.05 Release ............................................................................ 13 Using Device Driver Utility Version 1.0 ........................................................................................... 13 Preparing for a Multiboot Environment .......................................................................................... 14 Partitioning a Multiboot System ........................................................................................................ 15 How to Partition a System ........................................................................................................... 15 Installing OpenSolaris 2008.05 .......................................................................................................... 17 How to Install OpenSolaris 2008.05 ........................................................................................... 17 Setting up Your Developer Environment ......................................................................................... 23 Running OpenSolaris Using VirtualBox .......................................................................................... 24 How to Download the OpenSolaris Live CD ............................................................................ 24 How to Download the VirtualBox Application ........................................................................ 25 How to Install VirtualBox on a Windows Machine ................................................................. 25 How to Install VirtualBox on a Linux Machine ........................................................................ 26 How to Install VirtualBox on a Macintosh (Intel) Machine ................................................... 27 How to Set up VirtualBox for Use with OpenSolaris ............................................................... 28 How to Start OpenSolaris 2008.05 Using VirtualBox .............................................................. 29 Installing on a Mac OS X System and Parallels ................................................................................ 30 How to Install When Using Parallels ......................................................................................... 30
3
Getting Started With the Image Packaging System ...................................................................... 35 IPS Overview ........................................................................................................................................ 36 IPS Commands ............................................................................................................................. 36 Package Manager (IPS GUI) ....................................................................................................... 37 IPS for End Users (Tasks) ................................................................................................................... 37 Installing, Upgrading, and Managing Packages ....................................................................... 37 How to Perform a Dry-Run Installation Inside a New Image ......................................... 39 How to Install a Package ...................................................................................................... 40 How to Verify a Package Installation ................................................................................. 41 How to Search for Packages ................................................................................................. 41 How to Update All Installed Packages ............................................................................... 42 How to Display the State of Packages ................................................................................. 42 How to List the Action Attributes of a Package ................................................................. 43 How to List Information About a Package ........................................................................ 45 How to Uninstall Packages .................................................................................................. 46 How to Add or Update an Authority .................................................................................. 46 How to Remove Authority Configuration ......................................................................... 47 How to Display Authority Information ............................................................................. 47 Installing Developer Software (Tasks) .............................................................................................. 48 How to Install OpenOffice.org ................................................................................................... 48 How to Install NetBeans 6.0.1 ..................................................................................................... 49 How to Install Sun Studio Express 5/08 ..................................................................................... 49 How to Install Sun HPC ClusterTools 7.1 ................................................................................. 50 How to Install Web Stack Tools and UI .................................................................................... 51 How to Install GlassFish Java EE 5 Application Server ............................................................ 52 IPS for Developers (Commands) ...................................................................................................... 53 The Publication Client pkgsend(1) ............................................................................................ 53 Actions in IPS ............................................................................................................................... 55 Overview of the Depot Server pkg.depotd ............................................................................... 58 IPS For Developers (Tasks) ................................................................................................................ 59 How to Create Your Own OpenSolaris Repository Using pkg.depotd(1) Command ........ 60 How to Create Your Own OpenSolaris Repository Using Smf Commands ......................... 60 How to Create and Publish an IPS Package .............................................................................. 61
How to Publish SVR4 Packages to Your Repository ................................................................ 63 Further Information ............................................................................................................................ 64 Building JDS on OpenSolaris 2008.05 ....................................................................................... 64 Contributing to IPS ...................................................................................................................... 64 How to File a Bug Report for IPS ................................................................................................ 64 pkg(1) Command Reference ............................................................................................................. 65 Glossary ................................................................................................................................................ 67 NetBeans Packages .............................................................................................................................. 68 Sun Studio Express 5/08 Packages ..................................................................................................... 68 Web Stack Packages ............................................................................................................................ 69
Upgrading and Managing Your Boot Environments ..................................................................... 73 Upgrading a Boot Environment ........................................................................................................ 73 Updating Specific Packages ........................................................................................................ 74 Upgrading from OpenSolaris Preview 2 to OpenSolaris 2008.05 ................................................. 75 Managing Your Boot Environments (Tasks) ................................................................................... 75 Advantages of BE Utility ............................................................................................................. 76 BE Utility Requirements ............................................................................................................. 76 Limitations in Current Release ................................................................................................... 77 How to Create a New BE, Based on the Active BE .................................................................... 77 How to Create a New BE, Based on an Inactive BE .................................................................. 79 How to Create a Snapshot of a BE .............................................................................................. 80 How to Create a BE From an Existing Snapshot ...................................................................... 80 How to Activate an Existing BE .................................................................................................. 81 How to Mount a BE ...................................................................................................................... 81 How to Unmount an Existing BE ............................................................................................... 81 How to Destroy an Existing BE .................................................................................................. 82 How to Rename a Boot Environment ........................................................................................ 83 How to Display Information About Your BE, Snapshots, and Datasets ............................... 83 beadm Command Reference ............................................................................................................... 85 Glossary ................................................................................................................................................ 88
C H A P T E R
This Getting Started guide provides instructions for installing and using the OpenSolarisTM 2008.05 release, including the following topics: How to prepare for and to install the OpenSolaris 2008.05 release on your x86 system. See Roadmap. How to run the OpenSolaris 2008.05 release as a VirtualBoxTM guest operating system. See Running OpenSolaris Using VirtualBox. How to install packages and update existing packages on your installed or mounted system, including how to install developer tools such as NetBeansTM 6.0.1, OpenOffice.org, and SunTM Studio Express 5/08. See Image Packaging System Documentation. How to upgrade your boot environment, and how to manage multiple boot environments. See Upgrading and Managing Your Boot Environments.
For a general description of the purpose and function of a Live CD, see What is a Live CD? To download the Live CD image, go to the www.opensolaris.com/get site and select a link to download OpenSolaris 2008.05.
Note At this site, you can choose between a complete installation with all available languages,
or a slimmer installation with selected languages and faster installation time. Note the following Live CD options:
You can choose another language for the Live CD. OpenSolaris has language support for more than forty languages. Input and output support for these additional languages can be activated on the Live CD as follows: 1. Log out of the Live CD desktop. 2. Use the Option button on the login screen to choose the desired language. 3. Log in to the Live CD.
If you are prompted to log in to the Live CD, both the user name and password are jack. Root login is not enabled either on the Live CD or on the installed system. You must log in as the user that you created during the installation. After you log in, you can then become superuser to configure the system. Because root is a role, open a terminal window and use the su command to assume the role, or the pfexec sh command to run commands in a privileged shell. The root password for the Live CD is opensolaris. For further information, see Login and Root Specifications on page 11. You can install the OpenSolaris 2008.05 release from the Live CD. Start the installer by selecting the Installer icon on the Live CD desktop. The installer enables an initial installation of the CD's contents to an x86 system. The installed root(/) file system is ZFS.
Caution The installer can perform an initial installation into a Solaris partition or use an
entire disk. Installation overwrites all software and data on the selected target. See the complete installation instructions at Roadmap. To mount the OpenSolaris OS in a VirtualBox, see instructions for Running OpenSolaris Using VirtualBox on page 24. To upgrade an existing OpenSolaris OS, do not use the installer. Instead, see the instructions at Upgrading a Boot Environment on page 73.
OpenSolaris Documentation
For more information about the OpenSolaris environment, see the following sites.
TABLE 11 Resource
Additional Documentation
Topic
A local copy of this introductory document is available on the Live CD desktop. Highlights key documentation for the OpenSolaris 2008.05 release.
TABLE 11 Resource
Additional Documentation
(Continued)
Topic
Lists complete documentation for all OpenSolaris releases, including documents targeted for developers, system administrators, and end users. Main hub for ZFS documentation in the OpenSolaris community. Main hub for xVM hypervisor documentation in the OpenSolaris community Release Notes for the OpenSolaris 2008.05 release.
Roadmap
With the OpenSolaris 2008.05 release, choose from the following installation options:
To run the OpenSolaris ISO image as a guest in a VirtualBox, see instructions for Running OpenSolaris Using VirtualBox. To install an OpenSolaris guest on a hypervisor, based on the Xen open source project, see Installing OpenSolaris on Xen. For further information about the OpenSolaris xVM hypervisor, see OpenSolaris xVM Documentation. To install the OpenSolaris OS from the Live CD onto your system, use the following installation procedure. Verify that your x86 system meets the System Requirements. Review the Login and Root Specifications and the Limitations for the OpenSolaris 2008.05 release. Verify that you have installed all necessary device drivers by using the Device Driver Utility 1.0. If the OpenSolaris OS will be the only operating system installed on your x86 system, see instructions to Install the OpenSolaris OS. If you will be setting up a multiboot environment, review specifications at Multiboot Environment. a. Back up your system. This step is strongly recommended when repartitioning your system. b. Create a Partition for installing the OpenSolaris OS on your system. If you already have a Solaris fdisk partition on your system, the installation overwrites this partition.
1. Check the requirements and limitations for running the installer on your x86 system:
10
System Requirements
Requirement Description
The minimum requirement is 512 MB. Recommended size is at least 10 GB. If you are installing OpenSolaris on a system that will have more than one OS, use the fdisk command or a third-party partitioning tool to create a new partition or to make adjustments to preexisting partitions. See Create a Partition. For multibooting information about specific operating systems, see Preparing for a Multiboot Environment.
In addition to these system requirements, also review Login and Root Specifications and Limitations for OpenSolaris 2008.05 Release.
Root login is not enabled either on the Live CD or on the installed system. You must log in as the user that you created during the installation. After you log in, you can then become superuser to configure the system. Because root is a role, open a terminal window and use the su command to assume the role, or the pfexec sh command to run commands in a privileged shell.
Note If you try to log in to the installed system as root, an error message displays. Click OK and log in as the local user that you created during the installation.
Root is a role per Role-Based Access Control (RBAC) specifications. However, if you do not create a user account during the installation, root is set up as a normal account on the installed system, instead of as a role. This is the only situation where you can log in to the installed system as root without manually changing the role assignment for root. After you install the OpenSolaris 2008.05 release, if you wish to manually change the installed system to permit root logins, remove root as an assigned role for users. Then, type the following at the command line:
11
If you forget the local user name or password that you entered during the installation, you must boot the system into Maintenance Mode as described in How to Troubleshoot OpenSolaris Login.
RBAC Documentation
Topic
rbac(5) man page RBAC: An Alternative to the Superuser Model Using RBAC (Task Map)
Instructions for Role-Based Access Control Introduction to roles in the OpenSolaris environment Instructions about using existing roles or customizing roles
At this time, the OpenSolaris 2008.05 release is for x86 platforms only. The installer cannot upgrade an existing operating system. The installer can perform an initial installation into Solaris partition or use an entire disk. Installation overwrites all software and data on the selected target. This release does not support JumpStart installations. And, this release does not support Live Upgrade. However, you can upgrade all installed packages on your installed system by using the Image Packaging System. See Upgrading and Managing Your Boot Environments. The entire content of a preexisting Solaris partition is overwritten during the installation. Existing file systems cannot be preserved. The OpenSolaris OS installs a ZFS root file system, not a UFS root file system, on the disk selected during installation. The ZFS pool installed initially consists of the entire Solaris fdisk partition on the selected disk. After the initial installation is complete, you can add additional disks to this pool to create a mirrored pool configuration . For further information, see ZFS Documentation.
provided there is an active network connection. Any drivers that are downloaded from the IPS repository on the Live CD will also be included in the OpenSolaris OS that is installed from the Live CD. On the installed system, the Device Driver Utility can be started from the System>Administration menu. The DDU finds drivers that are missing on your installed system and downloads these drivers from the IPS repository. Drivers can also be updated from the repository, using the same update process that is used to update other packages. For instructions about how to use the IPS repository, see Image Packaging System Documentation. For further information, refer to the online help in the utility menu. If you have questions, email the support alias, driver-utility-feedback@sun.com.
Running OpenSolaris Using VirtualBox. If you are installing on a system that is running the Mac OS X, and you have installed Parallels, see Installing on a Mac OS X System and Parallels.
TABLE 13 Existing OS
Multiboot Environments
Description
Windows
If you have Windows installed, and you set up enough space to install the OpenSolaris OS, the installation should be straightforward. All versions of the OpenSolaris OS release use the GRUB bootloader. These OpenSolaris releases recognize Windows and ensure that the Windows partitions remain unchanged by default. When the OpenSolaris installation is finished, the GRUB menu gives you the option to boot either the Windows system or the OpenSolaris system. If you are using VMware, see Getting Started With OpenSolaris Using VMware.
14
TABLE 13 Existing OS
Multiboot Environments
Description
(Continued)
If you have Linux installed, or Linux and Windows installed, and you are currently booting through GRUB, save and print out your /boot/grub/menu.lst GRUB menu file from the Linux system before installing the OpenSolaris OS. You must replace this information in the /boot/grub/menu.lst file when you finish booting. See grub(5) man page.
Note If you are installing the OpenSolaris OS on a multiboot system that also
contains the Linux OS, the Solaris partition must precede the Linux swap partition. Solaris 10 OS The installer cannot be used to multiboot the OpenSolaris OS. However, the installer can be used to replace instances of Solaris 10 1/06 and later, and instances of Solaris Express, in an existing multiboot Solaris system. If you have another OS on an extended partition, the existing extended partition is not changed and is not lost during an OpenSolaris release installation. Existing extended partitions are not visible during the OpenSolaris release installation, but the primary fdisk partition in which the extended partition resides is visible. No data in these partitions is lost due to the installation. The OS on an extended partition is not displayed on the GRUB menu. To update the GRUB menu, see the GRUB overview at x86: Administering the GRUB Bootloader. See also menu.lst file specifics at x86: Booting a Solaris System with GRUB.
Extended Partitions
15
Create a partition on your hard drive for installing the OpenSolaris OS. If you are installing OpenSolaris on a system that will have more than one OS, use the fdisk command or a third-party partitioning tool to create a new partition or to make adjustments to preexisting partitions. Choose one of the following options:
Use the fdisk command to create or modify a Solaris fdisk partition. For instructions, see x86: How to Create a Solaris fdisk Partition. See, also, the fdisk(1M) man page.
Note The OpenSolaris 2008.05 installer automatically creates a swap slice within the fdisk partition that you set up.
Use commercial products or open-source tools to partition your hard drive. GParted is an open-source tool for disk partitioning. The ISO image for the GParted tool can be downloaded from the GParted web site. Use this download to burn a CD that includes the GParted tool. See the dual-boot partitioning video. This video provides sample step-by-step instructions that explain how to shrink a Windows XP system in order to make room for a Linux swap partition. Linux-swap is the same partition ID that Solaris uses. During the installation, in the disk partitioning step, you can change this Linux-swap partition to a Solaris partition.
Use the installer to install the OpenSolaris OS to the Solaris fdisk partition as described in the next section. The demos that are referenced in this section show you how to partition a system that has Windows XP installed on it. See Backing Up the Disk Media Content and dual-boot partitioning. Additional sample instructions are posted in the OpenSolaris community for the following dual-boot procedures:
See Also
OpenSolaris with MacOS on MacBook Pro OpenSolaris and Ubuntu Linux Dual-Boot Installation Instructions OpenSolaris and Microsoft Vista Dual-Boot Installation Instructions
16
copy of the menu.lst file. The contents of the GRUB menu.lst file dictate what is displayed in the GRUB menu when you boot the system. You will need to update the GRUB menu after the installation. For further information, see menu.lst file specifics at x86: Booting a Solaris System with GRUB. The following default settings are used for this release.
The installation uses a previously created Solaris fdisk partition to create a ZFS storage pool. If a second disk is available, you can add a second disk to the ZFS pool to create a mirrored configuration. This release installs an OpenSolaris system that is automatically networked by using DHCP with DNS name resolution. The nwamd daemon is enabled by default. nwamd introduces an alternate instance of the network or physical SMF service that enables automated network configuration. For further information, see the man page at nwamd(1M). The nwamd(1M) man page provides instructions about how to disable or enable the network/physical:nwam instance.
IPv6 is disabled. The DNS domain and server IP addresses are retrieved from the DHCP server.
17
To start the installer from the Live CD desktop, select the Installer icon on the Live CD desktop.
Note If you are prompted to log in to the Live CD, both the user name and password are jack. The root password is opensolaris.
A text prompt enables you to select an installer language before the installer begins. The default language is English. The installer begins.
2
Complete any additional selections in the preliminary installation panels. Note the following important considerations:
The installation overwrites the whole disk layout if one of the following is true:
The disk table cannot be read. The disk was not previously partitioned.
If an existing Solaris fdisk partition is on a multiboot system, and the user makes no modifications to the existing partitions, the installation overwrites the Solaris fdisk partition only. Other existing partitions are not changed.
In the Disk panel, select disk and partition location for the OpenSolaris OS. a. In the top portion of the Disk panel, select the disk where the OpenSolaris OS will be installed. The top portion of this panel displays the internal disks, external disks, and solid-state drives that are available on the system. This panel also displays the size of each disk in gigabytes.
Note To be recognized by the installer, the disks and solid-state drives must be plugged in before the installer begins.
The recommended size and minimum size for the OpenSolaris OS installation are displayed. Disks that are too small for a successful installation are labeled as such. The recommended size is at least 10 Gbytes. b. In the bottom portion of the Disk panel, click to either Use the whole disk or Partition the disk. The bottom portion of this panel displays the existing disk partitioning.
18
Caution If the existing partition table cannot be read, a warning is displayed, and the panel
displays proposed partitioning. In this case, all data on the disk is destroyed.
If you choose to partition the disk, review the following partitioning guidelines, then revise the partitioning panel settings as needed.
Only one Solaris partition is allowed. If an existing Solaris partition is available, that Solaris partition will be the target for the installation. Or, if you do not have an existing Solaris partition, you can change any existing partition to a Solaris partition. You can resize existing partitions, delete partitions, and create new partitions in this panel. For this option, one existing Solaris partition must be available as the target for the installation.
Caution The partitions are displayed in physically sequential order as they are laid out on the disk. Resizing a Solaris partition destroys the data on that partition and all physically subsequent partitions. Existing data is not moved to conform to a new partition layout. However, resizing the last partition or appending a new partition does not affect the data that already exists in other partitions. Non-Solaris partitions cannot be resized.
Caution To make additional space available, you can change an existing partition to Unused. However, if you change an existing partition to Unused, all subsequent non-Solaris partitions are also changed to Unused.
Caution New partitions can only use the available space that follows the last defined partition. The installer cannot utilize unallocated chunks of space between existing defined partitions. Use the fdisk(1M) command to create new partitions that use the free space between exiting partitions.
If you used a third-party partitioning tool such as GParted, then the Disk panel displays a partition named Linux-swap on which you can install the OpenSolaris OS.
Note In this panel, use the drop-down list for the Linux-swap partition name to change the partition name to Solaris.
19
Note Manual control of the OpenSolaris file system layout is not supported. During the installation, the Solaris fdisk partition is reformatted with a default ZFS file system layout. All existing file systems on the Solaris partition are destroyed.
The installation uses a Solaris fdisk partition to create a ZFS storage pool. If a second disk is available, you can, after the installed system has been booted, add a second disk to the ZFS pool to create a mirrored configuration. To create a mirrored configuration, use the ZFS attach command to add a second disk to the storage pool. For example:
# zpool attach rpool c0t2d0s0 c0t4d0s0
The following example illustrates a ZFS file system setup with a non-redundant configuration:
# zpool pool: state: scrub: config: status rpool ONLINE none requested
In the same panel, you can choose instead to install the OpenSolaris OS on the whole disk.
Caution This option erases the existing disk. The entire disk is overwritten with the new OpenSolaris OS.
20
Complete time zone, date, and time settings. The next panel enables you to type the correct time zone, date, and time for the system to be installed. The top half of the panel displays a world map with major cities marked. The bottom half of the panel provides drop-down selections. You can choose the time zone either from the map or from the drop-down list.
If you select the time zone from the map, click on a city or click anywhere on the map. If you click on the map, but not on a city, the map automatically magnifies that area. You can click on a location within that magnified area. You can drag the cursor to move the magnified area to a different location on the map. When you select a site on the map, the drop-down selections automatically populate with the time zone, date, and current time for that map selection. You can right-click to deselect magnification.
Instead of using the map, you can make your selections in the drop-down fields. Select your region, then select Location. Finally, select time zone. The options for each drop-down are determined by the selection made in the prior drop-down.
Note You can edit the default date and time that is provided.
Select language and locale, then click Next. The next panel enables you to select a language and locale. These selections determine the language support, the default date and time, and other data formats for the installed system.
You can accept the default language selection or change the selection. A language selection is required. You can select no default language support. The language chosen automatically determines the available locales in the drop-down box. Only one locale can be selected.
Note Anytime that you log in to the installed system, you can change either the locale for that
particular session or the default locale by using the Options button in the Login dialog box.
6
Complete the user settings and click Next. Review the following guidelines:
Root login is not enabled either on the Live CD or on the installed system. You must log in as the user that you create in this panel. After you log in, you can then become superuser to configure the system.
21
Note If you do not create a user account in this panel, root is set up as a normal account on
the installed system, instead of as a role. This is the only situation where you can log in to the installed system as root. For further information, see Login and Root Specifications on page 11.
Both the root password and user account are optional. However, for better security, do complete these fields. If the root password is not defined, a reminder is displayed when you click Next. If you do not want to define a root password, you can proceed.
A user account requires only a Login name for the account to be valid. For better security, however, do complete all fields. If the user account information is not valid, a reminder is displayed when you click Next. If you do not want to define a user account, you can proceed.
Type a computer name or accept the default. The computer name field cannot be blank.
During the installation, a progress bar is displayed. The final panel displays completion messages. You can review the installation log in this panel. You can either quit or reboot from this panel.
After a successful installation, to start the installed system, select Reboot. The reboot process might take a few minutes.
Note Eject the Live CD as the next boot begins. Or, select the "Boot from Hard Disk" option on the GRUB menu.
22
Next Steps
After you have installed the OpenSolaris OS, complete the following optional tasks.
After you have installed the OpenSolaris OS, if you have another operating system on your system, you might need to update the GRUB menu. The GRUB menu displays a list of operating systems that can be booted. Solaris and Windows operating systems are displayed automatically on the GRUB menu. The contents of the GRUB menu.lst file dictate what is displayed in the GRUB menu when you boot the system. If you have an additional OpenSolaris OS or a Linux OS that is not displayed on the menu, you need to edit the GRUB menu.lst file. For further information, see menu.lst file specifics at x86: Booting a Solaris System with GRUB. If you are unable to log in to your installed system, or if you want to customize the roles that were set up during the installation, see Login and Root Specifications on page 11.
If you want to add software to your installed operating system, you can use the tools that are included in the OpenSolaris 2008.05 release.
The OpenSolaris OS includes the Image Packaging System. With IPS, you can select versioned builds of components to manage or create your own custom OpenSolaris distribution. IPS packages that are not included in the initial installation image, such as developer tools, can be downloaded after the installation. IPS commands access packages from the network repositories. Both IPS packages and SVR4 packages are supported. Image Packaging System Documentation contains man pages and a Getting Started guide.
The OpenSolaris 2008.05 release provides new and enhanced tools that enable you to upgrade an existing OpenSolaris system and to manage multiple boot environments. You can upgrade an installed boot environment (BE) by using the Image Packaging System. Use the pkg image-update command to update all installed packages in the current image to the latest available version. In the OpenSolaris 2008.05 release, you can use a new BE utility to create and manage snapshots and clones of your BEs. The BE utility enables you to effectively manage multiple OpenSolaris boot environments on a single system. For information, see Upgrading and Managing Your Boot Environments.
23
Windows
Windows 2000 Service Pack 3 at minimum Windows XP All service packs Windows Server 2003 Windows Vista 32-bit and 64-bit Debian GNU/Linux 3.1 at minimum Fedore Core 4 at minimum Gentoo Linux Redhat Enterprise Linux 3 at minimum SuSE Linux 9 at minimum OpenSuSE 10.1 at minimum Ubuntu 5.10 at minimum Mandriva 2007.1 and 2008.0
Use these steps to set up OpenSolaris in VirtualBox: 1. 2. 3. 4. Download the OpenSolaris ISO image. Download and install VirtualBox. Set up VirtualBox for OpenSolaris. Start OpenSolaris inside VirtualBox.
After the VirtualBox software is successfully installed on your machine, you can run the OpenSolaris ISO image as a virtual guest. You do not need to burn a DVD.
Note At this site, you can choose between a complete installation with all available languages,
Save the Live CD image to a location on your machine. Depending on the speed of your Internet connection, the download takes several minutes.
1 2 3 4
5 6
Save the file to your local disk. When the download is complete, close the browser.
3 4
Accept the default location, C:\Program Files\Sun\VirtualBox\. Or click the Browse button and type your preferred location.
25
Click the Install button. When the completion message is displayed, click Finish.
1 2 3
Open a terminal window and become root. Navigate to the downloaded VirtualBox installation file. Depending on your Linux distribution, start the installation process by using one of the following commands:
On rpm-based systems, such as Fedora, SuSE, or Red Hat, type the following:
rpm -ihv filename
The installer searches for a precompiled kernel module. If no kernel module is available that is precompiled for your system, the installer attempts to compile and install a kernel module.
26
Note You need to have basic build utilities, such as gcc, make, binutils, and kernel header, installed for the installer to be able to build the kernel module. Usually, these utilities are part of the standard installation of your Linux system. If these utilities are not present, the installer will be unable to build the kernel module. In this case, install the build utilities and manually start the kernel module compilation later by running /etc/init.d vboxdrv setup as root. 4
Add the current user to the vboxusers group. a. In a terminal window, type:
sudo usermod -G vboxusers -a username
Replace username with the name of the current user. b. Log out and log in again to apply the changes.
5 6
Open a terminal window, type VirtualBox, and press Enter to start the VirtualBox. Accept the license agreement.
1 2 3 4 5
6 7
27
On Windows, click the Start button, and select VirtualBox from the list of programs. On Linux, open a terminal window, type VirtualBox, and press Enter. On Mac OS X, open Applications in the Finder and double-click VirtualBox.
On the first start of VirtualBox, type your registration information and click Confirm. The main VirtualBox window appears. Click the New icon on the left side of the GUI, and click Next in the pop-up window. Type a name for your virtual machine, and select Solaris as the operating system, from the drop-down list. Click Next. Select the amount of RAM to allocate to the OpenSolaris installation inside VirtualBox. Click Next.
Note 512 Mbytes is the recommended minimum size. If you have 2 Gbytes or more of memory on your machine, you should choose 1 Gbytes for optimum performance. See the substep C in the following step.
3 4
Add a Virtual Disk Image (vdi) by selecting a name or adding a new name to the list. For the initial installation, follow these substeps: a. Select New and click Next. b. Accept the default Dynamically Expanding Image and click Next. c. Accept the default name, or type a path and name, and allocate space for the image. d. When you've completed the settings, click Next. e. Click Finish to create the disk image.
7 8
When the initial Virtual Disk Manager GUI appears with your new vdi file selected, click Next. Review the Summary GUI and Click Finish. The main VirtualBox window appears. Your virtual OpenSolaris machine is displayed in the left panel, and is ready to use as a virtual machine.
Getting Started With OpenSolaris 2008.05 May 2008
28
9 10 11
Click the CD/DVD-ROM link on the right-hand side, in the Details tab. Check Mount CD/DVD Drive and select ISO Image File. In the drop-down list, select the downloaded OpenSolaris ISO image. If the ISO image is not in the list, add the image as follows: a. Click the Select icon in the right of the drop-down list. b. Click the CD/DVD Images tab. c. Click the Add icon. d. Navigate to the downloaded OpenSolaris ISO image file and click Open. e. Click Select and close the Settings screen.
On Windows, click the Start button and select VirtualBox from the list of programs. On Linux, select VirtualBox from the System Tools menu (GNOME desktop) or from the System menu (KDE desktop). On Mac OS X, open Applications in the Finder and double-click VirtualBox.
OpenSolaris ISO image file is selected. The GRUB boot menu with three options is displayed. Then a SunOS Release message is displayed. Finally, a list of languages appears.
3
When the list of keyboard layouts appears, type the number for your keyboard layout. For example, type 41 for US-English. Then press Enter.
29
Note When you click inside the VirtualBox window with your virtual machine running, the mouse cursor is trapped inside the virtual desktop. Use the Host Key to release the mouse cursor again. The Host Key is indicated at the lower right corner of the VirtualBox window. By default, the Host Key is the right Ctrl key on Windows and Linux, and the left Cmd key on Mac OS X. 4 5
Select the language for the desktop and press Enter. Review and close the licensing agreement. When the desktop screen appears, you are in the box and running OpenSolaris 2008.05 in Live CD mode. To install OpenSolaris 2008.05 on your virtual hard disk, click the Install OpenSolaris icon on the desktop. See Installing OpenSolaris 2008.05 on page 17 for installation instructions. The following resources provide supplemental information about how to use OpenSolaris in a VirtualBox environment. OpenSolaris VirtualBox on MacOS See the following blog for specific instructions for setting up an OpenSolaris OS in a VirtualBox on Ubuntu.
See Also
Install VirtualBox on Ubuntu 7.04 Getting Started With Indiana on Ubunto 7.04 and VirtualBox Installing Indiana on Ubuntu 7.04 using VirtualBox
1 2
30
Continue the installation of the OpenSolaris OS. For installation instructions, see Slim Install Documentation.
After installation of the OpenSolaris 2008.095 release, install the network driver. For a sample installation that includes instructions for installing the network driver, see OpenSolaris in Parallels VM on Mac OS X.
The two instances will be listed: one as disabled, the other as online. If the nwam instance is online then this daemon will be running. The two instances correspond to the two modes of network configuration: the default instance is for manual mode, while the nwam instance is for auto-magic mode. To go from manual mode to auto-magic mode:
% svcadm disable svc:/network/physical:default % svcadm enable svc:/network/physical:nwam
CAUTION: When switching modes like this, all network interfaces will be brought down then back up, thus if a different IP address is configured in this process, existing applications and sessions may be disrupted.
31
Note In auto-magic mode, there is a limitation that only one link is active at a time. This mode
is thus not recommended for machines which use more than one link at once. For machines with wired and wireless links, wired is preferred by default, although this can be adjusted by altering the order of the lines in the plain text file /etc/nwam/llp. Note, however, that this interface is Volatile and may change in a future release. PROFILES: Note that all interfaces listed in this section are Volatile and may change in a future release. They are documented here so that those wishing to experiment with this may do so. Profiles are a mechanism for making multiple related changes to the system configuration after IP service is available. There is not direct support for them yet, but a roll your own mechanism is provided for now. Once an interface is brought up and an IP address is configured for it, the daemon looks for /etc/nwam/ulp/check-conditions; if it exists and is executable, it is run. This is expected to print a single line of output, which is the name of the profile which the user wishes to be activated based on the current conditions. If such a line is read successfully (foo in this example), then /etc/nwam/ulp/foo/bringup is executed. Likewise, when the interface gets torn down for whatever reason, /etc/nwam/ulp/foo/teardown is executed. The bringup and teardown scripts are invoked via pfexec(1) with default basic privileges. Samples for each of these scripts can be found at:
WIRELESS: When no wired link is available, a scan for wireless LANs will be done, and the resulting list offered via a GUI pop-up to prompt the console user to select his/her preference. If a successful connection is made, the WLAN in question will be stored in the plain text file /etc/nwam/known_wifi_nets and subsequently the daemon may connect to any WLAN in that list without prompting again. Should a user wish to revoke his/her preference for a WLAN in that list, editing the file and deleting the line with the entry should suffice. Note, however, that this interface is Volatile and may change in a future release. ATTRIBUTE: See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE ATTRIBUTE VALUE
SUNWcsr Volatile
SEE ALSO: svcs(1), svcadm(1M), attributes(5), smf(5) NOTES: The networking service is managed by the service management facility, smf(5), under the service identifier:
32 Getting Started With OpenSolaris 2008.05 May 2008
svc:/network/physical
Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using svcadm(1M). The service's status can be queried using the svcs(1) command.
33
34
C H A P T E R
This section provides an overview of the Image Packaging System software (IPS). The OpenSolaris 2008.05 release uses IPS as its packaging system. The IPS software allows you to create images, and install, search, update, and manage packages in the image. You can also use IPS to create your own packages and OpenSolaris repositories, and publish and manage packages to the repositories. An image is a location where the packages, their files, and their corresponding actions can be installed. An image acts as an IPS client, which interacts with the package depot server. A package depot server, also called the repository, must be run for the IPS client to access the packages. For the OpenSolaris 2008.05 release of Indiana , http://pkg.opensolaris.org, is such a server. If the system on which IPS is installed is on the network, IPS can automatically access the OpenSolaris repository. You can also create your own OpenSolaris repository and set up your IPS client to access your repository. This book discusses the following topics:
IPS Overview on page 36 IPS for End Users (Tasks) on page 37 Installing Developer Software (Tasks) on page 48 IPS for Developers (Commands) on page 53 IPS For Developers (Tasks) on page 59 Further Information on page 64 pkg(1) Command Reference on page 65 Glossary on page 67
35
IPS Overview
The Image Packaging System software is a network-centric packaging system written in Python.
Note
At this time, the OpenSolaris 2008.05 release is for x86 platforms only. Both IPS and SVR4 packages are supported for the OpenSolaris 2008.05 release.
You can create your own image. After you have created your own image, you can install new packages and update existing packages from an IPS repository to your image. You can manage and search the packages on your image by using IPS commands that reference package attributes. See IPS for End Users (Tasks) on page 37.
You can download developer software such as NetBeans and SunTM Studio Express. See Installing Developer Software (Tasks) on page 48. You can create your own network repository. Create and submit your own packages to an existing network repository. See IPS for Developers (Commands) on page 53 and IPS For Developers (Tasks) on page 59.
IPS Commands
Image Packaging System provides the following commands: pkg(1) pkgsend(1) pkg.depotd(1M) Use the pkg(1) command to create an image, to install packages to your image, and to manage packages on your image. Use the pkgsend(1) command to publish packages from your image to an existing repository. Use the pkg.depotd(1M) command to create and manage your own network repository.
36
Note The pkg(5) man page describes the overall Image Packaging System. The pkg(1) man page describes the image packaging retrieval client.
Create an image pkg image-create. Install new packages or update existing packages pkg install. Search for packages pkg search. Update all existing packages within an image pkg image-update. Display information about the state of packages pkg list. Verify packages have been installed correctly pkg verify. Display information about a package pkg info. Display attributes of actions pkg contents. Uninstall packages pkg uninstall. Update an existing authority or add additional package authority pkg set-authority. Remove the configuration associated with the given authority pkg unset-authority. Display authority information pkg authority.
Refer to the pkg(1) Command Reference on page 65 and the pkg(1) man page to learn more about the subcommands and options for the pkg(1) command.
37
Scheme pkg Authority opensolaris.org Package Name libc Version String Consists of four components :
Component Version 5.11 Build Version 5.11 Branch Version 0.75 Timestamp 20071001T163427Z
Creating Images
The pkg(1) command is used to create an image. An installed OpenSolaris 2008.05 release on your system, constitutes an image. Packages can be installed directly within this image. New images are created to mark a boundary between the packages installed in different images. The image-create command sets up a relationship between the image and a server that can be accessed to add packages to the image. Images can be of three types:
Full images, capable of providing a complete system. Partial images, which are linked to a full image (parent image), but do not provide a complete system on their own. User images, which contain only relocatable packages.
Refer to the pkg(1) Command Reference on page 65 for a table of all the options associated with this command.
38
Ensure that you have write privileges to the directory where you are attempting to create an image.
Use the following command to create an image. A user image is created by default. pkg image-create -[FPUz] -a prefix=repository_url directory_location
Example 21
Refer to the pkg(1) Command Reference on page 65 for a table of all the options associated with this command. Use the following command to execute a dry-run installation. $ pkg install [-nv] pkg_fmri
Note pkg_fmri refers to a package name along with a version number and a subversion
number, if applicable.
Example 22
39
None None None None None None None None None None None
-> -> -> -> -> -> -> -> -> -> ->
pkg:/SUNWzlib@1.2.3,5.11-0.75:20071024T204906Z pkg:/SUNWlxml@2.6.23,5.11-0.75:20071024T204221Z pkg:/SUNWpool@0.5.11,5.11-0.75:20071024T204717Z pkg:/SUNWpr@0.5.11,5.11-0.75:20071024T204720Z pkg:/SUNWlibsasl@0.5.11,5.11-0.75:20071024T204217Z pkg:/SUNWtls@0.5.11,5.11-0.75:20071024T202854Z pkg:/SUNWopenssl@0.9.8,5.11-0.75:20071024T204623Z pkg:/SUNWcsl@0.5.11,5.11-0.75:20071024T202529Z pkg:/SUNWlibC@0.5.11,5.11-0.75:20071024T204202Z pkg:/SUNWpcre@7.0,5.11-0.75:20071019T202909Z pkg:/SUNWzsh@4.2.5,5.11-0.75:20071019T203321Z
Refer to the pkg(1) Command Reference on page 65 for a table of all the options associated with this command. Use the following command to install a package. $ pkg install [-v] pkg_fmri
Note The pkg install command is also used to update specific packages on the system. The pkg install command automatically checks for newer versions of specific packages or package groups and installs them if they are available. Any dependent packages are also automatically updated.
Example 23
Install a Package
This example installs a SUNWphp524-mysql package. The output displays the status of the download, number of packages that were installed, number of files that were installed and the size (in megabytes) of the download.
$ pkg install SUNWphp524-mysql DOWNLOAD PKGS FILES Completed 3/3 301/301 PHASE Update Phase Install Phase ACTIONS 2/2 404/404
Example 24
40
This example installs the SUNWphp524-mysql package from the http://example.opensolaris.org authority.
$ pkg install pkg:/example.opensolaris.org/SUNWphp524-mysql
Refer to the pkg(1) Command Reference on page 65 for a table of all the options associated with this command. Use the following command to verify the installation of a package. Use the -v option for verbose output. # pkg verify [-fv] pkg_fmri
Note Switch to root user before executing the pkg verify command.
Example 25
Refer to the pkg(1) Command Reference on page 65 for a table of all the options associated with this command.
Note If you are searching for a package in a remote repository, switch to root user and run the
pkg refresh command to retrieve updated contents of the repository associated with the current image.
Use the following command to search for packages based on the various properties indexed by the packaging system. $ pkg search [-lr] [-s repository_url] token
Example 26
41
Example 27
Refer to the pkg(1) Command Reference on page 65 for a table of all the options associated with this command. Use the following command to update all packages in the current image to the latest version. $ pkg image-update
See Also
The pkg image-update command can also be used to upgrade an installed boot environment. For more information, see theUpgrading a Boot Environment on page 73 section.
Refer to the pkg(1) Command Reference on page 65 for a table of all the options associated with this command. Use the following command to see the state of packages. $ pkg list [-aHsuv] pkg_fmri
Example 28
STATE
UFIX
42
pkg:/SUNWbash@3.2.25,5.11-0.79:20080205T152506Z
installed ----
Example 29
UFIX ---u--u--u---
Refer to the pkg(1) Command Reference on page 65 for a table of all the options associated with this command. See the Actions in IPS on page 55 section to become familiar with the actions associated with a package.
Use the following command to list the action attributes of a package. $ pkg contents [-Hm] [-o attribute] [-s sort_key] [-t action_type] pkg_fmri
Example 210
$ pkg contents -t dir,file,link,hardlink -o action.name,mode,pkg.size,path,target zfs NAME dir dir dir link link dir dir dir MODE 0755 0755 0755 SIZE PATH etc etc/fs etc/fs/zfs etc/fs/zfs/mount etc/fs/zfs/umount etc/zfs lib lib/amd64 TARGET
../../../sbin/zfs ../../../sbin/zfs
43
link lib/amd64/libzfs.so file 0755 469616 lib/amd64/libzfs.so.1 file 0644 62057 lib/amd64/llib-lzfs.ln link lib/libzfs.so [ ... ]
libzfs.so.1
libzfs.so.1
Example 211
44
license=SUNWbash.copyright transaction_id=1202253906_pkg%3A%2FSUNWbash%403.2.25 %2C5.11-0.79%3A20080205T152506Z pkg.size=1207 link path=usr/gnu/bin/sh target=../../bin/bash set name=description value="GNU Bourne-Again shell (bash)"
Refer to the pkg(1) Command Reference on page 65 for a table of all the options associated with this command. Use the following command to view information about a package. If no pkg_fmri is specified, information about all installed packages are displayed.
$ pkg info [--license] pkg_fmri
Example 212
Example 213
45
Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. Modified by the GLib Team and others 1997-1999. See the AUTHORS file for a list of people on the GLib Team. See the ChangeLog files for a list of changes. These files are distributed with GLib at ftp://ftp.gtk.org/pub/gtk/.
Refer to the pkg(1) Command Reference on page 65 for a table of all the options associated with this command. Use the following command to uninstall existing packages. $ pkg uninstall [-nvr] pkg_fmri
Example 214
Uninstalling a Package
This example uninstalls the SUNWphp524-mysqlpackage.
$ pkg uninstall SUNWphp524-mysql PHASE ACTIONS Removal Phase 39/39
Refer to the pkg(1) Command Reference on page 65 for a table of all the options associated with this command. Become root user before executing this command.
Type the following command to update an existing authority or add an additional package authority. # pkg set-authority [-P] [-k ssl_key] [-c ssl_cert] [-O origin_url] authority
Note The option -O should be specified in upper case.
Example 215
46
Refer to the pkg(1) Command Reference on page 65 for a table of all the options associated with this command. Become root before executing this command.
Type the following command to remove the configuration information associated with a given authority. # pkg unset-authority authority
Example 216
Removing an Authority
# pkg unset-authority sunfreeware.com # pkg authority AUTHORITY opensolaris.org (preferred)
URL http://pkg.opensolaris.org:80/
Refer to the pkg(1) Command Reference on page 65 for a table of all the options associated with this command. Type the following command to display information about an authority. If no arguments are specified, a list of configured authorities and their associated URLs is displayed. $ pkg authority [-H] authority
Example 217
47
How to Install OpenOffice.org on page 48 How to Install NetBeans 6.0.1 on page 49 How to Install Sun Studio Express 5/08 on page 49 How to Install Sun HPC ClusterTools 7.1 on page 50 How to Install Web Stack Tools and UI on page 51 How to Install GlassFish Java EE 5 Application Server on page 52
Note Some of the software applications are not available as a package on the OpenSolaris
repository, pkg.opensolaris.org. You will need to download the software separately from the application's web site.
Use the following command to install the OpenOffice.org package. The latest package will be installed.
pkg install openoffice
See Also
Go to the OpenOffice.org site at http://www.openoffice.org to learn more about the OpenOffice.org project .
48
Troubleshooting
Use the following command to install the NetBeans package. The latest package will be installed.
$ pkg install netbeans
For NetBeans IDE 6.0.1 documentation, see NetBeans IDE 6.0 documentation. Join the NetBeans community, where you can subscribe to mailing lists, search the mailing list archives, and check the NetBeans User FAQs.
49
The Sun Studio Express 5/08 release is available for download and installation as a single package in the Open Solaris Binary Repository. It is also part of a cluster of packages, called ss-dev, which includes gmake, Java Development Kit and so on. For a complete list of packages in the ss-dev package, see the Sun Studio Express 5/08 Packages on page 68 table. Package name : sunstudioexpress Version: 0. 2008.05
Note The sunstudio package in the repository points to the sunstudioexpress package.
Next Steps
After you have installed the Sun Studio 5/08 Express release, update your PATH and MANPATH environment variables to include the paths to the Sun Studio 5/08 installation directory, install_dir/SunStudioExpress/bin, and man page directory install_dir/SunStudioExpress/man, respectively. The default installation directory is /opt. To view documentation for Sun Studio 12 software, the latest official release of the Sun Studio product, see the Sun Studio Information Center. Sign on to the Sun Studio User Forums to post questions to Sun engineering and the community. Be sure to state that you are using the Sun Studio Express 5/08 release.
See Also
Troubleshooting
50
Note The clustertools package in the repository points to the clustertools_7.1 package.
Next Steps
The installed Sun HPC ClusterTools 7.1 software is located in /opt/SUNWhpc/HPC7.1. To verify that the software is installed properly, you can launch a simple non-MPI parallel job by using mpirun. For example, use the following command. % /opt/SUNWhpc/HPC7.1/bin/mpirun hostname
See Also
For more information about advanced features of ctinstall, such as installing on multiple nodes in a cluster or installing the Sun HPC ClusterTools 7.1 packages on an NFS server, please consult the Sun HPC ClusterTools 7.1 Software Installation Guide provided with this product. For more information about the Sun HPC ClusterTools 7.1 software, see http://www.sun.com/software/products/clustertools. The Sun HPC ClusterTools 7.1 software documentation is included with this product. Documentation is also located online at Sun HPC ClusterTools 7.1 Documentation.
Troubleshooting
Sign on to the Sun Studio User Forums to post questions to Sun engineering and the community. Be sure to state that you're using a Sun Studio Express build.
Menu to initialize the stack for a particular user Menu to start/stop the Apache2 and MySQL services Menu to view the log files Menu to create and run samples Menu to view the getting started guide Menu to launch a SAMP UI console that exposes the key parameters of the stack:
51
Apache Port Number Apache Document directory PHP debug mode PHP log level Access to the httpd.conf file in edit mode Access to the php.ini file in edit mode Show a detailed status of the stack View a phpinfo page
WebStack Options and Desktop Menus package is available for download and installation as a single package in the Open Solaris Binary Repository. Package Name : webstackui Version : 0.5.11
See Also
After installation, documentation for this package is located at /usr/share/webstack/doc/html/index.html. For the most current information regarding downloading and installation of Web Stack packages in the repository, refer to the online documentation. For a complete list of webstack packages that are available in the pkg.opensolaris.org repository, see the WebStack Packages table.
Troubleshooting
Join the OpenSolaris WebStack User Mailing List to post questions to WebStack engineering and the community. You might find that your problem has already been solved.
52
Installation of GlassFish requires that JDK 1.6, JavaDB, and ANT packages are installed. Also, the default domain, domain1, has to be created manually. To install this package, type the following command:
pkg install glassfishv2
See Also
Online documentation is available at https://glassfish.dev.java.net/javaee5/docs/DocsIndex.html. Join the GlassFish Java EE 5 Application Server User Forums to post questions to GlassFish engineering and the community.
Troubleshooting
53
TABLE 21
pkgsend(1) Subcommands
Description
Subcommand
open
Begins a transaction on the package specified by pkg_fmri. A transaction_id is outputted when the command executes successfully. Syntax : pkgsend open -en pkg_fmri -e Use this option to prepend export PKG_TRANS_ID= to the transaction_id. This can be used by the shell to evaluate the output and set the environment variable PKG_TANS_ID. This environment variable can be used when executing future pkgsend commands within the same transaction. For information about FMRI, see the Solaris Basic Administration Guide.
add
Adds a resource associated with an action to the current transaction. Syntax : pkgsend add actions pkg_fmri
include
Adds resources associated with the multiple actions present in each manifest file to the current transaction. Each line in the file should be the string representation of an action. Do not use this sub command with the add, open or close sub-commands. Syntax : pkgsend include filename
Adds each given bundle file into the current transaction. Close the current transaction. Syntax : pkgsend close [-a] The -a option abandons the current transaction.
send bundlefile
Sends each given bundlefile as a new package version, in an appropriate series of transactions Syntax : pkgsend send bundlefile
Use the pkgsend command only if one or two packages at a time are being published to the repository. The pkgsend command does not resolve dependencies. If more than one package is being published to the repository, the user must manually resolve all package dependencies. Note the following points when publishing a newer version of a package to the repository.
Specify the FMRI of the package correctly. The new version of the package will coexist with any prior version already in the repository. Use the same command such as pkgsend send or pkgsend include to publish the newer version, as that was used to publish the previous version of the package.
54
Actions in IPS
IPS manages software in units of packages. Packaging a product aids in easy distribution and installation of the software product. A package is a collection of files, directories, links, drivers, and dependencies in a defined format. This collection represents the installable objects of a package. In IPS terminology, this collection is referred to as actions. Actions are described in a package's manifest. Every action consists primarily of its name and a key attribute. Together, these attributes refer to a unique object and include a version history. Actions can have other attributes. Some of these attributes are interpreted directly by the packaging system, others are useful only to the system administrator or the end user.
Note The attributes of a package are different from the attributes of an action. See the Package Tags and Attributes section to learn about the supported tags and attributes for a package.
Typically, only an action's key attribute is required, though some actions might work properly only with a more complete set of attributes. The following list provides an overview of the type of actions and their standard attributes that are available with IPS. For additional details, see the pkg(5) man page.
Note pkg(5) refers to the image packaging system and is different from the pkg(1) command,
which is the retrieval client and is used to create, install, and manage images on the system
Note The following table shows a list of the actions and their key attributes. For a complete list,
Directory
The directory action represents a directory as a file system object. path The filesystem path where the file is installed.
File
The file action represents an ordinary file as a file system object. path The file system path where the file is installed.
55
TABLE 22 Action
(Continued)
Link
The link action represents a symbolic link. path The file system path where the symlink is installed.
Hardlink
The hardlink action represents a physical link. path The file system path where the link is installed.
Driver
The driver action represents a device driver. It does not reference a payload, the driver files must be installed as file actions. name The name of the driver. This is usually, but not always, the file name of the driver binary.
Depend
The depend action represents a dependency between packages. A package might depend on another package to work or to install. Dependencies are optional. No key attribute defined.
License
The license action represents a license or other information associated with the package contents. A package can deliver licenses or disclaimers to the package installer through the use of the license action. The payload of the license action is delivered into the image metadata directory associated with the package. license The keyword identifying the license type, for use in filter and query operations
Legacy
The legacy action represents package data used by a legacy packaging system. The attributes associated with this action are added to the legacy system's databases so that the tools querying those databases might operate as if the legacy package were actually installed. pkg The abbreviation for the package being installed. The name of the package in the package FMRI is the default value.
Set
The set action represents a package-level attribute, such as the package description. No key attribute defined.
Group
The group action defines a UNIX group as defined in group(4). No support is present for group passwords. Groups defined with this action initially have no user-list. Users can be added with the user action. No key attribute defined.
User
The User action defines a UNIX user as defined in /etc/passwd, /etc/shadow, /etc/group and /etc/ftpd/ftpusers files. Users defined with this attribute have entries added to the appropriate files. No key attribute defined.
56
Packages carry information about themselves in the form of metadata, which is also informally known as attributes and tags. Attributes refer to settings that apply to an entire package. Tags are the settings that affect individual files within a package. The package developer provides specific information about the package through the tags and attributes. The pkg attribute is the attribute that is common to all packages, regardless of any particular OS platforms that a specific package might target. The IPS packages can contain the following set of tags and attributes.
TABLE 23 Attribute
Package Attributes
Description
Package Description : A short paragraph describing the package. pkg.description Package URL: pkg.detailed_url
TABLE 24 Tag
Used to provide links to sites with further information about the package.
Tags
Description
Used to specify if the package needs to be installed in a debug configuration. Distinguishes between different x86 platforms.
The opensolaris attribute is the attribute that is common to all OpenSolaris packages.
Note In the following table, except ISA attribute, all atributes have opensolaris appended to them. For example, the attribute arc.url should be specified as opensolaris.arc_url.
TABLE 25
OpenSolaris Attributes
Description
OpenSolaris Attribute
arc_url
One or more URLs associated with the ARC case(s) associated with the component(s) delivered by the package. A human readable string describing the entity that provides the package. For an individual, this string is their name, or name and email address. Distinguishes between different x86 platforms.
maintainer
ISA
57
TABLE 25
OpenSolaris Attributes
Description
(Continued)
OpenSolaris Attribute
upstream
A humanreadable string describing the entity that creates the software. For an individual, this string is expected to be the individual's name, or name and email. A URL associated with the entity that creates the software delivered within the package. A URL to the source code bundle, if appropriate, for the package. A URL to the source code repository, if appropriate, for the package. A changeset ID for the version of the source code contained in opensolaris.repository_url attribute. A list of labels classifying the package into the categories shared among pkg(5)graphical clients.
upstream_url
gui.classification
pkg.depotd(1M) Properties
Description The file system path where this instance of the depot server should look for its repository data. The default value is /var/pkg/repo. The port number on which this instance of the depot server should listen to for incoming package requests. The default value is 80.
Property pkg/inst_root
pkg/port
The pkg.depotd(1M) command has the following options to alter the default settings from the service instance.
58 Getting Started With OpenSolaris 2008.05 May 2008
TABLE 27
pkg.depotd(1M) Options
Description Specify a different repository directory. Overrides pkg/inst_root with the value given by repo_dir. Specify a different port number. Overrides pkg/port with the value given by port.
Type the following command as root user to enable the depot server. In this example, application/pkg/server is the depot server.
# svcadm enable application/pkg/server
EXAMPLE 219
Type the following sequence of commands as root user to change the listening port of the depot server. This example sets the listening port of the depot server to 9999.
# svccfg -s application/pkg/server set pkg/port = 9999 # svcadm refresh application/pkg/server # svcadm restart application/pkg/server
How to Create Your Own OpenSolaris Repository Using pkg.depotd(1) Command on page 60 How to Create Your Own OpenSolaris Repository Using Smf Commands on page 60 How to Create and Publish an IPS Package on page 61 How to Publish SVR4 Packages to Your Repository on page 63
59
Example 220
1 2
60
Open your browser and type http://localhost:port_value to confirm that the repository has been created. Check the contents of the repository. # ls repository_directory
Example 221
Read the section Actions in IPS on page 55 and become familiar with actions and the attributes of each action. Create a temporary directory on your system. $ mkdir my_tmp Change the directory to the temporary directory. $ cd / my_tmp Create a directory called my_package. $ mkdir my_package Change the directory to my_package. $ cd my_package
Chapter 2 Getting Started With the Image Packaging System 61
Export the directory my_package. Specify a version number and a sub-version number for the package. In this example, the my_package has a version number of 1.0 and a subversion number of 1. Note the back quotes used in this command. $ eval pkgsend open my_package@1.0-1
Note Specify the package name, version number and subversion number correctly. This cannot be changed afterwards.
Add attributes to the package. In this task you add a directory action with attributes of mode, owner, group, and path. Path is the key attribute for the directory action and has to be specified. $ pkgsend add dir mode=055 owner=root group=bin path=/etc/my_package
Add the file my_text_file under the my_package directory. $ pkgsend add file my_package/my_text_file
Add attributes to the file. In this example, you add the file action with the attributes of mode, owner, group, and path. Path is the key attribute for the file action and has to be specified. $ pkgsend add file mode=055 owner=root group=bin path=/etc/my_package
Note Actions can also be included in a file. This file can then be added to the current transaction by using the pkgsend include command.
Note The path attribute specifies the directory where the file will be created. This path should
exist on the IPS client although it can be different from the file's location on the IPS server.
10 11
We have now created a package my_package consisting of a directory and a file. We will add a dependency for this package and set a name attribute. $ pkgsend add depend fmri=pkg:/depends_on_this_package@1.0-1 type=require $ pkgsend add set name=description value="Example Package"
62
Note If the resources have been specified in a file, use the pkgsend include resource_filename
command instead of the pkgsend add command, to add the resources to the current transaction.
12
Example 222
See the The Publication Client pkgsend(1) on page 53 section to become familiar with the workings and limitations of the command. The default repository is http://localhost:10000. If you are publishing a package to a repository other than the default repository, ensure that the repository is created.
Use the following command to publish the SVR4 package to your repository. The default repository is http://localhost:10000 $ pkgsend -s repository_url send SVR4_package_fmri
Example 223
63
Further Information
The following section provides additional information about the IPS project.
To build the JDS sources, use Sun Studio 10 or Sun Studio 11. To download and install Sun Studio 10 or Sun Studio 11, go to the Sun Studio Download Center.
Note For the pkgbuild command, which is used to build a SVR4 package, any compiler, including gcc, can be used.
Contributing to IPS
See the main IPS page for details and subscribe to the pkg-discuss mailing list to join the discussion.
64
pkg(1) Command
Description
Subcommands
pkg image-create
Creates an image suitable for package operations at the specified directory. Syntax : pkg image-create [-FPUz] -a -F Creates a Full image -P Creates a partial image -U Creates a user image (default) -z Run the image in a non-global zone context -a Specify a repository server
pkg image-update
Updates all installed packages in the current image to the latest available version. Syntax: pkg image-update [-nv] -n - Execute the requested operation but make no persistent changes to the image. -v - Issue verbose progress messages during the requested operation.
pkg refresh
Retrieves updated catalogs for each authority registered within the image. Syntax: pkg refresh
pkg install
Installs a package. Syntax: pkg install [-nv] pkg_fmri -n - Execute the requested operation but make no persistent changes to the image. -v - Issue verbose progress messages during the requested operation.
pkg uninstall
Uninstalls a package. Syntax: pkg uninstall [-nrv] pkg_fmri -n - Execute the requested operation but make no persistent changes to the image. -v - Issue verbose progress messages during the requested operation. -r - Recursively uninstall any packages which are dependent on the initial package.
65
TABLE 28
pkg(1) Command
Description
(Continued)
Subcommands
pkg info
Displays information about a package. Syntax : pkg info [--license] pkg_fmri --license Display License and copyright information for a pacakge.
pkg list
Displays information about the state of packages in the current image. Syntax: pkg list [-aHsuv] pkg_fmri -a - Display information on all known packages, whether they are installed or not installed. -s - Display only package name and description of the package. -u - Show information only about packages which have newer versions available. -r - Show detailed package FMRIs.
pkg search
Search for token, and display the FMRIs in which token was found. Syntax: pkg search [-lr] [-s server] token -l - Search the installed packages on the image. -r - Search the repository that is linked to by the image. -s - Search for packages in the specified server. Multiple servers can be specified.
pkg contents
Display the attributes of actions in the current image. Syntax : pkg contents [-Hm] [-o attribute] [ -s sort_key] [-t action_type] -m - Shows complete contents of the action as represented in the package manifest. -o - Specify the attribute you are searching for. Multiple attributes may be specified with a single -o option by separating the attributes with commas. -s - Sort the display based on the specified attribute. -t - Display information only pertaining to the specified action. -H - Do not display any headers.
pkg verify
Validate the installation of packages in the current image. Syntax: pkg verify -[fv] pkg_fmri -v - Display verbose information. -f - Fully validate the contents of files against the hash values in the package manifests, as well as checking for file and directory presence
66
TABLE 28
pkg(1) Command
Description
(Continued)
Subcommands
pkg set-authority
Update an existing authority or add an additional package authority. Syntax: pkg set-authority [-P] [-k ssl_key] [-c ssl_cert] [-O origin_url] authority -P - Set the specified authority as the preferred authority. -c - Specify client SSL certificate. -k - Specify client key. -O - Set the URL prefix for the origin packaging repository for the authority.
pkg unset-authority Remove the configuration associated with the given authority. Syntax: pkg unset-authority authority pkg authority Display authority information. If an authority is specified, configuration values associated with the authority is displayed. Syntax: pkg authority [-H] authority No argument - Display the list of all configured authorities, and their origin URLs -H- Remove headers from the listing.
Glossary
TABLE 29 Term
package FMRI
A package is a collection of files, directories, links, drivers and dependencies in a defined format. FMRI stands for Fault Management Resource Identifier. Each package is represented by a FMRI. See the FMRI section for more information. An image is a location where sets of packages can be consistently installed. An action comprises of a name and a key attribute. A repository is a location where packages are available for download. Also called the depot server.
tag attribute
A tag represents the settings of a file. An attribute represents the settings of a package or an action.
67
NetBeans Packages
This table lists all the NetBeans packages that are available in the http://pkg.opensolaris.org:80 repository. The netbeans package is a super set of all the packages listed in the table below.
TABLE 210
netBeans Packages
Description
Package Name
SUNWnetbeans-desktop SUNWnetbeans-ide SUNWlibnb-apisupport1 SUNWlibnb-cnd1 SUNWlibnb-enterprise4 SUNWlibnb-ide8 SUNWlibnb-java1 SUNWlibnb-platform7 SUNWlibnb-profiler2 SUNWlibnb-ruby1 SUNWlibnb-visualweb1 SUNWlibnb-xml1 SUNWnetbeans-cpp SUNWnetbeans-javaee SUNWnetbeans-javase SUNWnetbeans-ruby
GNOME integration icon NetBeans IDE base package NetBeans cluster API support NetBeans C/C++ support NetBeans Java EE support NetBeans cluster IDE NetBeans Java support NetBeans platform NetBeans profiler NetBeans Ruby support NetBeans Web support NetBeans XML support Netbeans C/C++ distribution NetBeans Web & Java EE distribution NetBeans Java SE distribution NetBeans Ruby support
68
TABLE 211
Component Name
sunstudioexpress
0.2008.05
Sun Studio Express: C, C++, and Fortran compilers and tools JDK 6.0 Demo Programs JDK 6.0 Host Config JDK 6.0 64bit Runtime Environment JDK 6.0 Runtime Environment JDK 6.0 Man Pages JDK 6.0 Dev Tools JDK 6.0 64bit Dev Tools JDK 6.0 64bit Demo Programs GNU Automake 1.9.6 GNU Automake 1.10 libtool-GNU libtool utility Flex Lexer bison A YACC Replacement Solaris bundled tools
1.6.0_04 1.6.0_04 1.6.0_04 1.6.0_04 1.6.0_04 1.6.0_04 1.6.0_04 1.6.0_04 1.9.6 1.10 1.5.22 2.5.33 2.3
SUNWj6rt
SUNWgnu-automake-19 SUNWgnu-automake-110
SUNWlibtool
SUNWflexlex SUNWbison
NetBeans
netbeans
6.0.1
Open-source Integrated Development Environment for enterprise, web and mobile applications in Java, C/C++, and Ruby PHP Server PHP Server Documentation PHP Server man pages PHP5 module for PsotgreSQL PHP5 module for MySQL The Python Interpreter, libraries and utilities Event-based framework for internet applications Apache Web Server V2.2 TomCat Connector Plugin for Apache Web Server V2.2 Mod Security For Apache Web Server V2.2 Apache Web Server V2.2 documentation PHP5 module for Apache Web Server V2.2 FastCGI plugin for Apache Web Server V2.2 Dtrace Plugin for Apache Web Server V2.2
PHP
5.2.4 5.2.4 5.2.4 5.2.4 5.2.4 2.4.4 2.4.4 2.2.8 1.2.25 2.1.5 2.2.8 2.2.6 2.2 0.3.1 5.5.26 5.0.45 5.0.45
Python
SUNWPython SUNWpython>twisted
Apache
TomCat MySQL
SUNWtcat SUNWmysql15
mysql MySQL Database Management System(usr component) MySQL Database Management System(Base)
SUNWmysql5>base
70
(Continued)
Version Description
Squid
SUNWsquid
2.6.17
Squid Web Proxy Cache memcached Subversion The CVS version control system WebStack Tools and UI package adds desktop features to operate the Solaris, Apache, MySQL, PHP stack
memcached SUNWmemcached 1.2.2 Subversion cvs WebStack Tools and UI SUNWsvn SUNWcvs webstackui 1.4.3 1.12.13 0.5.11
71
72
C H A P T E R
The OpenSolaris 2008.05 release provides new and enhanced tools that enable you to upgrade a boot environment (BE) and to manage multiple boot environments. The following topics are discussed:
How to upgrade an existing boot environment by using the Image packaging System How to create new boot environments and BE snapshots How to activate, mount, or destroy boot environments How to list and manage your boot environments
For the OpenSolaris 2008.05 release, use the pkg image-update command to update all installed packages in the current image to the latest available version. Syntax: pkg image-update [-nv] The pkg image-update command upgrades all installed packages in the current boot environment to their latest available version. With the -n option, the command executes, but makes no persistent changes to the image. With the -v option, progress messages are displayed during the operation.
73
In the OpenSolaris 2008.05 release, the upgrade process has been enhanced. In this release, the upgrade process automatically creates a clone: a new, bootable BE. The upgrade process applies the upgrade changes to the clone instead of to the original BE. After successfully completing the changes to the clone and rebooting the system, the upgraded clone is provided as the default, active BE in the GRUB menu. The original BE remains on the GRUB menu as an alternate selection.
Note A clone of the boot environment includes everything hierarchically under the main root dataset of the original boot environment. Shared file systems are not under the root dataset and are not cloned. Instead, the boot environment accesses the original shared file systems.
After upgrading your system, you can use the beadm list command to see a list of the boot environments on the system, including the new BE created by the pkg image-update command. See the following example.
os# pkg image-update A clone of opensolaris exists and has been updated and activated. On next boot the Boot Environment opensolaris-1 will be mounted on /. Reboot when ready to switch to this updated BE. os# beadm list BE Name ---opensolaris opensolaris-1 Active Active on reboot ------ --------yes no no yes Mountpoint Space Used ---------- ----legacy 57.5K 2.59G
In this example, the initial boot environment created by the installer is named opensolaris. The boot environment created by the pkg image-update command is automatically named opensolaris-1. After rebooting to the upgraded boot environment, any inactive boot environment can be destroyed to save space by running the beadm destroy command. For instructions, see How to Destroy an Existing BE on page 82. For further information about the pkg command, see Image Packaging System Documentation and the pkg(1) man page.
Note The pkg image-update command potentially changes all packages on your system. The pkg install command changes only specific packages or groups of packages.
For further information about updating specific packages, see Image Packaging System Documentation and the pkg(1) man page.
Note You cannot upgrade the OpenSolaris Preview 1 release to the OpenSolaris 2008.05
release. We recommend a fresh install of any machine which was initially installed with Preview 1.
Advantages of BE Utility
The new BE utility has the following advantages:
The BE utility aggregates all datasets in a BE and performs actions on the entire BE at once. You no longer need to perform ZFS commands to modify each dataset individually. The BE utility manages the dataset structures within BEs. For example, when the BE utility clones a BE that has shared file systems, the utility automatically recognizes and manages those shared file systems for the new BE. The BE utility enables you to perform administrative tasks on your BEs, independent from upgrading your system. The BE utility automatically manages and updates the GRUB menu. For example, when you use the BE utility to create a new BE, that BE is automatically added to the GRUB menu.
Create a new BE, based on the active BE Create a new BE, based on an inactive BE Create a snapshot of an existing BE Create a new BE, based on an existing snapshot Activate an existing, inactive BE Mount a BE Unmount a BE Destroy a BE Destroy a snapshot of a BE Rename an existing, inactive BE Display information about your BE snapshots and datasets
Note A clone is a bootable copy of a boot environment. A snapshot is a read-only copy of a file system or boot environment at a given point in time. A snapshot is not bootable.
BE Utility Requirements
To use the new BE utility to manage your boot environments, your system must meet the following requirements.
76
TABLE 31
System Requirements
Description
Requirement
You must have OpenSolaris 2008.05 release installed on your system. Prior OpenSolaris releases did not include the BE utility. For information about installing this release, see Getting Started With OpenSolaris 2008.05. All OpenSolaris Developer releases have ZFS file systems. The BE utility is designed for ZFS file systems.
The installation of the OpenSolaris OS supports only one pool on one disk. The BE utility is implemented with ZFS support only. The BE utility manages BEs and snapshots that were created by the BE utility. If a user manually creates the datasets for a BE by using the zfs(1M) command, the BE utility should recognize the BE, but management of this BE might be undefined.
1 2
Become superuser or assume an equivalent role. At the command line, type the following:
$ beadm create beName
beName is a variable for the name of the new boot environment. This new BE is inactive.
Note beadm create does not create a partial BE. The command either successfully creates a full BE, or the command fails. 3
(Optional) You can use the beadm mount command to mount the new boot environment as follows:
$ beadm mount beName mountpoint
Chapter 3 Upgrading and Managing Your Boot Environments 77
Note The mount point must be an already existing directory that is empty.
If the BE is already mounted, the beadm mount command fails and does not remount the BE at the newly specified location. The BE is mounted, but remains inactive. You can upgrade a mounted, inactive BE.
4
(Optional) If you want to boot to this new BE, use the following command to activate the BE:
$ beadm activate beName
beName is a variable for the name of the BE to be activated. On reboot, the newly active BE is displayed as the default selection in the GRUB menu.
Note The GRUB menu always displays the mostly recently activated BE as the default.
Example 31
The original dataset in this example is BE1. The new boot environment, BE2, is contained in its own dataset. The new BE can also contain separate datasets for traditional file systems, such as /var or /opt.
rpool/ROOT/BE1 rpool/ROOT/BE1/usr rpool/ROOT/BE1/var rpool/ROOT/BE1/opt rpool/ROOT/BE2 rpool/ROOT/BE2/usr rpool/ROOT/BE2/var rpool/ROOT/BE2/opt
rpool in this example is the name of the storage pool. The pool already exists on the system, previously set up by the initial installation or upgrade. ROOT is a special dataset that was also created previously by the initial installation or upgrade. ROOT is reserved exclusively for use by BE roots.
78
Example 32
In this example, the shared file systems, rpool/export and rpool/export/home, are not cloned when the boot environment is cloned. The shared file systems are located outside the rpool/ROOT/<BE> datasets, and are referenced at their original locations by the cloned BE.
rpool/ROOT/BE1 rpool/ROOT/BE1/usr rpool/ROOT/BE1/var rpool/ROOT/BE1/opt rpool/export rpool/export/home rpool/ROOT/BE2 rpool/ROOT/BE2/usr rpool/ROOT/BE2/var rpool/ROOT/BE2/opt rpool/export/ rpool/export/home
1 2
Become superuser or assume an equivalent role. To create a new, inactive BE from an existing, inactive BE, type the following command:
$ beadm create -e non-activeBeName beName
non-activeBeName is a variable for the existing inactive BE that is cloned by this command. beName is the variable for the new BE name. By default, the new BE is inactive.
79
1 2
Become superuser or assume an equivalent role. Use the following command to create a snapshot.
$ beadm create beName@snapshot
Replace the variable, beName@snapshot, with a custom name for your snapshot. The custom name must use the format BEname@snapshotdescription, where BEname is the name of an existing boot environment that you want to make a snapshot from. Type a custom snapshotdescription to identify the date or purpose of the snapshot. Sample snapshot names include:
1 2
Become superuser or assume an equivalent role. Use the following command to create a new BE from a snapshot.
$ beadm create -e beName@snapshot beName
Replace the variable, beName@snapshot, with the name of an existing snapshot. As described in the previous task, snapshot names use the format BEname@snapshotdescription, where BEname is the name of an existing boot environment, and snapshotdescription is a description of a specific snapshot made from the existing BE. Replace the variable, beName, with a custom name for your new boot environment. See the following example.
$ beadm create -e BE1@now BE2
This command creates a new BE, named BE2, from the existing snapshot named BE1@now.
80
1 2
beName is a variable for the name of the BE to be activated. Note the following specifications.
beadm activate beName activates a BE by setting the bootable pool property, bootfs, to the value of the ROOT dataset of the BE that is being activated. beadm activate sets the newly activated BE as the default in the menu.lst file.
Note When a BE is created, whether it is active or inactive, an entry is created for the BE on the GRUB menu. The default BE is the last BE that was activated.
Reboot. The newly activated BE is now the default on the GRUB menu.
Note If the BE fails to boot, reboot and select the previous BE from the GRUB menu.
1 2
How to Mount a BE
Become superuser or assume an equivalent role. You can use the beadm mount command to mount a boot environment as follows:
$ beadm mount beName mountpoint
Note The mount point must be an already existing directory that is empty.
If the BE is already mounted, the beadm mount command fails and does not remount the BE at the newly specified location. The BE is mounted but remains inactive. You can upgrade a mounted, inactive BE.
Become superuser or assume an equivalent role. To unmount the BE, type the following:
$ beadm unmount beName
You cannot destroy the BE that is currently booted. The beadm destroy command destroys only the non-shared filesystems of the BE. Shared file systems are located outside of the BE root dataset area and are not affected when a BE is destroyed. In this example, the shared file systems, rpool/export and rpool/export/home, are not destroyed when the boot environment BE2 is destroyed.
rpool/ROOT/BE1 rpool/ROOT/BE1/opt rpool/ROOT/BE2 rpool/ROOT/BE2/opt rpool/export rpool/export/home
The beadm destroy command automatically removes the destroyed BE's entry from the GRUB menu.
1 2
Become superuser or assume an equivalent role. To destroy a BE, type the following:
$ beadm destroy beName
Note The beadm destroy command asks for confirmation before destroying the BE. Add the
-f option to the beadm destroy command to destroy the BE without this confirmation request.
82
1 2
Become superuser or assume an equivalent role. Use the following command to rename the boot environment:
$ beadm rename beName newBeName
Note If the new name already is in use, the beadm rename fails.
A snapshot is a read-only image of a file system or boot environment at a given point in time. A snapshot is not bootable. A BE is a bootable OpenSolaris environment, consisting of a root file system and, optionally, other file systems mounted underneath it, such as /opt or /var. The root file system and all other file systems of the BE which contain system software are required to be ZFS datasets. Exactly one boot environment can be active at a time. A clone is a BE that was created by copying another BE. A clone is a bootable BE. A dataset is a generic name for ZFS entities such as clones, file systems, or snapshots. The dataset term more specifically refers to the file system specifications for a particular BE or snapshot.
Choose the information that you want to view, as described in this step.
Choose an option for the beadm list command from the following list: -a Lists all available information about the boot environment. This option includes subordinate file systems and snapshots. -d Lists information about a BE's datasets. -s Lists information about a BE's snapshots. -H Omits the header information from the display. Choosing this option results in a display that can be more easily parsed for scripts or other programs.
You can also choose whether to specify a BE name in the beadm list command. By default, if you do not include a BE name in the command, the results include all BEs. But, if you include a BE name in the beadm list command, the results include only information about that BE.
Type the beadm list command with preferred options. For example, include the -a option and specify the BE1 environment as follows:
$ beadm list -a BE1
4 Example 33
Viewing BE Specifications
This example includes the -a option and specifies the BE2 environment as follows:
$ beadm list -a BE2
84
BE Active Active on Mountpoint Space Name reboot Used --------- --------- ---------- ----preview2 yes no legacy 2.02G Snapshots --------preview2/opt@install preview2/opt@BE2 preview2/opt@BE1 preview2@BE1 preview2@BE2 preview2@install Policy -----static static static static static static Date created -----------2008-04-05 10:28:42 2008-04-06 20:09:27 2008-04-06 20:09:16 2008-04-06 20:09:16 2008-04-06 20:09:27 2008-04-05 10:28:42
beadm Command
Description
Subcommands
Displays command usage. Makes beName the active BE on next reboot. Syntax: beadm activate beName
85
TABLE 32
beadm Command
(Continued)
Subcommands
Description
beadm create
Creates a new boot environment name, beName. Unless the -e option is provided, the new BE is created as a clone of the currently running BE. Syntax: beadm create [-a] [-e non-activeBeName | beName@snapshot] [-o property=value] ...[-p zpool] beName -a Activate the newly created BE upon creation. The default is to not activate the newly created BE. -e non-activeBeName Create a new BE from an existing, inactive BE. The default is to create the BE from the active BE. -e beName@snapshot Create a new BE from an existing snapshot of the BE named beName. -o property=value Create the datasets for new BE with specific ZFS properties. Multiple -o options can be specified. See zfs(1M) for more information on the -o option. -p zpool Create the new BE in the specified zpool. If this option is not provided, the default behavior is to create the new BE in the same pool as the original BE. beName Name of the boot environment to create. beName@snapshot Name of an existing snapshot of the BE named beName.
Creates a snapshot of the existing BE named beName. Syntax: beadm create beName@snapshot beName@snapshot The snapshot name must use the format, beName@snapshotdescription, where be is the name of an existing boot environment that you want to make a snapshot from. Enter a custom snapshotdescription to identify the date or purpose of the snapshot.
beadm destroy
Destroys the boot environment named beName or destroys an existing snapshot of the boot environment named beName. Syntax: beadm destroy [-f] beName | beName@snapshot -f Does not prompt for confirmation to destroy BE.
86
TABLE 32
beadm Command
(Continued)
Subcommands
Description
beadm list
Lists information about the existing boot environment which is beName, or lists information for all boot environments if beName is not provided. Syntax: beadm list [-a | [-ds] [-H] [beName] -a Lists all available information about the boot environment. This information includes subordinate file systems and snapshots. -d Lists information about all subordinate file systems that belong to the boot environment. -s Lists information about the snapshots of the boot environment. -H Prevents listing header information. Example displays without header: BE2:no:yes:mounted:/pool1/BE/BE2:6.2G;;; Without header information, the display information is identified by the following delimiters:
; Delimits BEs, datasets, zones, and snapshots. : Delimits attributes for BEs, datasets, zones, and snapshots. , Delimits multiple datasets, zones, and snapshots. Multiple BEs are delimited with a return (blank line).
beName - If beName is not provided, the command results display information for all BEs. The default is to list BEs without any additional information. beadm mount Mounts a boot environment named beName at mount point. The mount point must be an already existing, empty directory. Syntax: beadm mount beName mountpoint beadm rename Renames the boot environment named beName to newBeName. Syntax: beadm rename beName newBeName beadm unmount Unmounts the boot environment named beName. Syntax: beadm unmount beName
87
Glossary
TABLE 33 Term
BE utility
The BE utility is the user interface for managing boot environments and is the replacement for the Live Upgrade commands such as luupgrade(1M) and lucreate(1M). This utility uses the new beadm command. To load the system software into memory and start it. An instance of a bootable OpenSolaris environment consisting of a set of mount points, file systems, ZFS datasets, and zones. A boot environment (BE) is a collection of mandatory file systems that are critical to the operation of the Solaris OS. The active boot environment is the one that is currently booted. Exactly one active boot environment can be booted. An inactive boot environment is not currently booted, but can be in a state of waiting for activation on the next reboot. A copy of a boot environment. A clone is bootable. A generic name for the ZFS entities such as clones, file systems, or snapshots. A tree-structured network of files and directories that you can access. The OpenSolaris Developer releases use only ZFS file systems. The process of accessing a directory either from a disk that is attached to the machine that is making the mount request, or from a remote disk on a network. To mount a file system, you need a mount point on the local system. Also, you need the name of the file system to be mounted, for example, /usr file system. A workstation directory to which you mount a file system that exists on a remote machine. A logical group of devices describing the layout and physical characteristics of the available storage. Space for datasets is allocated from a pool. A reversion to the boot environment that ran prior to a specific transaction. Use rollback when you are activating an environment and the boot environment that is designated for booting fails or shows some undesirable behavior. A read-only image of a file system or boot environment at a given point in time. A snapshot is not bootable. The process of removing access to a directory on a disk that is attached to a machine or to a remote disk on a network. The OpenSolaris releases use the pkg image-update command to update all installed packages in the current image to the latest available version.
88
TABLE 33 Term
(Continued)
update
In the OpenSolaris releases, the pkg install command automatically checks for newer versions of specific packages or package groups, and installs or updates them if they are available. Any dependent packages are also automatically updated. A file system that uses storage pools to manage physical storage.
ZFS
89
90