34,99 €
After a beginning overview of the history of OpenSolaris, its open-source licensing, and the community development model, this book then goes on to highlight the aspects of OpenSolaris that differ from more familiar operating systems. You'll learn how to become a power user of OpenSolaris by maximizing the abilities of advanced features like Dtrace, the fault management architecture, ZFS, the service management facility, and Zones. Authors provide insider tips, unique tricks, and practical examples to help you stay sharp with the latest features of OpenSolaris.
Sie lesen das E-Book in den Legimi-Apps auf:
Seitenzahl: 1534
Veröffentlichungsjahr: 2011
Table of Contents
Title Page
Copyright
Dedication
About the Authors
Credits
Acknowledgments
Introduction
Who Should Read This Book
How This Book Is Organized
Conventions Used in This Book
What's on the Companion Website
Minimum Requirements
Where to Go from Here
Part I: Introduction to OpenSolaris
Chapter 1: What Is OpenSolaris?
Introduction to OpenSolaris
OpenSolaris Features
The “Open” in OpenSolaris
The History of OpenSolaris
Comparing OpenSolaris to Other Operating Systems
Getting Involved in OpenSolaris
OpenSolaris Development Process
Resources
Summary
Chapter 2: Installing OpenSolaris
Solaris Express Community Edition
Schillix
BeleniX
NexentaCore
MartUX
MilaX
OpenSolaris
Resources
Summary
Chapter 3: OpenSolaris Crash Course
Discovering the Desktop
Using the Command Line
Switching Languages and Locales
Getting Online
Adding Software
Developing on OpenSolaris
Connecting Remotely
System Administration
Resources
Summary
Part II: Using OpenSolaris
Chapter 4: The Desktop
Desktop Customization
Desktop Sharing
Internet Applications
Media Applications
Graphics Applications
System Administration
Other Applications
Troubleshooting
Resources
Summary
Chapter 5: Printers and Peripherals
Printing
Scanners
USB Devices
Audio
Serial Devices and Modems
Network Interfaces
Power Management and UPSs
Device Drivers
Resources
Summary
Chapter 6: Software Management
Package Management
Updating Your Software
Boot Environment Management
Managing a Package Repository
Building Your Own Distribution
Resources
Summary
Part III: OpenSolaris File Systems, Networking, and Security
Chapter 7: Disks, Local File Systems, and the Volume Manager
Disks
File System Management
Devfs
UFS
Swap Space
Other Local File Systems
The Volume Manager
Resources
Summary
Chapter 8: ZFS
ZFS Basics
Managing ZFS Pools
ZFS Datasets
ZFS Delegated Administration
ZFS Versioning
Resources
Summary
Chapter 9: Networking
Network Interfaces
Network Services
OpenSolaris As a Router or Firewall
Troubleshooting
Resources
Summary
Chapter 10: Network File Systems and Directory Services
Introduction to NFS
Introduction to CIFS
Managing File Sharing
Accessing Files with NFS
Accessing Files with CIFS
OpenSolaris Naming Services
NIS
LDAP
Resources
Summary
Chapter 11: Security
Security Overview
Preventing Unauthorized Access
Limiting the Damage
Ensuring Secure Communication
Detecting Attacks
Kerberos
Trusted Extensions
Resources
Summary
Part IV: OpenSolaris Reliability, Availability, and Serviceability
Chapter 12: Fault Management
Predictive Self-Healing
Fault Management Overview
Fault Management Commands
Using Fault Management
Resources
Summary
Chapter 13: Service Management
Processes and Services
SMF By Example
SMF Machinery
Customizing SMF Services
Resources
Summary
Chapter 14: Monitoring and Observability
Getting System Configuration Information
Primary Utilities
/proc
Kstats
Other Utilities
Logs
SNMP
Resources
Summary
Chapter 15: DTrace
Getting Started
Tracing Syntax
The dtrace Command
Advanced Tracing
User-Level and High-Level Language Tracing
Resources
Summary
Chapter 16: Clustering OpenSolaris for High Availability
Introduction to High-Availability Clusters
Overview of Open High Availability Cluster
Setting Up a Cluster
Using the Cluster
Advanced Cluster Administration
Making Custom Services Highly Available
Disaster Recovery with Open High Availability Cluster
Resources
Summary
Part V: OpenSolaris Virtualization
Chapter 17: Virtualization Overview
Benefits of Virtualization
Types of Virtualization
Comparing Virtualization Solutions
Virtualization and a Graphical Display
Virtualization Administration
Summary
Chapter 18: Resource Management
Introduction to Resource Management
Projects and Tasks
Resource Controls
Resource Caps
Resource Pools
Processor Sets
Scheduling
Accounting
Resources
Summary
Chapter 19: Zones
Introduction to Zones
Uses of Zones
Getting Started with Zones
Advanced Zone Configuration
Advanced Zoneadm Features
Ongoing Zones Administration
Limitations to Zones
Branded Zones
Resources
Summary
Chapter 20: xVM Hypervisor
xVM Concepts
Getting Started with xVM
Advanced xVM Administration
Live Migration
Virtual Devices
Troubleshooting
Resources
Summary
Chapter 21: Logical Domains (LDoms)
Introduction to LDoms
LDom Concepts
Getting Started with LDoms
Advanced LDom Administration
Resources
Summary
Chapter 22: VirtualBox
Getting Started
Managing VirtualBox
Advanced Features
Resources
Summary
Part VI: Deploying and Developing on OpenSolaris
Chapter 23: Deploying a Web Stack on OpenSolaris
The Web Stack on OpenSolaris
The AMP Stack
Java-based Web Services
Resources
Summary
Chapter 24: Developing on OpenSolaris
Java Development
C and C++ Development
Other Languages
Build Automation
NetBeans
Source Code Management
Building IPS Packages
Crash Dumps and Kernel Debugging
Resources
Summary
Index
Advertisement
OpenSolaris™ Bible
Published by
Wiley Publishing, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Copyright © 2009 by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN: 978-0-470-38548-7
Library of Congress Cataloging-in-Publication Data:
Solter, Nicholas, 1977-
OpenSolaris bible / Nicholas Solter, Gerald Jelinek, David
Miner.
p. cm.
Includes index.
ISBN 978-0-470-38548-7 (paper/website)
1. OpenSolaris (Electronic resource) 2. Operating systems
(Computers) 3. Open source software. I. Jelinek, Gerald. II. Miner,
David. III. Title.
QA76.76.O63S6526 2009
005.3—dc22
2008049814
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, or online at http://www.wiley.com/go/permissions.
Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties, including without limitation warranties of fitness for a particular purpose. No warranty may be created or extended by sales or promotional materials. The advice and strategies contained herein may not be suitable for every situation. This work is sold with the understanding that the publisher is not engaged in rendering legal, accounting, or other professional services. If professional assistance is required, the services of a competent professional person should be sought. Neither the publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or Website is referred to in this work as a citation and/or a potential source of further information does not mean that the author or the publisher endorses the information the organization or Website may provide or recommendations it may make. Further, readers should be aware that Internet Websites listed in this work may have changed or disappeared between when this work was written and when it is read.
For general information on our other products and services or to obtain technical support, please contact our Customer Care Department within the U.S. at (800) 762-2974, outside the U.S. at (317) 572-3993 or fax (317) 572-4002.
Library of Congress Cataloging-in-Publication Data is available from the publisher.
Trademarks: Wiley, the Wiley logo, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.
To my children, Kai and Katja.—Nicholas Solter
To my wife, Sarah, who had no idea we would be moving when I was in the middle of this book, but who was always encouraging and supportive.—Jerry Jelinek
I dedicate this book to my wife, Kris. I hope she doesn't regret telling me, while I was considering participating, that I won't regret having written it!—Dave Miner
About the Authors
Nicholas Solter has worked at Sun Microsystems for more than eight years in the areas of high availability and distributed systems. In his work on the Solaris Cluster product, he has implemented clustering support for core Solaris features such as Zones and SMF. He was the technical lead in open sourcing the Solaris Cluster product and is currently leading the effort to run Solaris Cluster on the OpenSolaris distribution.
In addition to his work at Sun, Nicholas has experience in the computer game industry at Digital Media International and Electronic Arts. He is also the lead author of Professional C++ (Wrox) and has taught C++ at the college level.
Nicholas studied computer science at Stanford University, where he earned bachelor of science (with distinction) and master of science degrees, with a concentration in systems. When not working, he enjoys spending time with his family, playing basketball, reading, and playing in the Colorado snow (having been deprived of winters growing up in Southern California).
Gerald Jelinek has been an engineer at Sun Microsystems for a total of almost 20 years, although not contiguously. He currently works on the Zones virtualization subsystem in OpenSolaris. In the past, he has worked on a wide variety of projects, including system installation, JumpStart, printing, a variety of system administration tools, and the Solaris Volume Manager. A little-known fact is that he personally assembled the various project bits and burned the Solaris 2.0 golden CD. In addition to Sun, Gerald has worked at several other companies.
Gerald graduated from Washington University in St. Louis with a B.S. in computer science, and from the University of Colorado with an M.S. in computer science. He and his wife, Sarah, spend most of their free time fixing up the 85-year-old house they recently moved into.
David Miner has been an engineer at Sun Microsystems for nearly two decades. He is presently the lead for the Caiman installer project and co-lead for the OpenSolaris distribution. During his time at Sun he has worked primarily in the areas of system administration and networking and has been a significant contributor to a variety of projects in both fields, including the Solaris admintool and sysidtool, PC-NFS, the Solaris DHCP server and DHCP Manager management tool, and the Service Management Facility (SMF). Prior to Sun, Dave worked at Prime Computer on TCP/IP networking.
David graduated from Michigan State University with a B.S. (with honors) in computer science. In his spare time, Dave is an avid golfer and hoopster. He and his wife, Kris Corwin, are the adoptive parents of a small pack of retired racing greyhounds.
Credits
Executive Editor
Bob Elliott
Vice President and Executive Group Publisher
Richard Swadley
Development Editor
Maryann Steinhart
Vice President and Executive Publisher
Barry Pruett
Technical Editor
Peter Baer Galvin
Project Coordinator, Cover
Lynsey Stanford
Production Editor
Dassi Zeidel
Proofreader
Josh Chase, Word One
Copy Editor
Luann Rouff
Indexer
Ted Laux
Editorial Manager
Mary Beth Wakefield
Cover Illustration
Joyce Haughey
Production Manager
Tim Tate
Cover Designer
Michael E. Trent
Acknowledgments
Many people contributed directly and indirectly to this book. We would first like to thank Bob Elliot, executive editor at Wiley, for letting us write this book, and our agent, David Fugate of LaunchBooks Literary Agency, for helping to make the project possible. Our editors, Maryann Steinhart, Dassi Zeidel, and Luann Rouff, excellently guided us through the writing and revision process, while Peter Baer Galvin provided invaluable technical feedback and corrections.
Additionally, we would like to thank the following people, who reviewed one or more chapters: Alexandre Chartre, Bonnie Corwin, Thorsten Früauf, Moinak Ghosh, Susan Kamm-Worrell, and John Levon. Thank you, also, to Steve McKinty for providing the content on Open HA Cluster Geographic Edition. Any remaining errors are, of course, our own.
A special thanks goes to Sanjay Nadkarni, who provided the camera Dave used in completing the examples in Chapter 5 during a trip to Sun's Broomfield campus.
We also want to acknowledge the thousands of engineers over the past 40 years who have contributed to the code that is now OpenSolaris. Additionally, we would like to recognize Sun Microsystems' courageous step of open sourcing the Solaris operating system to create OpenSolaris, and the combined wisdom and numerous contributions of the OpenSolaris community. Although we are employees of Sun and members of the OpenSolaris community, the contents of this book are our own, and do not necessarily reflect the views of these entities.
Finally, we would like to thank our respective spouses, Sonja Solter, Sarah Jelinek, and Kris Corwin, for bearing with us through this process and tolerating our long nights and weekends spent on this book.
Introduction
Welcome to OpenSolaris Bible! This book provides an introduction and tutorial on one of the newest open source operating systems: OpenSolaris. Based on the enterprise-class Solaris operating system from Sun Microsystems with roots in UNIX dating back to 1969, and chock-full of exciting new features such as ZFS, Zones, SMF, and DTrace, OpenSolaris was released to the open source community in 2005. Since then, Sun and the OpenSolaris community have added significant virtualization features, such as xVM Hypervisor and VirtualBox; created a new network packaging model called IPS; rewritten the installer; and created a brand-new Live CD distribution. Whether you're looking for a new laptop, workstation, development platform, or server, it's worth your while to read this book and take OpenSolaris for a spin.
This book is a comprehensive resource on using OpenSolaris. By the time you have completed the book, you'll know how to install, use, administer, develop on, and deploy OpenSolaris. In fact, you'll become a power user, conversant in advanced troubleshooting with FMA, SMF, DTrace, and more. In addition, you'll understand how to use virtualization technologies with OpenSolaris to optimize your physical hardware.
Additionally, OpenSolaris Bible contains the following features:
Practical, hands-on advice. As active software developers who use OpenSolaris every day, the authors have included hands-on usable information. Unlike some books that address only theory, this book contains practical tips and tricks that you can immediately put into practice.Concrete examples. The book is full of specific examples—including exact command lines and screenshots— that walk you through the tasks you need to accomplish. These examples are all well tested.Cutting-edge information. As active contributors to OpenSolaris, the authors provide cutting-edge details about rapidly evolving features such as IPS, xVM Hypervisor, VirtualBox, and more.Candid insider tips. As both Sun Microsystems employees and OpenSolaris community leaders, the authors are in an ideal position to explain OpenSolaris to you.Who Should Read This Book
Perhaps you've heard about the ZFS file system, DTrace, or one of the other novel features in OpenSolaris and are eager to try out the operating system to see what all the fuss is about; or maybe you're an experienced UNIX or Linux user who wants to explore one of the newest open source operating systems on the block. You might be a disgruntled Windows user interested in moving into the wonderful world of open source software; or perhaps you're already an experienced OpenSolaris user who would like to move to the next level or learn about a feature that you haven't had the chance to try yet. This book has something for you, regardless of your background or familiarity with OpenSolaris.
The only prerequisite for reading this book is that you have some experience with UNIX or Linux. That could be with any UNIX/Linux variant, such as Solaris, HP-UX, NetBSD, MacOS X, Ubuntu, Red Hat Linux, and so on. The key point is that you should be familiar with the basic UNIX/Linux model: You should know what a shell is, and be familiar with the concepts of users, processes, file systems, network interfaces, and the like. If you've used only Microsoft Windows, the UNIX model represents a paradigm shift; and you will find it easier to approach once you've read an introductory book on UNIX or Linux, such as UNIX for Dummies by John R. Levine and Margaret Levine Young. However, Chapter 3 of this book provides a whirlwind introduction to basic OpenSolaris user and administrator concepts, so if you're in doubt, skim through that chapter to decide whether this book is appropriate for you.
Programming experience is not a prerequisite for this book. You can read the book even if you've never written a C program or shell script in your life.
How This Book Is Organized
OpenSolaris Bible contains 24 chapters, divided into six parts. Although the book is organized so that you can start with Chapter 1 and read straight through to Chapter 24, if you're like the authors of this book you are unlikely to tackle a technical book that way. Instead, you may want to jump straight to the sections that most interest you, or use the book as a reference for whatever task you currently have at hand. For example, if virtualization is the hot topic for you right now, you might want to jump straight to Part V. To that end, this book has been carefully designed such that each chapter more or less stands on its own. Chapters that reference material in other parts of the book contain cross-references where appropriate, so you'll always know where to look for more information.
Part I: Introduction to OpenSolaris
Part I provides a crash course in OpenSolaris. Chapter 1 introduces the OpenSolaris operating system and open source community, and contrasts it with other popular operating systems such as Linux. Chapter 2 describes the various distributions available and shows you how to obtain and install the OpenSolaris distribution from Sun. Chapter 3 concludes Part I with a tour of the OpenSolaris operating environment, from the GNOME desktop to the bash shell, from using vim, to system administration. If you're new to OpenSolaris, Part I is the place to start. This part assumes no prior experience with OpenSolaris. Even if you're experienced with Linux or Solaris and are tempted to jump straight to a more advanced topic, you should skim this section to ensure that you're up to speed on the latest developments in OpenSolaris and how it differs from other popular operating systems.
Part II: Using OpenSolaris
Part II provides the details of using OpenSolaris as a desktop or workstation system. Chapter 4 begins Part II by covering the GNOME desktop and the various applications available to you for accessing the Internet, listening to music, and so on. Chapter 5 continues to describe how to use your OpenSolaris box as a desktop machine by connecting printers and other peripherals, such as USB devices. Chapter 6 concludes Part II by describing how to obtain additional software and how to upgrade your OpenSolaris system. Even if you're planning to use OpenSolaris only as a server, you should familiarize yourself with the software management discussion in Chapter 6.
Part III: OpenSolaris File Systems, Networking, and Security
Part III delves into the details of OpenSolaris administration. Any OpenSolaris user or administrator needs to understand how to use disk storage, how to network OpenSolaris machines, and how to take advantage of the OpenSolaris security features. Chapter 7 starts Part III with an introduction to using disks with OpenSolaris, including disk naming, formatting, and partitioning; the UFS file system; and the Solaris Volume Manager. Chapters 08 and 10 present details on the ZFS file system and Network File System (NFS), respectively. Chapter 9 provides a detailed look at OpenSolaris networking, while Chapter 10 also includes information on the NIS and LDAP directory services. Chapter 11 concludes Part III with a thorough discussion of the OpenSolaris security features, including Role-Based Access Control, IP Security, and Kerberos.
Part IV: OpenSolaris Reliability, Availability, and Serviceability
Part IV describes the reliability, availability, and serviceability features of OpenSolaris. Computer systems can and will fail at both the hardware and software level. How an operating system handles these failures determines its suitability as a robust platform. OpenSolaris, based on the enterprise-class Solaris operating system from Sun, provides significant robustness in the form of what computer scientists sometimes call RAS: reliability, availability, and serviceability. This part opens with fault management and service management, in Chapters 12 and 13, respectively. These features combine to implement OpenSolaris' predictive self-healing, which provides significant robustness in the presence of both hardware and software faults. Chapters 14 and 15 describe the serviceability aspects of OpenSolaris, including the innovative dynamic tracing (DTrace) facility. The part concludes with Chapter 16, on clustering OpenSolaris machines together for increased availability of the system as a whole.
Part V: OpenSolaris Virtualization
Part V covers the various technologies available to use with OpenSolaris to share the computing resources of a single physical machine among multiple users, processes, and even operating systems. Chapter 17 presents on overview of virtualization terms and concepts. Chapter 18 describes OpenSolaris resource management techniques for virtualizing resources within a single operating system instance. Chapter 19 covers the Zones OS-level virtualization feature in OpenSolaris. Chapters 20 and 21 describe the xVM and Logical Domains hypervisor-based virtualization approaches on x86 and SPARC hardware, respectively, that enable you to run multiple operating system instances on a single physical machine. Chapter 22 concludes Part V with a look at VirtualBox, an easy-to-use virtualization software application that can run on a variety of host operating systems, including OpenSolaris, and can support OpenSolaris as a guest operating system. VirtualBox is your best bet for trying out OpenSolaris, even if you don't have a physical machine available on which to install it. If that's the case, you might want to jump to Chapter 22 after reading Part I.
Part VI: Developing and Deploying on OpenSolaris
Part VI concludes OpenSolaris Bible with a thorough look at deploying web services and using OpenSolaris as a development platform. Chapter 23 shows you how to use the web stack applications available on OpenSolaris, such as the Apache web server, MySQL, PostgreSQL, Apache Tomcat, and others. Chapter 24 presents the various development and debugging tools available on OpenSolaris, including the Java Development Kit, the Sun Studio Compiler Collection, NetBeans, the GNU Compiler Collection, and various source code management systems such as Mercurial. If you're a developer considering OpenSolaris as your platform, Chapter 24 has all the background information you need.
Conventions Used in This Book
There are many different organizational and typographical features throughout this book designed to help you get the most from the information.
Text styles
This book uses a number of conventions to present the material clearly and consistently:
New terms are italicized when they are introduced.Keyboard strokes are shown like this: Ctrl+K.Nested menu options are listed in order of selection, separated with arrows, like this: Applications→Graphics→Image EditorCode, commands, URLs, filenames, and file listings are all printed in a monospace font like this: www.opensolaris.com.When an example includes both input and output, the same monospace typography is used, but input is presented in bold type to distinguish the two. Here's an example of a command with both input and output:$ echo "Hello, world"
Hello, world
Command prompts
The book shows two different prompts for shell commands. A root shell is shown with the pound sign (#), whereas a non-root shell is shown with the dollar sign ($). Here's an example of a root shell command:
# svcadm enable network/physical:default
Here's an example of a user shell command:
$ date
Tue Jul 29 13:11:10 MDT 2008
Note that OpenSolaris allows certain non-root users to execute privileged commands. This capability is discussed further in Chapters 03 and 11.
Icons
The following items are used to call your attention to points that are particularly important:
Note
Notes provide additional, ancillary information that is helpful, but somewhat outside of the current presentation of information.
Tip
Tips generally are used to provide information that can make your work easier—special shortcuts or methods for doing something easier than the norm.
Caution
This information is important and is set off in a separate paragraph with a special icon. Cautions provide information about things to watch out for, whether simply inconvenient or potentially hazardous to your data or systems.
Cross-Ref
Cross-references point you to other places in the book where you can find related or additional material.
Hardware Architecture
Throughout the text the term x86 is used to refer generally to both 32-bit and 64-bit AMD or Intel hardware architectures. SPARC refers to 64-bit systems with either sun4u or sun4v processor class CPUs unless specifically noted. This is primarily only an issue in Chapter 21 on LDoms.
Manual Page References
System commands are sometimes written in the body of the text such that they refer to the appropriate manual page for that command. For example, svcs(1) means the svcs command, which is documented in section 1 of the manual pages. OpenSolaris includes the traditional UNIX man(1) command, which can be used to display the manual page for a command. Thus, the following example displays the manual page for the svcs(1) command:
$ man svcs
Resources
Most of the chapters include a “Resources” section at the end that provides suggestions for more information—for example, URLs to project pages, other reference books, or pointers to the source code.
What's on the Companion Website
The companion website for OpenSolaris Bible, at www.wiley.com/go/opensolaris contains the source code for the programming examples in Chapters 15 and 24, as well as an up-to-date errata list.
Minimum Requirements
To install and try out OpenSolaris on bare metal, you need a desktop or laptop machine with the following minimum requirements:
Intel or AMD 32-bit or 64-bit Pentium III or faster processor512MB RAM10GB free hard disk spaceCD or DVD driveIf you intend to download OpenSolaris from the Internet, you need a reasonably high-speed Internet connection and a CD burner to burn the image to a CD. Alternately, you can order a free CD from http://opensolaris.com.
OpenSolaris does not work perfectly with every off-the-shelf laptop or desktop machine. Use the device detection tool described in Chapter 2 to determine whether your hardware will work.
OpenSolaris in a virtual machine
If, instead of running on bare metal, you want to run OpenSolaris in VirtualBox, VMware, or on other virtualization software, you need at least 1GB of RAM, but you won't need a CD/DVD drive or a CD burner. You also won't need to worry about hardware compatibility and the device detection tool.
Other requirements
A few of the topics in this book require hardware other than the minimum listed here. Logical Domains, described in Chapter 21, require a sun4v SPARC processor. Running virtual machines under xVM, VirtualBox, or Logical Domains generally requires more than 512MB of RAM; and Solaris Cluster Express, described in Chapter 16, requires additional disk space and RAM.
Where to Go from Here
While reading this book, the authors strongly suggest that you “play along at home” by downloading and installing the free OpenSolaris distribution from http://opensolaris.com.
After reading the book, you should be a confident user and administrator of OpenSolaris. If you have clarifying questions or queries about topics not covered in this book, please feel free to ask the OpenSolaris community at http://opensolaris.org. Chapter 1 contains a list of helpful mailing lists and forums.
Despite our best efforts to ensure the correctness of all the material in this book, you might uncover a mistake as you're reading. If you do find a bug, please report it at www.wiley.com/go/opensolaris.
We hope you find this book useful, and that you enjoy using OpenSolaris as much as we do!
Part I
Introduction to OpenSolaris
In This Part
Chapter 1: What Is OpenSolaris?
Chapter 2: Installing OpenSolaris
Chapter 3: OpenSolaris Crash Course
Chapter 1
What Is OpenSolaris?
In this Chapter
You probably wouldn't have picked up this book if you hadn't at least heard of OpenSolaris or Solaris, but even if you've poked around OpenSolaris or used Solaris for years, you might be confused about what, exactly, OpenSolaris is. Is it an operating system, an open source code base, an open source community, or a distribution? How is it different from Solaris? How is it different from Linux? Is it really open source?
This chapter answers those questions and more. Even if you're an experienced Solaris user, this chapter may be useful in helping you understand OpenSolaris and its differences from Solaris. On the other hand, if you're already involved in OpenSolaris, you might still want to skim this chapter to learn a bit about the history of OpenSolaris and Solaris with which you might not be familiar.
Introduction to OpenSolaris
OpenSolaris is an open source operating system, similar in scope to GNU/Linux and BSD, but descended from the proprietary Solaris operating system from Sun Microsystems. The authors of this book find it helpful to think of OpenSolaris as divided into three distinct but related aspects: the code, the distributions, and the community.
OpenSolaris Code
OpenSolaris is the open source version of Sun Microsystems' Solaris operating system, but OpenSolaris consists of code for much more than just the core operating system—it includes source for installers, desktops, layered software such as Open High Availability Cluster, documentation, test frameworks and test suites, and much more. OpenSolaris is millions of lines of source code in tens of thousands of source files.
You can browse the source code online at http://src.opensolaris.org.
If you're familiar with the Linux world, you can think of this aspect of OpenSolaris as similar to kernel.org, but with source code for much more than just the operating system kernel.
Note
Some parts of Solaris are legally encumbered, such that they cannot be open sourced. Thus, OpenSolaris does not contain the source code for the complete Solaris operating system.
OpenSolaris Distributions
Unless you're an operating systems developer, source code doesn't do you much good. Most people want a running operating system, not a bunch of code. While you can theoretically build a running system from the source, if all you want to do is run OpenSolaris, it's much easier to install one of the OpenSolaris binary distributions. Luckily, there are several of them, including Solaris Express, Shillix, BeleniX, NexentaCore, and MartUX. This book focuses on the OpenSolaris distribution from Sun Microsystems, confusingly also named OpenSolaris. (The OpenSolaris distribution from Sun is available from http://opensolaris.com.)
Note
Sun Microsystems owns the trademark for the term OpenSolaris. Thus, distributions from outside Sun are allowed to use the term only by following the OpenSolaris Trademark Policy. See http://opensolaris.org/os/trademark.
The various OpenSolaris distributions are comparable to the various Linux distributions such as Ubuntu, Red Hat, and SUSE Linux.
Cross-Ref
Chapter 2 describes OpenSolaris distributions in more detail.
OpenSolaris Community
The OpenSolaris community consists of the activity around the OpenSolaris source code and distributions, including design and development of new features, bug fixes, advocacy and evangelism, distribution building, discussions, and much more. The development community, centered at http://opensolaris.org, hosts the source code and provides resources for projects such as web space, mailing lists, and source code repositories. This community supports active development, similar to the Apache community.
A more user-centered community built around the OpenSolaris binary distribution from Sun can be found at http://opensolaris.com.
Both of these OpenSolaris communities are sponsored by Sun Microsystems. However, non-Sun employees are encouraged to participate at all levels, from using the distributions to writing kernel code.
The section “Getting Involved in OpenSolaris” near the end of this chapter provides more information about the OpenSolaris communities.
OpenSolaris Features
OpenSolaris contains a rich feature-set that makes it suitable for a wide variety of uses, from running a personal desktop or laptop to providing web services to hosting enterprise-class databases with stringent availability requirements. OpenSolaris contains far too many features to list here, but an overview of the key differentiators can help you start to evaluate its usefulness. For more details on these features and many others, read the rest of this book! Here are some of the OpenSolaris highlights:
Support for multiple hardware architectures, including both SPARC and 32-bit and 64-bit x86-based systems. OpenSolaris also performs well in many industry benchmarks.High scalability. OpenSolaris runs on both single processor machines and multiprocessor systems with hundreds of CPUs and terabytes of RAM.Innovative file system and volume manager support. Solaris uses a Virtual File System (VFS) layer so that different file systems can be plugged in on top of it relatively easily. In addition to the standard Unix File System (UFS), OpenSolaris includes the Solaris Volume Manager (SVM) and the new ZFS.Networking features, including a kernel-level, high-performance TCP/IP stack, IPv6 support, IPsec, Network Auto-Magic (NWAM) for automatic detection and configuration of network interfaces, and IP Network Multipathing (IPMP) for fault tolerance and load balancing.Complex resource management, including processor pools, physical memory controls, and a fair share scheduler.Sophisticated security, including role-based access control (RBAC), configurable privileges, and trusted extensions.Rich observability and debugging support, including myriad system monitoring tools, the Modular Debugger (MDB), and the dynamic tracing facility (DTrace).Predictive self-healing features in the form of the Fault Management Architecture (FMA) and Service Management Facility (SMF). They work together to detect hardware and software faults and take appropriate action.Multiple forms of virtualization. In addition to the operating-system-level virtualization of Solaris Zones, OpenSolaris offers support for xVM Hypervisor, Logical Domains (LDoms), and VirtualBox, and runs in VMware and other virtualization frameworks.Sophisticated 64-bit fully preemptable kernel. The OpenSolaris kernel is also modular—device drivers can be installed without requiring a system reboot, and features can be configured without recompiling the kernel. The virtual memory subsystem uses demand paging for greater performance and less memory usage. The process scheduling system supports multiple scheduling classes, including timeshare, real time, interactive, fair share, and fixed priority.Full POSIX compliance with a rich application programming API, including support for 64-bit applications.Integrated AMP stack (Apache, MySQL, PHP) for running web services.With all of these features in mind, let's take a look at open source software.
The “Open” in OpenSolaris
As implied by the “open” in the name, OpenSolaris is open source software. The general meaning of open source is that the source code is available for anyone to look at. However, the details vary, and in fact OpenSolaris is not open source in exactly the same way as Linux, Apache, MySQL, BSD, Perl, Java, or most other open source software with which you might be familiar. To understand the details of the OpenSolaris open source model, it's helpful to first review and define some open source software basics.
Open Source Software Basics
In the traditional closed source model of software development, companies or developers distribute only running programs in the form of binaries. Users cannot look at the source code from which those binaries were compiled. In the open source model, as its name implies, anyone can view, modify, compile, and even redistribute the source code for the programs. More specifically, the Open Source Initiative, a respected authority and advocate for open source software, specifies 10 criteria that software must fulfill in order to be open source, including the following:
Free redistribution—Anyone can sell or give away the software by itself or as part of an aggregate distribution.Source code—Source must be available for all distributions.Derived works—Anyone can modify the code and redistribute it.No discrimination—The code must be available to anyone for any “field of endeavor.”The complete list is available at http://opensource.org/docs/osd. It's important to remember that open source software, despite sometimes being called free software, is not required to be free of charge. Think of the “free” in free software as referring to free speech, rather than free beer. Thus, companies or individuals can sell programs built from open source code.
Note
Other terms for open source software include free software and free and open source software (FOSS).
This book uses the term open source software not to emphasize any particular software philosophy but because the authors think it's the clearest term.
Open Source Licenses
All open source code is available under an open source license, which defines the terms of use. Different open source projects choose different licenses. Some licenses with which you might be familiar are the GNU General Public License version 2 (GPLv2), under which Linux is available, and the BSD license, under which OpenBSD, NetBSD, and other BSD variants are available.
The major difference between the licenses is their requirements regarding derivative works, or modifications to the source code. Specifically, if someone who is not the original author takes some open source code and changes it by adding newly written code, removing code, or combining it with other code, is she required to release the new code under the original license, or can she use a different license? Based on this criterion, there are three categories of open source licenses:
Strong copyleft licenses require that any derived code stay under the original license. Therefore, if a developer adds some code to a file under a copyleft license, then that new file must also be released under the original license. A strong copyleft license is project-based, rather than file-based. That is, all source files in a project must be under the same license. This requirement generally means that code under a strong copyleft license cannot link (either statically or dynamically) with code under a non-strong copyleft license. Another way of looking at it is that every piece of code that strong copyleft licensed code touches must also be under that license. For this reason, strong copyleft licenses are sometimes called viral licenses. Thus, you cannot generally combine code under a strong copyleft license with code under other licenses. The best-known strong copyleft license is the GNU General Public License (GPL), both versions 2 and 3. The Linux kernel, the GNU tools, Java, and a multitude of other software projects use the GPL.Weak copyleft licenses are nearly identical to strong copyleft licenses except that they're file-based instead of project-based. That is, modifications to a file must be released under the original license, but that file can be combined in a project with code under a different license. As a result, weak copyleft licenses are not viral in the same way as strong copyleft licenses. The Mozilla Public License (MPL), under which the Mozilla Firefox browser is licensed, is a weak copyleft license.Non-copyleft licenses do not require derived works to stay under the original license. They do not even require derived code to be released under any open source license. Thus, someone could take an open source project under a non-copyleft license and use it as a basis for a proprietary product. The BSD license is the best-known example of a non-copyleft license.While these differences can seem esoteric, a quick glance at the discussions in various open source communities shows that the debate can become quite passionate. Some people, particularly in the Linux and GNU communities, feel strongly that only strong copyleft licenses are “true” open source licenses because they best protect the original author. Others feel that non-copyleft licenses, such as the BSD license, are preferable because they give the most freedom to developers creating derived works. Still others find weak copyleft licenses to be a reasonable compromise.
Open source licenses generally include provisions to distribute binary executables built from the source. The licenses usually require that the source code be made available with the binary executables, or be made available upon request. For example, both the Linux source and the Linux distributions are available under the GPLv2.
OpenSolaris Licenses
The OpenSolaris source code is heterogeneous in its open source licenses and the predominant license may be unfamiliar to you.
Common Development and Distribution License
The majority of the OpenSolaris source code is available under the Common Development and Distribution License (CDDL), pronounced “cuddle.” Written by Sun explicitly for OpenSolaris, this license has been officially approved by the Open Source Initiative (OSI) as a legitimate open source license. It's a weak copyleft license like the MPL (which it resembles) in that it requires derivative works to maintain the same license on a per-file basis, but does not require all the files in a project to be under the CDDL.
Because the CDDL is copyleft, changes to the source code itself must be released under the CDDL as well. It is hoped that any such changes are contributed back to the OpenSolaris community itself, but that is not a requirement. However, because the CDDL is weak copyleft, instead of strong copyleft, whole pieces of it may be incorporated into projects under different licenses, including proprietary projects. This aspect of the license has allowed OpenSolaris features such as DTrace and ZFS to be ported to other operating systems such as Mac OS X 10.5. (DTrace and ZFS are covered in Chapters 15 and 8, respectively.)
Note
The GPLv2 is incompatible with the CDDL because the GPLv2 requires all code in the project to be under the GPL. Thus, porting OpenSolaris features to Linux is significantly more complicated than porting to other systems.
Because the Solaris code base contained some open source and third-party code even before it was open sourced by Sun, not all the OpenSolaris code is under the CDDL. Parts of it are licensed under the BSD license and other open source licenses. Each source file contains a header comment specifying the license for that file.
Binary Distributions under the CDDL
It's sometimes perplexing that some binary distributions of OpenSolaris are available under the CDDL. Isn't the CDDL a source code license? Yes, it is. However, like many other open source licenses, the CDDL permits binary executables built from source code under the license to be distributed under the CDDL. Thus, distributions of OpenSolaris may be distributed under the CDDL.
As if things weren't confusing enough with the source code licenses, OpenSolaris also uses another binary license called the OpenSolaris Binary License (OBL). Binaries under this license are freely redistributable, and can be used for running and developing OpenSolaris. Binaries released under the OBL include build tools, parts of Solaris that cannot be open sourced (and so aren't under the CDDL), and binaries built from proprietary code.
Open Development
Open source software is generally, but not always, developed as part of a community in an open development process. In open development, developers can collaborate in public forums, participants need not all work for the same company, and there is freedom to pursue projects that might not fit within the scope of a single company's business needs.
The opposite of an open development process is a proprietary development process, in which a company or individuals write the code on their own, with their particular business needs in mind, and without interacting with people outside their group.
Note
Eric S. Raymond's seminal article, “The Cathedral and the Bazaar,” compares these two software development models. You can read the article at www.catb.org/∼esr/writings/cathedral-bazaar/cathedral-bazaar.
Although the Solaris operating system was originally developed in a proprietary development model, the OpenSolaris community is intended to support an open development model. Consequently, you will find many active developers, discussions, and ongoing projects at www.opensolaris.org.
What Open Source OpenSolaris means to You
At this point you might be wondering what the open source and open development aspects of OpenSolaris mean for you. On the open source side, while the specific terms of the licenses and the legal requirements can be complicated, the important thing to remember is that you can always look at the OpenSolaris source code. That may not be too useful if you only want to run an OpenSolaris distribution, but if you're a developer or advanced system administrator, studying the OpenSolaris code can be a valuable proposition.
On the other hand, the open development aspects of OpenSolaris should interest everyone. The OpenSolaris community is a great place to ask for help, contribute suggestions, participate in discussions, and in general influence the direction of OpenSolaris!
The History of OpenSolaris
The history of OpenSolaris, and even some of the source code, dates back to 1969. In that year, Ken Thompson at AT&T Bell Laboratories wrote the first version of the UNIX operating system. UNIX was designed from the beginning to be multi-user and multi-tasking, with an interactive shell that would still look familiar to any UNIX or Linux user today. Over the next few years, Thompson and Dennis Ritchie continued refining UNIX, which was used mostly inside Bell Labs. However, in the mid to late 1970s, UNIX versions 6 and 7 were distributed fairly widely, and used by various academic and government institutions, including the University of California at Berkeley.
Because of the lenient license terms in early versions of AT&T's UNIX, other organizations began significantly customizing and enhancing it. This work led to several major branches of UNIX, the most relevant of which to OpenSolaris was the Berkeley Software Distribution (BSD). In 1978, Bill Joy and others at Berkeley added virtual memory, demand paging, and other embellishments to UNIX Version 7 to create a version of UNIX called 3BSD. Joy and others continued enhancing BSD UNIX over the next few years, adding the familiar TCP/IP networking stack, the C shell, the VI editor, and other key features.
In 1982, Bill Joy co-founded Sun Microsystems and by 1984 had used BSD UNIX as the basis for the SunOS operating system that ran Sun's workstations. In the meantime, AT&T continued developing its line of UNIX, calling it System V, and other companies created their own branches, such as Microsoft's Xenix (which later became SCO UNIX).
In the late 1980s, Sun and AT&T began work on a joint project to remerge several popular variants of UNIX to create System V Release 4. The result, completed in 1990, contained the best features from AT&T's earlier System V Release 3, Sun's SunOS, 4.3BSD, and Xenix 5, including TCP/IP support, the Network File System (NFS), the Unix File System (UFS), and the Virtual File System (VFS) interface. Additionally, System V Release 4 (SVR4) fully complied with the Portable Operating System Interface (POSIX) standard, which defines an application programming interface, utilities, and other aspects of an operating system. Theoretically, a program written to POSIX interfaces can run on any POSIX-compliant operating system. In 1992, SVR4 became the basis of Sun's new operating system, Solaris 2.0.
Note
“Solaris” technically refers to the entire operating environment, including the graphical user interface. The kernel itself is still called SunOS. However, this book uses Solaris in the colloquial sense to refer to both the entire operating environment and the kernel.
In the years since, Sun has continually enhanced Solaris with features such as the kernel slab memory allocator, multithreaded kernel and multithreaded process support, 64-bit kernel and process support, Solaris doors inter-process communication, and many others. The most recent release of Solaris, Solaris 10, introduced several exciting new features such as a dynamic tracing facility (DTrace), the Service Management Facility (SMF), Zones, and the ZFS file system.
In 2005, Solaris became the first mature proprietary operating system to go open source when Sun released the source code as OpenSolaris. The open sourced code was basically the source for Solaris 10, which had been first released approximately five months earlier. Since then, some of the active development in OpenSolaris has been backported and released in Solaris 10 updates, but much of it is currently unique to OpenSolaris. It's important to note that backports of OpenSolaris features to Solaris 10 can only be done by Sun because the Solaris 10 source code is not open source.
In summary, OpenSolaris's development path has not been exactly straightforward. As an open source operating system based on a closed-source operating system that in turn is related to several other open source and closed source operating systems, OpenSolaris can be confusing. If nothing else, this history should help you understand why there are so many AT&T and University of California Berkeley copyrights in the OpenSolaris source code.
Comparing OpenSolaris to Other Operating Systems
So how does OpenSolaris compare to other open source and proprietary operating systems? Let's take a look.
OpenSolaris and Solaris
OpenSolaris is an open source code base, community, and distribution. Solaris is a proprietary product from Sun Microsystems. The two are not synonymous, but they are intertwined. First of all, OpenSolaris was seeded from the Solaris code base around the time of Solaris 10. However, the OpenSolaris code base has subsequently diverged from the Solaris 10 code base, so the latest update of Solaris 10 is significantly different from OpenSolaris.
Note
Solaris is a product from Sun, whereas OpenSolaris is an open source code base, community, and distribution.
Confusingly, Sun does release a distribution of OpenSolaris called OpenSolaris. This distribution is not the same as the Solaris 10 product. For one thing, unlike Solaris 10, the OpenSolaris distribution is available free of charge and is fully redistributable. This book focuses primarily on the OpenSolaris distribution.
Cross-Ref
The OpenSolaris distribution and other distributions are described in Chapter 2.
In the future, Sun will likely release a version of the Solaris product with long-term support that is based on a more recent OpenSolaris snapshot. This model will be similar to the way Red Hat Enterprise Linux is based on the open source Fedora code base.
OpenSolaris and Linux
Linux and OpenSolaris are both open source UNIX-like operating systems. They can support identical user interfaces, such as GNOME, run many identical applications, such as Apache, MySQL, Mozilla Firefox, and OpenOffice, and support identical tools such as the GNU compiler tools, Java, Perl, Python, Ruby, and others. But the two operating systems have significant differences in their histories, licensing, distribution models, and underlying implementations.
History
Although UNIX-like, the Linux source code is not descended from the original AT&T or BSD UNIX code. Linus Torvalds and others created it independently in the early 1990s. Because Linux is not based on the original AT&T UNIX, BSD, SVR4, or any other form of UNIX, it does not have any kernel code in common with OpenSolaris. Linux was open source from the beginning, and was developed following a community development model.
Conversely, OpenSolaris was open sourced in whole based on the mature Solaris operating system, which was developed in large part in a proprietary development model. Partly because of this history, Linux has a much larger development community than does OpenSolaris. Linux also has many more distributions, from several different vendors.
Licensing
The Linux kernel uses the GNU General Public License version 2 (GPLv2), which is incompatible with the CDDL used by OpenSolaris because of the GPL's viral nature, as described earlier in this chapter. Thus, code cannot be ported between the OpenSolaris kernel and the Linux kernel. However, both OpenSolaris and Linux can run userland programs distributed under the GPL and other licenses, which is why they can appear to be quite similar.
Distributions
The Linux kernel, user applications, tools, and libraries are developed separately and then packaged together into distributions, which some in the free software community refer to as GNU/Linux because of the combination of the GNU tools and the Linux kernel. Some of the well-known distributions include Ubuntu, Red Hat Enterprise Linux, SUSE Linux, and Debian GNU/Linux.
OpenSolaris is more of a monolithic model, in which many of the userland tools, libraries, and applications are part of OpenSolaris itself. However, OpenSolaris distributions also use a significant amount of third-party open source software such as GNOME, Firefox, OpenOffice, and more.
Technical Differences
Some of the most apparent differences between Linux and OpenSolaris derive from the fact that OpenSolaris is a variant of UNIX System V Release 4, while Linux is not. One of the most noticeable results of Linux not being based on SVR4 is that it doesn't use SVR4 packaging. Linux packaging varies between distributions, but lately it has tended toward a model whereby packages can be easily downloaded and installed dynamically from a network package repository. Interestingly, OpenSolaris has recently introduced a more Linux-like packaging approach called the Image Packaging System (IPS).
Note
OpenSolaris contains many of the same GNU tools found on Linux. Historically, these were in \usr\gnu\bin\ and \usr\sfw\bin\, but are moving to \usr\bin\ when possible. Because of conflicts, some commands are still in \usr\gnu\bin\ and \usr\sfw\bin\.
Additionally, the Linux and OpenSolaris kernels differ significantly in the areas of scheduling, virtual memory, file systems, and others. For more details, consult one of the references listed in the “Resources” section at the end of this chapter.
OpenSolaris and BSD
Because OpenSolaris is based on Solaris, which is based in part on BSD, OpenSolaris and BSD have significant similarities in their code. The main differences are threefold. First, BSD has been developed in the open, like Linux, and so has diverged substantially from Solaris. Interestingly, the BSD community has split into three main camps such that there are now three different BSD-based operating systems: OpenBSD, NetBSD, and FreeBSD.
Second, BSD is not based on SVR4. In fact, OpenSolaris is the only open source UNIX System V Release 4–based operating system.
Note
Historically, Solaris contains the SVR4-style tools in \usr\bin, while its BSD-style tools are in \usr\ucb\. However, in OpenSolaris the BSD-style tools are moving to \usr\bin when possible. Because of conflicts, a few tools remain in \usr\ucb\.
Finally, unlike the CDDL used for OpenSolaris and the GPL used for Linux, the BSD license is a non-copyleft license. This lenient license does not force modifications and enhancements to be contributed back to the “commons.”
Interestingly, Mac OS X is a variant of UNIX based on the Mach operating system, which itself is based on BSD. However, Mac OS contains a distinctive Macintosh user interface, hiding the details of the underlying UNIX operating system from most of its users. Apple has ported some OpenSolaris features, such as DTrace and ZFS to Mac OS X, and has released the source code of the core operating system as the Darwin Open Source Project.
Getting Involved in OpenSolaris
As you read this book and use OpenSolaris, we encourage you to become involved in the OpenSolaris community. There are a number of ways to do so, from trying out a distribution to contributing code. A good starting point is http://opensolaris.org/os/participate.
Running OpenSolaris
The best way to get started with the OpenSolaris community is to actually try out OpenSolaris. In fact, playing with OpenSolaris simultaneously with reading this book will significantly enhance your learning experience.
Note
The OpenSolaris distribution from Sun, related documentation, and user help forums are available from http://opensolaris.com. Chapter 2 contains more information about the OpenSolaris distribution from Sun as well as other distributions available.
While using OpenSolaris, you can enhance your community involvement in two ways. First, if you encounter a problem, ask questions on the community discussion lists and forums. Several relevant discussion lists are introduced in the next section. Second, if you find a bug, report it at http://defect.opensolaris.org (for problems with the OpenSolaris distribution from Sun) or http://bugs.opensolaris.org (for other issues) so that it can be tracked and fixed. You can also request enhancements.
Participating in Discussion Lists
The OpenSolaris communities feature a plethora of forums and mailing lists on a variety of topics. www.opensolaris.com contains user-oriented forums on the OpenSolaris distribution from Sun, while www.opensolaris.org contains developer-oriented mailing lists. If you're just searching for a particular piece of information, you can read the list archives online. However, to begin to get a feel for the OpenSolaris communities and the day-to-day issues and questions, consider subscribing to the mailing lists to receive e-mails directly. Some useful lists include the following:
[email protected]—This list is a great resource for general questions about “getting, building, and installing OpenSolaris.”[email protected]—This is a moderated list for general community announcements. It's useful for keeping track of the major OpenSolaris [email protected]—The public mailing list for the OpenSolaris Governing Board. Although theoretically for “governance” issues, the list seems to be a catch-all for any sort of controversy in the community, and is therefore a good way to track current “hot” [email protected]—The mailing list for the Advocacy community. This is useful to understand what sort of outreach and marketing efforts are going on for OpenSolaris.Tip
Many new community members are tempted to subscribe to opensolaris–[email protected]. We do not recommend that list because it's high-traffic without much useful content.
Additionally, you can subscribe to more focused lists in your areas of interest. For example, if you are interested in Sun's OpenSolaris distribution, subscribe to [email protected]. If you are interested in high-availability clusters, subscribe to [email protected]. If you are interested in DTrace, subscribe to [email protected].
Caution
You may have heard the phrase, “There are no stupid questions.” That's not entirely true in the OpenSolaris community. As in many online technical communities, some people have little patience for redundant, off-topic, or trivial questions. To avoid possible embarrassment, search this book, the mailing list archives, relevant FAQs, and other resources before asking anything on the discussion lists.
Finding OpenSolaris user Groups
OpenSolaris user groups connect people in similar geographic areas for face-to-face meetings, from Adelaide, Australia, to New York City to Warangal, India. They are a good way to meet other OpenSolaris users and enthusiasts, and to learn more about cutting-edge topics. If you live in a large metropolitan area, chances are good that you can find an OpenSolaris user group in your area.
Each user group is independently run, so check out the individual group for mailing lists, upcoming meetings, and other resources. The complete list can be found at http://opensolaris.org/os/community/advocacy/usergroups/ug-leaders.
If there is no OpenSolaris user group in your area, consider starting one! You can find instructions for doing so at http://opensolaris.org/os/community/advocacy/usergroups.
Contributing to OpenSolaris
The best way to increase your involvement in the OpenSolaris community is to start participating in relevant development discussions. These usually occur on mailing lists at opensolaris.org. You can find a complete list of mailing lists at http://opensolaris.org/os/discussions.
If you're interested in contributing code or other tangibles to the OpenSolaris community effort, consult the instructions at http://opensolaris.org/os/communities/participation for the current process.
OpenSolaris Development Process
Although you may not be interested in contributing code to OpenSolaris, it can be interesting and useful to understand how the operating system is developed. Before delving into the process, it helps to understand the OpenSolaris source-code layout. The OpenSolaris code base is divided into major areas, called consolidations, each of which has its own source-code repository. The core OpenSolaris consolidation is Operating System/Networking (ON), which contains the operating system kernel, userland libraries, and tools. Other consolidations include Developer Product Tools (Dev Pro), Documentation (Docs), and Globalization Support (G11N). You'll find a list of consolidations at http://opensolaris.org/os/downloads.
Note
Unlike some open source projects, OpenSolaris does not have a notion of “committers” or a select group of people who are permitted to integrate code. Anyone can integrate code into OpenSolaris as long as they follow the process and have submitted a signed Sun Contributor Agreement. See http://sun.com/software/opensource/contributor_agreement.jsp for details.
OpenSolaris allows two different paths for source code development, depending on whether the code is destined for an official consolidation such as ON.
If the code is not destined for an official consolidation, then no standard development process must be followed. Anyone can start an OpenSolaris project and create a code repository or post code as a tarball on the project page.
However, code developed in that way will not become part of the OpenSolaris code base. If you want your code to become part of the OpenSolaris code base, you must follow a rigorous development process to integrate it into a consolidation. This process evolved from the internal process that Sun Microsystems required for integration into Solaris. Although it varies by repository, the process generally includes the following:
Initiation— Propose a project.Architecture Review— The architecture is generally reviewed by an Architecture Review Committee (ARC). Projects destined for ON are mostly reviewed by the Platform Software Architecture Review Committee (PSARC), projects destined for Open HA Cluster are reviewed by the Cluster Architecture Review Committee (CLARC), and projects destined for the desktop area are generally reviewed by the Layered Software Architecture Review Committee (LSARC). See the Architecture Processes and Tools Community Group at http://opensolaris.org/os/community/arc for more information.Design— Prepare written documentation about the code design of your project.Development— Write, test, and debug the code.Code reviews— Each area has different requirements regarding the number of code reviewers, but a good rule of thumb is to obtain reviews from at least two people, at least one of whom is a known expert in that area.Integration Approval— Every project must be approved for integration by the C-Team. Currently, the C-Team is Sun-internal only, but it is moving to become more open.File Request to Integrate (RTI)— This is the formal mechanism for obtaining the final integration approval.IntegrateAs you can see, this process is not for the fainthearted; but it's the price to pay to keep OpenSolaris at the same level of quality as the Solaris product on which it was based, and it's not too extreme compared with the process in other open source projects. For example, the Linux kernel contribution process, although different in style, is similarly rigorous.
Note
Various parts of the development process moved from Sun internal to OpenSolaris at different times. To allow external contributions before the source code repository offered direct-commit access from outside Sun, OpenSolaris used a request/sponsor model in which a Sun employee sponsored an external contributor.
