HP-UX操作系统管理维护手册_PDF格式下载
HP-UX操作系统管理维护手册_PDF格式下载
一、察看主機資源信息............................................................................7
1.1 常用方法............................................................................................................................7
1.2 DMESG ............................................................................................................................... 7
1.3 cstm功能更多,建議用cstm............................................................................................7
1.4察看主機類型.....................................................................................................................7
1.5 I/O SCAN ............................................................................................................................ 7
1.6 #uname -a ............................................................................................................................ 7
1.7修改網路位址、主機名稱等.............................................................................................7
1.8 主機SN查詢.....................................................................................................................8
1.9 linux下文件和目录的颜色................................................................................................8
1.10 RH8,9中安装后如何添加新的语言包...........................................................................8
1.11去掉多余的回车符...........................................................................................................8
1.12改变redhat的系统语言/字符集......................................................................................9
二、UNIX進程管理...............................................................................14
2.1 #ps -ef...............................................................................................................................14
2.2 守护进程的运行方式......................................................................................................15
三、UNIX 網絡管理..............................................................................16
3.1 #netstat -rn.........................................................................................................................16
3.2 #lanscan .............................................................................................................................16
3.3察看光纖鏈路狀態及loopID ..........................................................................................16
3.4 HP的網卡啟動、去啟動命令.........................................................................................16
3.5 找到并點亮網卡在主機上的物理位置..........................................................................16
3.6 察看網卡的速度及狀態..................................................................................................17
3.7 LAN设备文件.................................................................................................................17
3.8 配置路由..........................................................................................................................17
3.9 啟動網絡服務..................................................................................................................18
3.10 察看光卡屬性................................................................................................................18
3.11 附:linux 靜態動態IP配置........................................................................................19
四、UNIX磁盤管理...............................................................................20
4.1 察看空間使用狀態..........................................................................................................20
4.2 LVM信息察看.................................................................................................................20
4.3硬體路徑(Hardware Path)是如何定義的........................................................................20
4.4 HP-UX的硬碟資源的邏輯卷管理-LVM(LOGIC VOLUMN MANAGER)..................20
1. 先建物理卷:............................................................................................................20
2. 再建邏輯卷組:........................................................................................................21
3. 然後劃分邏輯卷:....................................................................................................21
4. 在LV上建檔案系統:.............................................................................................21
5. 將此檔案系統Mount到一個目錄下: ...................................................................22
6. 添加邏輯卷................................................................................................................22
7. 刪除邏輯卷................................................................................................................22
8. 擴大檔案系統............................................................................................................22
9.減小lv .........................................................................................................................23
10.添加LV鏡像.............................................................................................................23
11.刪除LV鏡像副本.....................................................................................................23
12.導出VG.....................................................................................................................23
13.導入VG.....................................................................................................................23
14.暫停卷組....................................................................................................................23
15.rename vg ...................................................................................................................23
16. 刪除卷組..................................................................................................................23
17. 創建共享卷組..........................................................................................................24
18.拆分VG.....................................................................................................................24
19.使用pvg对已存在的vg镜像..................................................................................24
20 備份/恢復卷組配置..................................................................................................25
21 在系統內移動磁盤...................................................................................................25
22. 在系统之间移动磁盘..............................................................................................26
23. 将数据移动到另一个物理卷..................................................................................26
24. 创建备用引导磁盘..................................................................................................27
25.補充:........................................................................................................................28
4.5關於鎖盤...........................................................................................................................29
五、UNIX Service管理..........................................................................31
5.1 MAIL ...............................................................................................................................31
5.1.1、發送格式:.........................................................................................................31
5.1.2、mail功能設定.....................................................................................................31
Step1:需要修改的參數:.......................................................................................31
Setp2: 設定轉發主機..........................................................................................31
5.2 MC/SG ..............................................................................................................................31
5.2.1、手動啟動MC .....................................................................................................32
5.2.2、單點啟動後,加入另一個節點:.....................................................................32
5.2.3、實現節點切換.....................................................................................................32
5.2.4、監測Cluster 運行狀態......................................................................................32
5.2.5、停止Cluster 運行..............................................................................................32
5.2.6、停止運行某個節點而Cluster 在其它節點繼續運行.......................................32
5.2.7、在Running Cluster 中運行某一個包................................................................33
5.2.8、停止一個運行中的包.........................................................................................33
5.2.9、改變一個包的切換屬性.....................................................................................33
5.3 DNS解析..........................................................................................................................33
5.3.1 HPUX .....................................................................................................................33
5.3.2 Linux:DNS服务器配置.....................................................................................34
5.4配置和保护ARPA/Berkeley服务...................................................................................35
5.5网络时间协议(NTP) ...................................................................................................36
5.6 SAMBA ............................................................................................................................38
5.6.1 linux環境下的配置...............................................................................................38
5.6.2 UNIX環境下的配置.............................................................................................46
5.6.3 SAMBA常用命令.................................................................................................49
5.7 rsync 服务器架设............................................................................................................55
5.7.1 什麽是rsync .........................................................................................................55
5.7.2 架设rsync服务器过程........................................................................................55
Step1:rsync的安裝..............................................................................................55
step2:rsync服务器的配置文件rsyncd.conf .......................................................55
Step3:启动rsync 服务器及防火墙的设置........................................................58
Step4:通过rsync客户端来同步数据.................................................................58
5.8 HPUX NIS ........................................................................................................................60
5.8.1 配一个主控服务器...............................................................................................60
5.8.2 配一个NIS的客户机..........................................................................................61
5.8.3 NIS維護命令........................................................................................................63
5.9 xmanager ...........................................................................................................................63
5.9.1 linux下的配置......................................................................................................63
5.9.2 Client SETUP(Windows): ......................................................................................64
5.10 yum ................................................................................................................................ 65
5.10.1 linux下yum的配置...........................................................................................65
5.10.1.1服務器端設定(10.161.32.227): ..........................................................65
5.10.1.2客戶端端設定(10.161.32.228): ..........................................................68
5.11 ADSL及防火墙配置(linux) .....................................................................................70
六、UNIX檔案系統管理.......................................................................73
6.1 系統檔案類型說明..........................................................................................................73
6.2日誌檔的監測...................................................................................................................73
6.3 boot,init,shutdown檔案說明---linux..........................................................................74
6.3.1 /etc/sysconfig下面的文件.....................................................................................74
6.3.2 /etc/sysconfig/network-scripts/ ...............................................................................76
6.3.3 系统V的Init过程..............................................................................................78
6.3.4 在Boot时执行程序.............................................................................................79
七、常用命令詳解..................................................................................80
7.1 find ...................................................................................................................................80
7.2 crontab ...............................................................................................................................83
7.3 who –r ...............................................................................................................................83
7.4普通的對話-wall ..............................................................................................................83
7.5 登錄用戶信息察看 .....................................................................................................83
7.6 xargs—find ........................................................................................................................83
7.7 tune2fs—取消系統啟動時自動去檢測文件系統...........................................................84
7.8 Nbtstat ...............................................................................................................................84
7.9 ipcs 命令..........................................................................................................................86
7.10 ifconfig命令...................................................................................................................89
7.11 finger命令......................................................................................................................89
7.12 cpio 命令........................................................................................................................90
7.13 uniq ................................................................................................................................ 92
7.14 比較兩個文件................................................................................................................92
7.15 sort(vi) .......................................................................................................................94
7.16 date .................................................................................................................................95
7.17 dmesg 显示开机信息..................................................................................................96
7.18 tar ...................................................................................................................................96
7.19 cpio(copy in/out) .............................................................................................................98
7.20 compress ....................................................................................................................... 100
7.21 rpm(redhat package manager) ....................................................................................... 100
7.22 IPTables ......................................................................................................................... 102
7.23 shutdown ....................................................................................................................... 109
7.24 backup & frecover ......................................................................................................... 110
7.25 SAM............................................................................................................................. 112
7.26 make_recovery .............................................................................................................. 113
7.27 rsync .............................................................................................................................. 115
7.28 lsof ................................................................................................................................ 115
7.29 mount ............................................................................................................................ 116
八、HP主機外設管理..........................................................................118
8.1 生成設備文件................................................................................................................118
8.2 磁帶的使用....................................................................................................................118
8.3 光碟機如何使用............................................................................................................118
8.4 打印機配置....................................................................................................................118
8.4.1 添加本地打印機.................................................................................................118
8.4.2 添加遠程打印機.................................................................................................119
8.4.3 添加網絡打印機.................................................................................................119
8.5 設備路徑說明................................................................................................................120
8.5.1 硬件路徑.............................................................................................................120
8.5.2 内置硬盘或外置的SCSI硬盘-DVD ................................................................121
8.5.3 外置SCSI磁盘阵列柜......................................................................................122
8.5.4 PV Link ................................................................................................................ 122
8.5.5 FC60、VA控制器路径.......................................................................................123
8.5.6 FC60、VA LUN路径..........................................................................................123
8.5.7 设备文件和硬件路径的对应(SCSI).............................................................124
8.5.8 使用lssf查看设备文件....................................................................................124
8.5.9 设备文件目录(/dev) ...........................................................................................124
8.5.10 使用insf创建设备文件...................................................................................124
8.5.11 使用rmsf删除设备文件..................................................................................125
九、UNIX系統監控.............................................................................126
9.1 性能監控-vmstat............................................................................................................126
9.2动态监控网卡流量-tcpdump .........................................................................................126
9.3 SAR(System Activity Reporter) 系统活动情况报告....................................................128
9.4分析消息队列、共享内存和信号量---ipcs ..................................................................131
9.5 IOSTAT ........................................................................................................................... 132
9.6 SWAPINFO ..................................................................................................................... 132
9.7 GlancePlus ...................................................................................................................... 133
9.7.1 CPU利用率.........................................................................................................134
9.7.2磁盘利用率..........................................................................................................134
9.7.3内存利用率..........................................................................................................135
9.7.4交换利用率..........................................................................................................135
9.7.5系统I/O利用率..................................................................................................135
9.7.6进程列表..............................................................................................................135
十、MC/SG配置..................................................................................136
10.1 雙機系統的安裝..........................................................................................................136
10.2配置cmcluster.asc ........................................................................................................137
10.3配置應用文件scppkg.asc,control.sh,scppkg.sh...........................................................137
10.4 網路的配置..................................................................................................................137
10.5 再來配置IP位址........................................................................................................138
10.6 在MC的pkg.cntl中配置oracle及listener的启动和停止脚本: .........................138
十一、其他主機配置............................................................................139
11.1 配置遠端維護-remote口的配置.................................................................................139
11.2 webconsole的設置.......................................................................................................139
11.3如何更改HP的console終端的終端類型..................................................................139
11.4 console其它各個參數的修改......................................................................................140
11.5 HPUX SMH(System Management Homepage) ............................................................ 140
11.6 SAM(System AdministratorManager)........................................................................140
11.7 系統運行級別..............................................................................................................140
十二、診斷............................................................................................142
12.1診斷工具mstm .............................................................................................................142
12.2忘記了口令該怎麼辦...................................................................................................143
12.3快速解決Console故障的方法:................................................................................144
12.4修改HP雙機系統啟動特性........................................................................................144
12.5 umask如何設置...........................................................................................................144
12.6 給root解鎖.................................................................................................................145
十三、 HP-UX的啟動過程及安裝..............................................146
13.1 HPUX啟動過程:.......................................................................................................146
13.1.1 PDC ( Processor Denpendent Code ) ................................................................. 146
13.1.2 ISL ...................................................................................................................... 146
13.1.3 Load Kernel ........................................................................................................ 147
13.1.4 Start subsystem ................................................................................................... 147
13.1.5 Login .................................................................................................................. 148
13.2 HPUX11.11V1安裝和升級.........................................................................................148
13.2.1 确定型号、操作系统和(或)操作环境以及软件.......................................148
13.2.2 選擇安裝方式...................................................................................................149
13.2.3 准备安装或更新到HP-UX 11i v1..................................................................150
13.2.4 冷安装HP-UX 11i v1......................................................................................151
13.2.5更新到HP-UX 11i v1.......................................................................................155
13.3 引导HP 服务器和工作站.........................................................................................158
13.3.1 暂停自动引导过程...........................................................................................158
13.3.2 引导工作站.......................................................................................................159
13.3.3 引导HP 服务器..............................................................................................159
十四、 備份和恢復..............................................................................160
14.1 備份類型......................................................................................................................160
14.2 如何創建rootVG的系統備份(備份rootVG下面所有的東西)..........................160
14.3 fbackup & frecover ....................................................................................................... 160
十五、系統設定管理............................................................................163
15.1 設置用戶登錄障礙和解除障礙..................................................................................163
15.2 更改特殊登錄字符......................................................................................................163
15.3 HPUX運行級別...........................................................................................................163
15.4 设置影子口令模式......................................................................................................163
15.5 内核参数调整命令kmtune......................................................................................164
15.6 部分kernel參數說明..................................................................................................165
十六、HPUX安全設定........................................................................170
16.1 限制root用戶用ssh進行登錄..................................................................................170
16.2 只允許幾個IP訪問主機............................................................................................170
16.3 用戶密碼設置規範......................................................................................................170
16.4 鎖定系統默認賬號......................................................................................................170
16.5 selinux的應用..............................................................................................................170
附錄一:適用SHELL腳本.................................................................172
0.1 ftp script: ......................................................................................................................... 172
0.2. 修改hpux内存参数的shell ........................................................................................172
0.3 用shell写一个九九乘法表..........................................................................................174
405
404