سالها قبل کار سختی بر دوش ادمینهای سولاریس بود و آن پچ‌کردن سیستمها بود! پچ‌کردن ساعت‌ها سیستم را داون می‌کرد و آماده‌سازی برنامه بک‌اوت حتی از این هم بیشتر طول می‌کشید. اغلب به سیستمهای لینوکسی نگاه می‌کردیم و اینکه چه راحت می‌توانستیم آنها را پچ کنیم حسرت میخوردیم. اما در سولاریس ۱۱ اوراکل زندگی را برایمان آسان کرد. حالا پچ‌کردن حتی از لینوکس هم بهتر شده است. با سیستم پچ‌کردن جدید نه تنها می‌توان سیستم را با یک ری‌بوت ساده پچ کرد، بلکه برنامه بک‌آوت هم جزئی از سیستم عامل شده است. به همین خاطر برگشتن به حالت قبلی سیستم هم درست به اندازه‌ی ری‌بوت ساده است!‌ این ابزار جدید هوشمند هم هست و دیگر لازم نیست ساعت‌ها صرف نصب آپدیت برای کامپوننت‌هایی کنیم که در سیستم نیستند. و بهتر از همه اینکه همه‌ی اینها در سیستم‌عامل جاسازی شده‌اند و توسط اوراکل پشتیبانی می‌شوند. هیچ نیازی به ابزارهای پشتیبانی نشده نیست.

 

اول از همه پیش از آغاز پچ‌کردن از سیستم عامل بک‌آپ می‌گیریم. مدیریت محیط بوت با beadm command جدید ساده است. فقط باید محض احتیاط از سیستم عامل در حال اجرا بک‌آپ بگیریم.

از beadm command برای ساختن BE جدید به نام demo1 استفاده می‌کنیم.

root@Solaris112:~# beadm create demo1

حالا می‌بینید که ما محیط نصبی به نام سولاریس و محیط جدیدی به نام demo1 داریم. نشان R بیانگر فعال بودن سیستم مورد نظر است و نشان N بیانگر این نکته است که سیستم با ری‌بوت بعدی به کار گرفته خواهد شد.

root@Solaris112:~# beadm list

BE Active Mountpoint Space Policy Created
— —— ———- —– —— ——-
demo1 – – 70.0K static 2014-10-08 22:28
solaris NR / 3.33G static 2014-07-04 19:57

root@Solaris112:~#

سیستم‌های سولاریس به طور پیش‌فرض به ریپازیتوری عمومی پچ متصل هستند و می‌توان آن‌ها را با توجه به این ریپازیتوری پچ کرد. بروزرسانی سیستم ساده است و تنها به یک دستور احتیاج دارد. pkg update تمام بسته‌های ریپازیتوری را مادامی که سرور می‌تواند به سیستم عمومی اوراکل دسترسی داشته باشد، بروزرسانی می‌کند. همچنین می‌توانید یک سیستم داخلی ایجاد کرده و یا به ریپازیتوری خصوصی‌ای متصل شوید که شامل نرم‌افزارهای اضافی و سطوح پچ جاری بیشتری می‌شود. Pkg همچنین به صورت خودکار یک BE جدید ایجاد می‌کند.

حالا بیایید پچ کردن را شروع کنیم. به یاد داشته باشید که در اولین برخوردتان با ریپازیتوری عمومی می‌بایست لیسانس اوتی‌ان را قبول کنید. این کار را می‌توان با اضافه کردن –accept در دستور pkg انجام داد.

“pkg update –accept”

root@Solaris112:~# pkg  update --accept

در اولین بار، تمام legalize را از اوتی‌ان خواهید گرفت.

------------------------------------------------------------

Package: pkg://solaris/consolidation/osnet/osnet-incorporation@0.5.11,5.11-0.175.2.0.0.42.2:20140624T183842Z
License: lic_OTN

Oracle Technology Network Developer License Terms
Oracle Solaris, Oracle Solaris Cluster and Oracle Solaris Express

