天天看點

UNIX/Linux 系統管理技術手冊閱讀(六)

2016.8.19 17:20-17:50

  HP-UX is based on System V and is tied to Hewlett-Packard’s hardware platforms. It’s closer to the ancestral source tree than either Solaris or AIX, but HP has kept pace with developments in the OS world and has added a variety of its own enhancements. Now that HP has begun supporting Linux as well, the future of HPUX is somewhat less clear.

  HP-UX基于System V,并且隻用于HP公司的硬體平台。在UNIX族譜上它比Solaris和AIX離源頭更近,但是HP一直緊跟作業系統界的發展腳步,給HP-UX加入了各種各樣的增強功能。現在HP也開始支援Linux了,HP-UX的未來有點兒不太清晰。

  IBM’s AIX started as a variant of Berkeley’s 4.2BSD, but as of version 4 in 1994, most parts of the system migrated to System V. At this point, AIX has drifted rather far from both origins.

  IBM的AIX一開始是伯克利4.2BSD的一種變體,但是到1994年的第4版,這個作業系統的大部分都遷移到了System V上面。現在AIX和前面兩種源頭系統的距離都已經相當遙遠了。

  In general, we have the impression that AIX has enjoyed less cross-pollination from other systems than most UNIX variants. It also seems to have fallen under the Svengali-like influence of some of IBM’s mainframe and AS/400 operating systems, from which it inherits conventions such as the Object Data Manager (see page 432), the use of configuration commands rather than configuration files, and the SMIT administrative interface. Over time, one might charitably say, it has grown to be more and more like itself.

  一般而言,我們對AIX的印象是,比起大多數UNIX變體來說,AIX和其他系統的交流很少。AIX也似乎受到了IBM的大型機和AS/400作業系統某些不好的影響,變得有點強人所難,它從後者那裡繼承了像ODM、使用配置指令而不是配置檔案,以及SMIT管理界面等這樣的傳統。随着時間的推移,人們或許會厚道地說,AIX已經變得越來越像它自己了。

  IBM has been pursuing an interestingly OS-agnostic approach to marketing its hardware for most of the last decade. IBM continues to develop and promote AIX, but it’s also engaged in partnerships with Red Hat and Novell to ensure that their respective Linux distributions run smoothly on IBM hardware. It will be interesting to see how this approach plays out in the years ahead.

  在過去10年中的大多數時間裡,IBM為營銷自己的硬體裝置,對作業系統選擇一直力求保持一種不明朗的态度,這點顯得很有意思。IBM繼續開發和推廣AIX,但是它也同Red Hat和Novell形成夥伴關系,確定這兩家的Linux發行版本能夠順利地運作在IBM的硬體上。靜觀這樣做法在未來幾年會帶來怎樣的效果也挺有意思的。

1.6 SYSTEM-SPECIFIC ADMINISTRATION TOOLS

  Modern systems include a variety of visually oriented tools and control panels (such as SUSE’s YaST2 and IBM’s SMIT) that help you configure or administer selected aspects of the system. These tools are useful, especially for novice administrators, but they also tend to be relatively incomplete reflections of the underlying software. They make many administrative tasks easier, but most fall short of being authoritative.

1.6 特定于系統的管理工具

  在現代的作業系統内,包含有各種各樣可視化的工具和控制台(比如SUSE的YaST2和IBM的SMIT),幫助使用者配置或者管理標明的系統功能。這些工具非常有用,特别是對于管理者新手來說更是如此,但是它們也傾向于不能完整地展現下層軟體的實際操作。它們讓管理工作變得容易,但大多數又變得不那麼權威。

  In this book, we cover the underlying mechanisms that the visual tools manipulate rather than the tools themselves, for several reasons. For one, the visual tools tend to be proprietary (or at least, system-specific). They introduce variation into processes that may actually be quite consistent among systems at a lower level. Second, we believe that it’s important for administrators to have an accurate understanding of how their systems work. When the system breaks, the visual tools are often not helpful in tracking down and fixing problems. Finally, manual configuration is often faster, more flexible, more reliable, and easier to script.

  在本書中,出于下面幾個原因,我們要介紹可視化工具調用的底層機制,而不是工具本身。第一可視化工具趨于專有化(或者至少是趨于為系統所特有)。它們給配置過程帶來了變數,而在各個系統之間,這些過程在較低層面實際上可能是相當一緻的。第二,我們相信,對于系統管理者來說,準确了解他們的系統是如何工作,這點非常重要。當系統發生故障的時候,可視化工具通常對于确定并修正問題來說沒有什麼幫助。最後,手工配置往往更好、更快、更靈活、更可靠,而且更易于用腳本實作。

2016.8.21 9:00-9:30

1.7-1.8略

1.9 MAN PAGES AND OTHER ON-LINE DOCUMENTATION

1.9 手冊頁和其他聯機文檔

