• No results found

System Administration: The Complete Reference

N/A
N/A
Protected

Academic year: 2021

Share "System Administration: The Complete Reference"

Copied!
15
0
0

Loading.... (view fulltext now)

Full text

(1)

ORACLE

Oracle

Press

Oracle Solaris

11

System

Administration:

The

Complete

Reference

Michael

Jang

and

Harry

Foxwell

with Christine

Tran

and Alan

Formy-Duval,

Contributing

Writers

Mc

Graw

Hill

NewYork

Chicago

San Francisco

Lisbon London Madrid Mexico

City

Milan

(2)

Contents

at

a

Glance

1 The Basics of Oracle Solaris 11 I

2

Getting Ready

for Solaris 11 17

3 Installation

Options

'W

4 AlternativeOracle Solaris 11 Installation Methods f>3

5 The Solaris

Graphical Desktop

Environment

6 Service

Management

143

7 The

Image

Packaging

System

(IPS) K' <

8 Solaris at the Command Line 1M7

9

Filesystems

and ZFS 207

10 Customize the Solaris Shells 229

11 Usersand

Groups

249

12 Solaris 11

Security

275

13

System

Performance 295

14 Solaris Visualization 511 15 Print

Management

*45

16 DNS and DHCP ^1

17 Mail Services 5<,y

18 Solaris Trusted Extensions 419

19 The Network File

System

441

20 The FTP and Secure Shell Services 457

(3)

vi

Oracle Solaris 11

System

Administration:The

Complete

Reference

21 Solarisand Samba 481

22

Apache

and the Web Stack 513

A Oracle Solaris 11 11/11

Quick

Command Reference 543

B OracleSolaris 11 11/11 Information

Library

Files 549

(4)

Contents

Foreword xix

Acknowledgments

xxi

Introduction xxiii

1 The Basics of Oracle Solaris 11 I

Welcome to Oracle Solaris 11 •'

So,

Why

Should You Use Oracle Solaris 11? .' A NewName,a NewOwner,a FamiliarOperating System i

Solaris Now "Goesto 11" -t

A Short Review of

Solaris'Long History

!i

The Future of Solaris H

Solaris 11

Licensing

()

Solaris Communities

Solaris11 Documentation M

For Those

Moving

from Solaris 10 toSolaris 11 1 r>

Summary Ir'

Reference Ir'

2

Getting Ready

for Solaris 11 17

Where Solaris 11 Runs: Hardware

Requirements

IB

The

Application

Guarantee

Program

2 1

Testing

Yourx86

System

forSolaris 11

Compatibility

2 I

The Oracle Solaris 11 Live Media 2(>

Running

the Solaris 11 Live Media 27

Preparing

Your x86

System

forSolaris 11 Installation 50

Disk Partitions '

Other Installation Methods i7

Summary

!"

References M

(5)

viii

OracleSolaris 11

System

Administration: The

Complete

Reference

3 Installation

Options

39

Howto Get Solaris 11 40

Downloads 40

Licensing

4^

WritetoDVD 41

Writetoa USB Key 43

A FocusonWorkstations 43

A

Range

of Installation Scenarios 43

New

Systems

43

Linux 44

Microsoft Windows 44

Solaris 10

NotesonVirtualMachines 45

The GUIInteractive Installation 4&

Boot the LiveMedia 47

AnswerBasicQuestions 48

Start the Interactive GUI Installation 48

Basic Parameters 48

Risks 50

Partitionsfor Solaris and More 50 Time Zonesand Locales 52

Users and Hostnames 52

Final

Step

52

MultibootSituations 54

GRUBon Solaris 54

A GRUB

Option

for Windows 56

AGRUB

Option

for Linux 57

Configure

a GRUB Password 58

A

Triple-Boot

Scenario 59

Summary

61

References 61

4 Alternative Oracle Solaris 11 Installation Methods 63

SPARC and x86

Systems

64

Solaris11 on x86 and SPARC

Systems:

What's the Same? 64

Solaris11 on x86and SPARCSystems:What's Different? 64

The Text Install Method 65

The Automated Installer 73

The DistributionConstructor 74

Booting

Client

Systems

from theAlServer 77

Transitioning

from

JumpStart

toAutomated Installer

forSolaris 10 Administrators 78

Configuring

Oracle Solaris 11 79

Unconfiguring

aSolaris 11

System

79

(6)

Contents

ix

Installing

Solarisas aVirtual Machine Guest W

The Oracle Solaris 11 VM for OracleVMVirtualBox H7

OracleVM for SPARC fi(!

Summary

l)t)