Export Controls Export laws and regulations of the United States and any other relevant
local export laws and regulations apply to the Programs. You agree
that such export control laws govern your use of the Programs
(including technical data) and any services deliverables provided under
this agreement, and you agree to comply with all such export laws and
regulations (including "deemed export" and "deemed re-export"
regulations). You agree that no data, information, program and/or
materials resulting from services (or direct product thereof) will be
exported, directly or indirectly, in violation of these laws, or will
be used for any purpose prohibited by these laws including, without
limitation, nuclear, chemical, or biological weapons proliferation, or
development of missile technology.

Accordingly, you confirm:

- You will not download, provide, make available or otherwise
export or re-export the Programs, directly or indirectly, to
countries prohibited by applicable laws and regulations nor to
citizens, nationals or residents of those countries.

- You are not listed on the United States Department of Treasury
lists of Specially Designated Nationals and Blocked Persons,
Specially Designated Terrorists, and Specially Designated
Narcotic Traffickers, nor are you listed on the United States
Department of Commerce Table of Denial Orders.

- You will not download or otherwise export or re-export the
Programs, directly or indirectly, to persons on the above
mentioned lists.

- You will not use the Program for, and will not allow the
Program to be used for, any purposes prohibited by applicable
law, including, without limitation, for the development, design,
manufacture or production of nuclear, chemical or biological
weapons of mass destruction.

Oracle Employees: Under no circumstances are Oracle Employees
authorized to download software for the purpose of distributing it to
customers. Oracle products are available to employees for internal use
or demonstration purposes only. In keeping with Oracle's trade
compliance obligations under U.S. and applicable multilateral law,
failure to comply with this policy could result in disciplinary action
up to and including termination.

PLEASE READ THE FOLLOWING LICENSE AGREEMENT TERMS AND CONDITIONS
CAREFULLY BEFORE DOWNLOADING, INSTALLING OR USING THE PROGRAMS. THESE
TERMS AND CONDITIONS CONSTITUTE A LEGAL AGREEMENT BETWEEN YOU AND
ORACLE.

Oracle Technology Network Development License Agreement

"We," "us", and "our" refers to Oracle America, Inc., for and on
behalf of itself and its subsidiaries and affiliates under common
control. "You" and "your" refers to the individual or entity that
wishes to use the Programs. "Programs" refers to Oracle Solaris,
Oracle Solaris Cluster and/or Oracle Solaris Express that you download
from this site (including, any updates and/or additional software
packages that you may receive in the future from the product's package
repository) and related program documentation. "License" refers to
your right to use the Programs under the terms of this agreement. This
agreement is governed by California law, except for that body of laws
related to the conflict of laws. You agree to submit to the exclusive
jurisdiction of, and venue in, the courts of San Francisco or Santa
Clara counties in California in any dispute arising out of or relating
to this agreement.
In order to use the Programs, You must first agree to this License
Agreement by selecting the "Accept License Agreement" button (or its
equivalent) below. If You do not or cannot agree to this License
Agreement, You are not permitted to download or use the Programs.

LICENSE RIGHTS
Except for any included software package or file that is licensed to
you by Oracle under different license terms, we grant you a perpetual
(unless terminated as provided in this agreement), nonexclusive,
nontransferable, limited License to use the Programs only for the
purpose of developing, testing, prototyping and demonstrating your
applications, and not for any other purpose. If You are an educational
institution vested with the power to confer official high school,
associate, bachelor, master and/or doctorate degrees, or local
equivalent, ("Degree(s)"), You may also use the Programs as part of
Your educational curriculum for students enrolled in Your Degree
program(s) solely as required for the conferral of such Degree
(collectively "Educational Use").
All rights not expressly granted above are hereby reserved. If you want
to use the Programs for any purpose other than as permitted under this
agreement, including but not limited to distribution of the Programs or
any use of the Programs for your internal business purposes (other than
developing, testing, prototyping and demonstrating your applications)
or for any commercial production purposes, you must obtain a valid
license permitting such use. We may audit your use of the Programs.
Program documentation, if available, may be accessed online at
http://www.oracle.com/technetwork/indexes/documentation/index.html.