The manual pages, usually called “man pages” because they are read with the man

command, constitute the traditional “on-line” documentation. (Of course, these

days all the documentation is on-line in some form or another.) Man pages are

typically installed with the system. Program-specific man pages come along for

the ride when you install new software packages.

  手冊頁通常稱為“man手冊頁”,因為要用man指令來閱讀,它構成了傳統的“聯機”文檔(當然,現如今所有的文檔都以這樣或者那樣的形式線上存在。)man手冊頁一般伴随系統一起安裝。針對特定程式的man手冊頁通常随着安裝新軟體包一起安裝。

Man pages are concise descriptions of individual commands, drivers, file formats,

or library routines. They do not address more general topics such as “How do I

install a new device?” or “Why is this system so damn slow?” For those questions,

consult your vendor’s administration guides (see page 18) or, for Linux systems,

the documents available from the Linux Documentation Project.

  man手冊頁對單條指令、驅動程式、檔案格式或者庫例程給出簡潔的說明。它們不會解釋諸如“我該怎樣安裝一個新裝置?”或者“為什麼我們的系統這麼慢?”這樣更普通的話題。對于這些問題來說,使用者可以參考廠商提供的系統管理指南,對于Linux系統來說,也可以從“Linux建檔項目(Linux Documentation Project)”中獲得文檔。

1.9.1 Organization of the man pages

1.9.1 手冊頁的組織

All systems divide the man pages into sections, but there are minor variations in

the way some sections are defined. The basic schema used by our example systems is shown in Table 1.3.

  所有的系統都把man手冊分成若幹節,但是在各個節的規定上面,不同系統間略有差別。我們的示例系統所采用的基本結果如表1.3所示。

Some sections may be further subdivided. For example, Solaris’s section 3c contains man pages about the system’s standard C library. There is also considerable

variation in the exact distribution of pages; some systems leave section 8 empty

and lump the system administration commands into section 1. A lot of systems

have discontinued games and demos, leaving nothing in section 6. Many systems

have a section of the manuals called “l” (lowercase L) for local man pages.

  手冊頁中有些節會做進一步細分。例如,Solaris的第3c節包含了有關系統C标準庫的手冊頁;有些系統的第8節沒有内容,而把系統管理指令放到第1節。許多系統撤銷了遊戲和示範,第6節什麼内容都沒有。很多系統在手冊中都有一個稱為l(L的小寫)的節,用于本地手冊頁。

The exact structure of the sections isn’t important for most topics because man

finds the appropriate page wherever it is stored. You only need to be aware of the

section definitions when a topic with the same name appears in multiple sections.

For example, passwd is both a command and a configuration file, so it has entries

in both section 1 and section 4 or 5.

  對于大多數主題而言,各節的确切結構并不重要,因為隻要有比對的手冊頁,man指令就會找到它。使用者隻需要對出現在不同節内同名的主題,知道各節的規定就行了。例如,passwd即是一條指令,也是一個配置檔案,是以在第一節和第4節或第5節都有關于它的手冊項。

1.9.2 man: read man pages

1.9.2 man:讀取手冊頁

man title formats a specific manual page and sends it to your terminal through

more, less, or whatever program is specified in your PAGER environment variable. title is usually a command, device, filename, or name of a library routine.

The sections of the manual are searched in roughly numeric order, although sections that describe commands (sections 1, 8, and 6) are usually searched first.

  mantitle指令格式化特定的手冊頁并通過more、lessw玲,或者在PAGER環境變量中指定的任何程式把手冊頁發送到使用者終端。title通常是一個指令、裝置、檔案名或者庫例程名。手冊中各節大緻是按照數字順序進行搜尋的,不過通常首先搜尋描述指令的那些節(第1、8和6節)。

The form man section title gets you a man page from a particular section. Thus, on most systems, man sync gets you the man page for the sync command, and man 2 sync gets you the man page for the sync system call.

  指令格式mansection title可讓使用者從某個特定的節擷取手冊頁。于是在大多數系統上,man sync指令可得到sync指令的手冊頁,man 2sync指令可得到系統調用sync的手冊頁。

  Under Solaris, you must preface the section number with the -s flag, for example,

man -s 2 sync.

  在Solaris上,必須在節号前面加上-s标志;例如,man -s 2 sync。

man -k keyword or apropos keyword prints a list of man pages that have keyword

in their one-line synopses. For example:

$ man -k translate

objcopy (1)        - copy and translate object files

dcgettext (3)      - translate message

tr (1)             - translate or delete characters

snmptranslate (1)  - translate SNMP OID values into more useful information

tr (1p)            - translate characters

  man -k keyword或者aproposkeyword輸出一份手冊頁清單,在其單行概要中有keyword。例如:

      本文轉自cix123  51CTO部落格,原文連結:http://blog.51cto.com/zhaodongwei/1840387,如需轉載請自行聯系原作者

繼續閱讀