References

The Solaris

Graphical Desktop

Environment l> *

The Default Solaris GUI '>•>

A.Fully

Featured

Desktop

Environment <)ri

The UNIX Client Server Model for GUIs <><>

Command-line Access 1,15

The GNOME

Desktop

Environment c)f!

The

Desktop

Pop-up

Menu

Applications

Menu

PlacesMenu ' '(l

Installing

the

OpenOffice.org

Suite llfi

System

Menu ' '''

System

Preferences 'I1'

System

Administration Menu I

Summary

''"

References

Service

Management

!4 i

Solaris Service

Concepts

'

WhatIs aSolaris 11 Service? | :'

Service

Naming

'''''>

Service

Categories

I'1'1

Service States |,,'»

SMF

Programs

I4(»

Listing

Services I'"1

Starting

and

Stopping

Services

Defining

Services ' >~

Service Manifests ' r'~

Creating

aService Manifest Ir>1

BootServices 'r'

BootMilestone Services lr>''

Other SMF Tools I r>'1

inetd Services ' r'fl

Service

Troubleshooting

1 r>'!

Using

the sves Program for Service

Diagnostics

I r>'i

Summary

References 1

The

Image

Packaging System

(IPS)

1 <> '• IPS Basics 1(>'1

IPS

Repositories

''";

(7)

X Oracle Solaris 11

System

Administration: The

Complete

Reference

Installing Application

Software 168

Using

the

pkg

Command 169

Updating Application

Software 170

OtherUseful

pkg

Subcommands 172

Configuring

Local

Repositories

173

Bool Environments 175

Managing

Boot Environments 176

Updating

the

Operating System

Kernel 1 78 The IPS GUI 179

Software Installation and

Update

(Using

the GUI) 179 Boot Environment

Management (Using

theGUI) 182

Summary 185

References 185

8 Solaris at the Command Line 187

Basic Navigation 188

Command Manuals 189

The Current

Working Directory

189

Changing

Directories 189

File Lists 190

The PATH 191

Special

Characters 192

File

Management

193

The Basic touch Command 193

File

Copies

193

Moving

a File 1 94

Deleting

a File 195

File Links 195

Directory Management

196

Reading

Text Files 196

Identifying

File

Types

197

Outputting

Files tothe Screen 197

top

and Bottom File Readers 198

The File

Pagers

198

File

Manipulation

198

Lines, Words, and Characters 199

Finding

Files

Locally

199

SearchWithina File 200

File Redirection and More 201

Options

for File

Editing

201

Thevi Editor 202

One Other Text Editor 204

Summary 205

(8)

Contents

xi

9

Filesystems

and ZFS 207 Disk Structure and

Naming

Conventions 208

Introduction toZFS 211

Some ZFS

Terminology

212

ZFS Commands 2 12

Using

ZFS 215

ZFS as the Root/Boot

Filesystem

220

ZFSfor

Managing

HOME Directories -21

ZFS

Snapshots

222

ZFSDevices 224 TimeSlider 224

Summary

228

References 228

10 Customize the Solaris Shells 229

Shell

Management

2.50

AChoiceof Shells 2.S0

Interactivity

-* I

Command

Completion

252

Configuration

Files 2 5 5

Shell

Tips

and Tricks 2 57

Data FlowsInand Out 2 57

When There's

Only

One CommandLine 2 5')

All Mannerof ShellCharacters 2.5<)

Scripts

and the Shell 24 I

The Basics of Shell

Scripts

242

Study

Available

Scripts

24r>

Sample Scripts

24(>

Summary

247

References 247

11 Usersand

Groups

249

User

Concepts

2r>0

Standard Users 25 I

System

Accounts 2r>1

The Root Account 252

Role BasedAccess Control (RBAC) and Administrative

Privileges

252

Local

Configuration

Files 257

Commands Used for

Managing

Users and

Groups

258

Command-lineAccount

Management

2.58 GUIAccount

Management

20 5

Basic LDAP UserDatabase '<''

LDAP and NIS 20 5

An LDAPData

Interchange

Format File 271

(9)

xii

Oracle Solaris 11

System

Administration: The

Complete

Reference

Extend LDAP to aNetwork 273

LDAP and Other Services 274

Summary

274

References 274

12 Solaris 1 I

Security

275

installation and Initial

Configuration Security

276

root Isa Role 276

Hardening

and

Minimizing

the OS Installation 276

Managing FileAccess 277 Basic UNIX FileAccess Permissions 277

Additional File Protections: umask 280 Additional File Prolections: encryption 281 Password

Management

282

Changing

Passwords 282

Setting

Password Policies 28.?

Role BasedAccessControl (RBAC) 284

The All-Powerful root User 284

What'sa Role-' 284

Privileged

Execution with sudo 286

System Auditing

287

The auclitd Daemon 287

The IP Filter Firewall 288

Configuring

IP Filter 288

Remote Access 290

The ssh Server 291

The ssh Client 291

AnotherSecurityFeature 293

Summary

293

References 293

13

System

Performance 295

First, Know Your

System!

296

What Hardware Do I Flave? 296

What OSSoftware Do I Have? 298

Observing

Your

System

298

What toLook For 298

H(jwto Look:

Observability

Tools 299

Log

Files 303

System Tuning 304

Kernel Parameters 504

OtherResourceControls 304

DTrace 305

Some DTrace Tools 305

Some DTrace

Examples

505

Some

Performance-Monitoring

Guidelines 307

(10)

Contents

xiii

Oracle Hardware and Software

Support

it)1)

Summary

>I 0

References

14 Solans Virtualization 'II

Introduction: Zonesand Virtualization 11 •'

Quick

Tourwith Zones * I—

Basic Zones Administration ill

Creating

Zones ! I

>

Zone

Login,

Boot, and Shutdown MS

Resources and Zones 51•

Zones and ZFS Datasets >'<'*

Adding

a

Directory

from the Clobal Zone M()

ZoneAccess to the DVD-ROM Drive i.M>

Removing

a Resource CO

Adding

anNFS Mount I

Advanced Zones Administration Ci

CPU Allocation

CPU Shares and theFairShare Scheduler ••'11

Observing

CPU Allocation '<-'r

Memory

Allocation C'H

Zone Performance and Statistics Cli

Zones and Discrete

Privileges

( ! I

More ZonesAdministration 1 >I

Cloning

! !1

Changing

a Zone's Name andlis Root Dataset i ! i

Zone

Backup

and Restore ''LI

Zone

Rehosting

! 1(!

SolarisK)Branded Zones 111

Tips,

Tricks, and Pitfalls hostid

Profile for Automatic Installer '

Interactive

sysconfig

to Create ProfileXML LL!

Summary

•1

Reference

15 Print

Management

5'lr>

Print Service

Options

LK>

CUPS, the Print Service M<>

Related

Packages

M7

The Internet Print Protocol (IPP) andCUPS M» Basic Components Llfi

Basic Commands LI'!

Set Upa PrinterAdministrator ir>()

ThePrinter

Contiguration

Tool 'St)

(11)

xiv

Oracle Solaris 11

System

Administration: The

Complete

Reference

Print Server

Configuration

358

Connecttoa Remote Print Server 360

The Other Printer

Configuration

Tool 360

The Files of CUPS 361

The Main CUPS Server

Configuration

File:

cupsd.conf

361 Additional CUPS

Configuration Options

363

Configured

Printers in

printers.conf

364

Configured Groups

of Printers 367

PrintersShared via Samba 367

Print Server

Log

Files 368

Summary

369

16 DNS and DHCP 371

The Domain Name Service 372

DNS

Background

372

DNS

Configuration Concepts

373

A

Key

SolarisDifference 373

Different DNS Servers 374

DNS

Packages

374

Key

DNSCommands 374

A New

Way

to

Configure

a DNS Client 375

DNS Client

Configuration

Files 378

DNSServer

Configuration

378

DNS Server

Configuration

in SMF 380

Creating

a DNS

Forwarding

Name Server 380

Extending

DNSfor a

Primary

or

Secondary

Server 381

DNS

Logging

382

DNS Database Files 383

Troubleshooting

388

The

Dynamic

Host

Configuration

Protocol (DHCP) 389

The DHCP

Management

Tool 390

DHCP

Configuration

Files 395

The ISC DHCP Server 395

The DHCP Client 396

Summary

397

References 398

17 Mail Services 399

A sendmail

Configuration

Plan 400

Customizing

sendmail 400

Basic Procedures 401

Customizing

the

Configuration

fora Local

System

401

Mail Clientsona Network 401

(12)

Contents XV

Virtual Hosts and sendmail 406

sendmail and

Transport

Layer

Security

40(>

Files that .forward 410

Alias

Management

insendmail 410

Postmaster Aliases 4 11

Local Aliases 411

Alias

Maps

and NIS 411

Mail Queue

Management

411

Contents of the Mail Queue 412

Processing

the Mail Queue 4 12

Changing

Mail

Queues

4 12

Troubleshooting

sendmail 41 i

Testing

Basic

Operation

41 i

Testing

the

Configuration

4 14

Reviewing

Aliases 414

Mail

Logs

4 IS

Error

Messages

4 I .'>

Summary

4 17

References 4 IH

18

Solaris

Trusted Extensions 410

Overview of Trusted Extensions 420

Enabling

Trusted Extensions 421

ZonesandTrusted Extensions 421

Enabling

Trusted Extensions 42 1

The

label_encodings

File 422

Trusted Extensions

Tips

and Pitfalls 42(>

Creating

and

Installing

a LabeledZone 427

A Detour intothe

Shared-ip

and

Exclusive-ip

Zones 4 ii

SomeObservations, More

Tips,

and Pitfalls 444

Adding

Roles and Users 4 ) ')

User

Logins

and Roles 4 '.S

Multilevel

Workspace

4 i(>

Switching

Roles 4!7

Managing Devices inTrusted Extensions 4S7

NetworkAccesswith TrustedExtensions 4 19

Summary

440

References

19 The Network File

System

441

AvailableVersions 442

NFS Version 2 442

NFS Version 3 442

(13)

xvi

Oracle Solaris 11

System

Administration: The

Complete

Reference

Additional Common Features 443

NFS Service

Configuration

443

NFS

Configuration

Files 447

Options

for

Sharing

448

Basic NFS

Filesystem Sharing

448 Client

Configuration Options

449

Mount from the Command Line 450

During

the Boot Process 450

Automounton Demand 451

Log Management

454 VersionControl 454 Firewall Considerations 455

Summary

455 References 455

20 The FTPand Secure Shell Services 457 Secure and InsecureCommunications 458

Insecure Remote Connections 458

FTPand SFTP ClientCommands 459

Configure

anFTP Server 460

FTP ServerFiles and Utilities 460

Review the Default FTP Server

Configuration

File 460

Set

Up

a Basic

Anonymous

FTP Server 463

Achrootjailfor ProFTPD 463

Set

Up

Guest Users 464

Basic

Security

on FTP 464

UserSecurity 465

Host

Security

465

Virtual HostsonFTP 466

The

Configuration

ofan SSH Server 466

General

Configuration

466

Secure Shell Client Commands 467

The MainClient

Configuration

File 468

Additional Files in the /etc/ssh Directory 470

Private and Public Key Pairsfor SSH 471 The MainSSH Server

Configuration

File 471

Additional

Security

in theSSH Server

Configuration

475 More

Security

withTCP

Wrappers

475 More Securitywith

Passphrases

476 Different

Algorithms

477

Send That

Passphrase

to an SSH Server 478

More

Security

with Hashed Hosts 479

Summary

480

(14)

Contents XVII

21 Solaris and Samba 481 Basic Features

UNIXSamba onSolaris -Ifii

The Basicsof UNIX Samba ->8-l

The Standard Samba

Configuration

File -liU>

Client Commands

The SWATTool -'<)7

Solaris CIFS '<'<"

Make SureUNIX SambaIs "Off"

The SolarisCIFS

Packages

-Il>'>

Configure

a

Mapping

Strategy

r,|> !

Set

Up

Membership

in a

Workgroup

orDomain r>('ri

Set

Up

WINS and Related Servic¬es ",()(>

Configure

CIFS Usersand Groups "i'"'

Mapping

Usersand

Groups

r,(>7

Create aZFS Share for Solaris CIFS r'"7 Usethe

sharemgr

Commandto Create aCIFS Share r>d'l

MountaShare r>'()

TheAutomouterand Home Directories r> I "

Troubleshooting

Issues r>' '

Summary

r>' '

References r''

-22

Apache

and the Web Stack r> H

Basic

Components

'»''

TheAMPStack '' '

GUI AMP Installation ^ '

Keep

Modulestoa Minimum r>-'I

Basic

Apache Configuration

"'^ !

Configuration

Files 5

Apache

as a

Regular

Host r>--l

Apache

with Virtual Hosts "i-1*1 Secure Hosts r> !l) I r >

Apache Security

Firewall Review r>11 Host-based

Security

>!*' User-based

Security

r'^r> Secure Certificates r'^7

Isolating Apache

Within a Zone r>

Summary

^'

(15)

wiii

Oracle Solaris 11

System

Administration: The

Complete

Reference

A Oracle Solaris 11 11/11

Quick

Command Reference 543

System

Information 544

Services (SMF) 544

Package

Management (IPS) 544

Boot Environments 545

ZFS

Filesystem

545

Users and Roles 546

Network Administration 546

Performance

Monitoring

546

Zones(Containers-^) 547

References 547

B Oracle Solaris11 11/11 Information

Library

File 549

References

Related documents

For this study, we extracted all spellings for etymological dental fricatives in the FITS corpus, distinguishing five categories: (1) initial position in content words; (2)

The present study supported this reasoning for one indicator of perfectionism: the effect of concern over mistakes (representing the socially prescribed form of

For more examples of configuration directives in the CUPS server configuration file, view the associated system manual page by entering the following command at a terminal prompt:.

Adding to the evidence for a unitary focus of attention, Treisman, Kahneman and Burkell (1983) found that when attention was divided between two spatial areas, performance was

“Polimetrica License B” gives anyone the possibility to distribute the contents of the work, provided that the authors of the work and the publisher are always recognised

General: Every reasonable effort is made to insure the technical information and recommendations on these data pages are true and accurate to the best of our knowledge at the date

Generating a CSR (Certificate Signing Request) The following contains information and instructions on generating a Certificate Signing Request (CSR) which you are required to send

(40 mg/mL) to overnight culture of Gram-negative bacteria (Pseudomonas aeruginosa and Escherichia coli) and Gram- positive bacteria (Enterococcus faecalis and Staphylococcus..