Included Java SE Components

The Programs may include or be distributed with certain separately
licensed components that are part of Java SE ("Java SE"). Java SE
and all components associated with it are licensed to you under the
terms of the Oracle Binary Code License Agreement for the Java SE
Platform Products, and not under this agreement. A copy the Oracle
Binary Code License Agreement for the Java SE Platform Products can be
found at:
http://www.oracle.com/technetwork/java/javase/terms/license/index.html

Third-Party Technology
The Programs may contain or be distributed with certain third-party
technology. Oracle may provide certain notices related to such
third-party technology in the program documentation, or in readme or
notice files provided with the Programs.

Third party technology will be licensed to you either under the terms
of this agreement, or, if specified in the program documentation,
readme files or otherwise in writing, under separate license terms
("Separate Terms") and not under the terms of this agreement
("Separately Licensed Third Party Technology"). Licensee's rights to
use such Separately Licensed Third Party Technology under the Separate
Terms are not restricted or modified in any way by this Agreement.

Information Collection and Registration

Configuration Data and Registration: The Programs may communicate
configuration data to Oracle. You can register your version of the
Programs to capture this data for your use, or the data is sent
anonymously. For information about what configuration data is
communicated and how to control this facility, refer to the release
notes or http://www.oracle.com/goto/solarisautoreg.

Ownership and Restrictions

We retain all ownership and intellectual property rights in the
Programs. The Programs may be installed on three computers only, and
used Your employees or agents in the hardware environment identified by
us. You may make one copy of the Programs for backup purposes.

You may not:

- use the Programs for your own internal business purposes (other
than developing, testing, prototyping and demonstrating your
applications) or for any commercial or production purposes;

- remove or modify any program markings or any notice of our
proprietary rights;

- make the Programs available in any manner to any third party;

- use the Programs to provide third-party training, except as
expressly permitted in this agreement for Educational Use;

- assign this agreement or give or transfer the Programs or an
interest in them to another individual or entity;

- cause or permit reverse engineering (unless required by law for
interoperability), disassembly or decompilation of the Programs;

- disclose results of any benchmark test results related to the
Programs without our prior consent.

Export

You agree that U.S. export control laws and other applicable export and
import laws govern your use of the Programs, including technical data;
additional information can be found on Oracle's Global Trade Compliance
web site located at:

http://www.oracle.com/products/export/index.html?content.html. You
agree that neither the Programs nor any direct product thereof will be
exported, directly, or indirectly, in violation of these laws, or will
be used for any purpose prohibited by these laws including, without
limitation, nuclear, chemical, or biological weapons proliferation.
Disclaimer of Warranty and Exclusive Remedies
THE PROGRAMS ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. WE
FURTHER DISCLAIM ALL WARRANTIES, EXPRESS AND IMPLIED, INCLUDING WITHOUT
LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE OR NONINFRINGEMENT.

IN NO EVENT SHALL WE BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL,
PUNITIVE OR CONSEQUENTIAL DAMAGES, OR DAMAGES FOR LOSS OF PROFITS,
REVENUE, DATA OR DATA USE, INCURRED BY YOU OR ANY THIRD PARTY, WHETHER
IN AN ACTION IN CONTRACT OR TORT, EVEN IF WE HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES. OUR ENTIRE LIABILITY FOR DAMAGES HEREUNDER
SHALL IN NO EVENT EXCEED ONE THOUSAND DOLLARS (U.S. $1,000).

Additional Trial Programs

We may include additional trial programs with your download of the
Programs licensed under this agreement. You will have 30 days from the
delivery date to evaluate these additional trial programs. Any use of
these trial programs after the 30-day trial period requires you to
obtain the applicable license. Any additional trial programs are
provided "as is" and we do not provide technical support or any
warranties for these programs.

No Technical Support

Our technical support organization will not provide technical support,
phone support, or updates to you for the Programs licensed under this
agreement.

End of Agreement

You may terminate this agreement by destroying all copies of the
Programs. We have the right to terminate your right to use the Programs
if you fail to comply with any of the terms of this agreement, in which
case you shall destroy all copies of the Programs.
Relationship Between the Parties
The relationship between you and us is that of licensee/licensor.
Neither party will represent that it has any authority to assume or
create any obligation, express or implied, on behalf of the other
party, nor to represent the other party as agent, employee, franchisee,
or in any other capacity. Nothing in this agreement shall be construed
to limit either party's right to independently develop or distribute
software that is functionally similar to the other party's products, so
long as proprietary information of the other party is not included in
such software.

Open Source Software

"Open Source" software - software available without charge for use,
modification and distribution - is often licensed under terms that
require the user to make the user's modifications to the Open Source
software or any software that the user 'combines' with the Open
Source software freely available in source code form. If you use Open
Source software in conjunction with the Programs (or if you plan on
licensing your own application under an Open Source license), you must
ensure that your use does not: (i) create, or purport to create,
obligations with respect to the Oracle Programs; or (ii) grant, or
purport to grant, to any third party any rights to or immunities under
our intellectual property or proprietary rights in the Oracle Programs.
For example, you may not develop a software program using an Oracle
program and an Open Source program where such use results in a program
file(s) that contains code from both the Oracle program and the Open
Source program (including without limitation libraries) if the Open
Source program is licensed under a license that requires any
"modifications" be made freely available. You also may not combine the
Oracle program with programs licensed under the GNU General Public
License ("GPL") in any manner that could cause, or could be interpreted
or asserted to cause, the Oracle program or any modifications thereto
to become subject to the terms of the GPL.

Entire Agreement
You agree that this agreement is the complete agreement for the
Programs and licenses, and this agreement supersedes all prior or
contemporaneous agreements or representations. Any other license terms
that may be included in or with the Program shall not apply. If any
term of this agreement is found to be invalid or unenforceable, the
remaining provisions will remain effective.

Last updated: 12 May 2014
Should you have any questions concerning this License Agreement, or if
you desire to contact Oracle for any reason, please write:

Oracle America, Inc.
500 Oracle Parkway,
Redwood City, CA 94065

Oracle may contact you to ask if you had a satisfactory experience
installing and using this OTN software download.

پس از تمام شدن این بخش، خلاصه‌ای از بسته ها و فایلهای بروزرسانی‌ شده به شما ارائه می‌شود. در این مورد من سولاریس ۱۱.۲ بتا را به سولاریس ۱۱.۲ پچ کردم، و از همین رو بروزرسانی‌های خوبی در کار بودند.

Packages to remove: 1
Packages to update: 535
Create boot environment: Yes
Create backup boot environment: No

DOWNLOAD PKGS FILES XFER (MB) SPEED
Completed 536/536 9333/9333 237.4/237.4 481k/s

PHASE ITEMS
Removing old actions 3719/3719
Installing new actions 4339/4339
Updating modified actions 15017/15017
Updating package state database Done
Updating package cache 536/536
Updating image state Done
Creating fast lookup database Done
Updating package cache 1/1

همچنین مشاهده می‌کنیم که ابزار  pkg یک BE جدید ساخته است.

A clone of solaris exists and has been updated and activated.
On the next boot the Boot Environment solaris-1 will be
mounted on '/'. Reboot when ready to switch to this updated BE.
Updating package cache 1/1

---------------------------------------------------------------------------
NOTE: Please review release notes posted at:
http://www.oracle.com/pls/topic/lookup?ctx=E26502&id=SERNS
---------------------------------------------------------------------------

ما می‌توانیم از "beadm list" استفاده کنیم و محیط جدید را ببینیم. در راه اندازی آتی "solaris-1" خواهد شد و از آن استفاده می‌شود.

root@Solaris112:~# beadm list
BE Active Mountpoint Space Policy Created
-- ------ ---------- ----- ------ -------
demo1 - - 70.0K static 2014-10-08 22:28
solaris N / 7.24M static 2014-07-04 19:57
solaris-1 R - 5.23G static 2014-10-08 22:51

همچنین با استفاده از دستور pkg می‌توان نسخه کنونی کرنل را هم مشاهده کرد و به سراغ عرضه‌ی آن رفت و شماره‌ی نسخه‌ی آن را به طور دقیق فهمید.

root@Solaris112:~# pkg info kernel
Name: system/kernel
Summary: Core Kernel
Description: Core operating system kernel, device drivers and other modules.
Category: System/Core
State: Installed
Publisher: solaris
Version: 0.5.11
Build Release: 5.11

Branch: 0.175.2.0.0.37.1
Packaging Date: April 23, 2014 05:15:55 PM
Size: 33.60 MB
FMRI: pkg://solaris/system/kernel@0.5.11,5.11-0.175.2.0.0.37.1:20140423T171555Z
root@Solaris112:~#

حالا بیایید ری‌بوت کنیم.

root@Solaris112:~# reboot

پس از بک‌آپ گرفتنت یکبار دیگر شماره‌ی نسخه را چک می‌کنیم:

root@Solaris112:~# pkg info kernel
Name: system/kernel
Summary: Core Kernel
Description: Core operating system kernel, device drivers and other modules.
Category: System/Core
State: Installed
Publisher: solaris
Version: 0.5.11
Build Release: 5.11
Branch: 0.175.2.0.0.42.2

Packaging Date: June 24, 2014 06:55:42 PM
Size: 33.62 MB
FMRI: pkg://solaris/system/kernel@0.5.11,5.11-0.175.2.0.0.42.2:20140624T185542Z

می‌بینید که به عرضه‌ی جدیدی از محصول کوچ کرده‌ایم. برای اعمال تمام پچ‌ها تنها به یک ری‌بوت احتیاج داریم.

حالا بیایید نگاهی به beadm بیندازیم.

root@Solaris112:~# beadm list
BE Active Mountpoint Space Policy Created
-- ------ ---------- ----- ------ -------
demo1 - - 70.0K static 2014-10-08 22:28
solaris - - 10.52M static 2014-07-04 19:57
solaris-1 NR / 5.31G static 2014-10-08 22:51
root@Solaris112:~#

حالا solaris-1 فعال شده و تا زمان بوت بعدی فعال باقی خواهند ماند. اما دست نگه دارید. اگر بخواهیم به نسخه قبلی برگردیم چه اتفاقی می‌افتد؟

می‌توانیم از beadm برای فعال کردن یک محیط دیگر استفاده کنیم و خیلی ساده تنها یک ری‌بوت انجام دهیم. برمی‌گریدم به “solaris” BE.

root@Solaris112:~# beadm activate solaris

حالا بیایید وضعیت beadm را چک کنیم.

broot@Solaris112:~# beadm list
BE Active Mountpoint Space Policy Created
-- ------ ---------- ----- ------ -------
demo1 - - 70.0K static 2014-10-08 22:28
solaris R - 4.23G static 2014-07-04 19:57
solaris-1 N / 1.08G static 2014-10-08 22:51

می‌بینیم که ضمن فعال بودن “solaris” BE، سولاریس پس از ری‌بوت هم در نسخه‌ی کنونی اش باقی می‌ماند. حالا می‌توانیم ری‌بوت کنیم... و حالا برگشته‌ایم به سیستم‌عامل‌مان پیش از پچ! بسیار ساده‌تر از لینوکس. هر سوالی داشتید از طریق بخش تماس با من که پیوندش در بالای صفحه است بپرسید.

منبع