ibm aix 5.3學習筆記

zhengbao_jun發表於2010-03-03
這是我看191redbook第四遍的時候做的手記,放在這裡大家提提意見!
(Created by workaholic )
第一部分、系統啟動問題
cfgmgr :  configures devices and optionally installs device software into the system

last   :  display all the previous logins and logoffs that still have entries in /var/adm/wtmp file

uptime :  show how long the system has been up

要在maintenance mode作 installing new or updated software and running diagnostic checks

alog : trace the boot process and find out if sht went wrong,alog命令呼叫rc.boot指令碼將啟動資訊匯入/var/adm/ras/bootlog中
# alog -L 顯示定義在alog Database中的logs

# alog -o -t 顯示啟動日誌

cfgmgr命令:
在系統啟動階段,cfgmgr命令配置對使用系統必須的所有裝置
系統啟動包括兩個階段:
階段一:  cfgmgr –f  一旦系統啟動就不能執行了
階段二:  cfgmgr –s ( second boot phase for normal boot )
階段三:  cfgmgr –p ( second boot phase for service boot )

# cfgmgr –i  /usr/sys/inst.images 該命令嘗試自動安裝裝置的軟體 FOR 新檢測到的裝置
-I 選項指定安裝的媒質在哪裡
在此處有一個seq field ,該field 是一個整數指定了優先權,值越小,優先順序越高,0的優先順序最低,1的優先順序最高
# cfgmgr –l scsi0 ( 配置檢測到的連線到SCSI0適配卡的裝置 )
-
如果你想查詢root使用者什麼時候logged on and off from the console
# last root console
如果你想決定系統上次shutdown是什麼時候

# last shutdown
為了顯示一個啟動列表

# bootlist –m normal –o
如果你想改變你的啟動列表

# bootlist –m normal fd0 hdisk0 cd0
注意:加到bootlist的每一個裝置必須處於Avalable的狀態

如果你懷疑你的系統被shutdown或restarted,你可以使用uptime命令去查明,uptime命令顯示系統已經執行了多長時間

# mpcfg –df   To find out what the status is of your diagnostic flags
# mpcfg –cf 11 1 如果你想Fast IPL system,你可以改變diagnostic flag的值
注意: mpcfg 和 service information相關

shutdown
-v 或 –h   Halt the operating system completely
-k         Avoids shuting down the system
-m       Bring the system down to maintenance mode
-I        specifies interactive mode , Display interactive messages to guide the user through the shutdown
注意  : /etc/rc.shutdown檔案由 /usr/sbin/shutdown script呼叫來關閉在關機的時候想中斷的程式,該檔案的必須是可執行的才能被正確呼叫

安裝媒質有問題的徵兆:
1、安裝時意外掛起   2、 無法從介質讀資料  3、意外重起
如果安裝媒質沒有問題的話,在你的系統中兩個裝置可能共享相同的SCSI地址
LED Error Code
LED 201 ---  Damaged boot image
解決方法:
1、訪問你的rootvg ( 進入 system maintenance 模式 )
2、檢查 / 和 /tmp檔案系統,看看他們是否已經滿了,如果是建立更多的空間
3、決定 bootdisk 通過用命令 lslv –m hd5
4、重新建立 boot image 使用 bosboot –a –d /dev/hdisk0
5、檢查 CHECKSTOP errors in the error log , 如果這樣的錯誤發現的話可能是失敗的硬體
6、關機 重起
LED 223-229 ---  Invalid boot list
1、決定啟動磁碟 lslv –m hd5
2、建立新的bootlist  使用 bootlist命令
LED 551,555,and 557 --- Errors Including corrupted file system and corrupted JFS log
1、進入維護模式   access rootvg before mounting and file system
2、fsck –y /dev/hd1
   fsck –y /dev/hd2
   fsck –y /dev/hd3
   fsck –y /dev/hd4
   fsck –y /dev/hd9var
3、再次Format the JFS log
/usr/sbin/logform. /dev/hd8
4、使用 lslv –m hd5 去決定 boot disk
5、重新建立boot image
bosboot –a –d /dev/hdisk0
LED 552,554,and 556 ---  Super block corrupted or corrupted customized ODM database
Fsck
1、Repeat steps 1 and 2 for LEDs 551 555 and 557
2、If fsck inidicates that block 8 is corrupted, the super block for the file system is cororupted and needs to be repaired , Enter the command :
Dd count=1 bs=4k skip=31 seek=1 if=/dev/hdn f=/dev/hdn
3、rebuild your JFS log by using the command :
/usr/sbin/logform. /dev/hd8
4、if this solves the problem, stop here ; otherwise ,continue with step 5
5、Your ODM database is corrupted ,restart your system and 進入 maintenance mode
6、Mount the root and usr file system
Mount /dev/hd4 /mnt
Mount /usr
7、copy system configuration to a backup directory
mkdir /mnt/etc/objrepos /backup
cp /mnt/etc/objrepos/Cu* /mnt/etc/objrepos /backup
LED 553 --- corrupted /etc/inittab file
1、進入系統維護模式
2、檢查 /  /var /tmp 使用 df命令
3、檢查 /inittab檔案
4、檢查 execution problems
/etc/environment
/bin/sh
/bin/bsh
/etc/fsck
etc/profile
/.profile
5、shutdown and reboot

第二部分、硬體相關
為了列出系統中的磁帶(盤),使用 # lsdev –C –c tape(disk)

列示在預定義ODM資料庫中的裝置  # lsdev –P –H

列示在定製定義ODM資料庫中的裝置 # lsdev –C –H

# lspv 顯示在系統中的每一個PV along with its physical disk name ,PVID,and with VG it belongs to.

# lspv pvname 僅僅顯示該PV的資訊  eg: # lspv hdisk0

# lspv –p hdisk0 列示 range , state , region , LV name , type , and mount point for each PP on the PV

cfgmgr 配置裝置在軟體層
SMS檢查和配置系統在硬體層
如何進入SMS:
1、關機
2、如果需要的話插入 SMS 軟盤 ,啟動機器
3、Press F1 得到一個圖形化的 SMS選單或 Press F4去得到一個ASCII SMS選單
( 要眼疾手快 )
你可以改變訪問的口令在SMS選單,從而只有授權的人才可以訪問SMS工具,但如果你忘了這個口令,唯一的解決方法是給主機板放電(將電池拿掉)

當顯示一個定製裝置的有效屬性時,資訊的獲得是從 Configuration daabase 而不是裝置本身,一般來說,chdev with –P or –T flag 將重新整理裝置的配置,如果沒有的話,lsattr 命令顯示裝置的資訊有可能是不準確的,一直到重起後
· # lsattr –El rmt0 顯示磁帶的當前的屬性
· # lsattr –l rmt0 –D 顯示磁帶預設的屬性
· # lsattr –l scsi0 –a bus_intr_lvl –E
· # lsattr –l tty0 –a login –R  To list possible values of the login attribute for the TTY device tty0

# smitty devices  該命令可以使用smit選單
1、安裝或配置裝置(在IPL之後)
2、刪除裝置
3、列示存在的裝置
4、改變或顯示裝置的屬性
5、執行裝置相關的問題的決定
# /usr/lib/errdemon     啟動errdemon
# /usr/lib/errdemon –l  決定系統錯誤日誌檔案的路徑

# errpt  產生錯誤報告  # errpt –a  # errpt –a –s 0828093001
# errpt –a –j AA8AB241(最後為 error identifier )
# errloger 命令允許你記錄管理員的資訊到系統錯誤日誌中
# diag 執行硬體問題診斷

AIX使用syslogd記錄系統的資訊,在這裡有一個/etc/syslog.conf配置檔案,該檔案控制syslogd程式的行為,系統日誌應該被升級通過編輯/etc/syslog.conf檔案,在你編輯並增加了條目在/etc/syslog.conf檔案,你需要重新啟動syslogd程式

# smitty tty 增加一個TTY

第三部分、系統和軟體的安裝
為了安裝BOS,應該啟動系統進入Maintenance mode
三種安裝方法的區別:
(1)New and Complete Overwrite Installation
  情形一、一臺新的機器
  情形二、你想安裝到那個硬碟(包含在一個已經存在的卷組)你想完全覆蓋掉,或者rootvg已經損壞
  情形三、你想重新分配你的硬碟,使你的rootvg更小,分配少些磁碟空間給它
安裝後要使用 Configuration Assistant application手工配置系統相關設定,該程式也可以手工執行,/usr/sbin/install_assist
(2)Migration Installation (升級安裝)
  使用該安裝方法去升級AIX 3.2   4.1   4.2    4.3   To AIX 5L Version 5.1 升級時保留了已經存在的rootvg卷組,除了/tmp,該方法保留了所有的檔案系統,包括rootvg,lv和系統配置檔案,同時保留了使用者配置檔案。
(3)Preservation Installation
  該方法覆蓋了/usr , /tmp, /var, 和 / 檔案系統,在這些目錄中任何使用者資料將丟失,任何其他的LPP和Filesets將會丟失,系統配置將重做在安裝結束後
   有一個 /etc/preserve.list檔案,在該檔案中的條目將會被保留

# bootinfo –y  標示系統硬體的型別 ( 32bit或64bit )
oslevel 的執行
  # oslevel   ( to see the current maintenance level of your system )
  4.3.3.0
軟體的組成以及各部分的含義
  vv.rr.mmmm.ffff
vv :  兩個數字   標示 version number
rr :  兩個數字   標示 release number
mmmm: 四個數字   標示 modification lever
ffff: 四個數字   標示 fix level

在升級後,oslevle後,如果你的系統沒有顯示出新的維護層,使用
After an update, if your system is not showing the new maintenance level . use the –l flag with the oslevle command to detemine what filesets have note been upgraded to match the new BOS levle
# oslevle –l < Current Level 〉去決定還有什麼filesets沒有被升級到新的BOS Level

PTF and APARs
PTF :  Program Temporary Fix , a PTF is an updated fileset or a fileset that fixes a previous system problem
      PTF 的安裝是使用  installp 命令
APAR:  Authorized Program Analysis Report , An APAR is an emergency fix. Or e-fix . to a unique problem on the system , APARS will eventually become PTFs after tesing and verification.
      APAR 的安裝是使用 instfix 命令

Installp命令
-X  如果在安裝過程中空間不夠將擴充套件檔案系統
-v   在安裝結束後確認在檔案集中的所有安裝的檔案備正確地檢查過。可以同-a 和 –ac一起使用來確認一個成功的安裝。
-a   應用一個或更多的軟體產品或升級,該引數是預設的行為,該引數可以和 –c 一起使用來apply 和 commit一個軟體的升級或安裝
-p   執行一個安裝預覽,執行預安裝的所有檢查
-B   表示請求的行為被限制到軟體的升級
-C   清除一箇中斷的安裝和刪除所有沒有完成的安裝
-c    commit applied的升級到系統
-d    指定安裝媒質
-F    強迫安裝,無論是否存在,是否新舊
-f    read the names of the software products from listfile
g     當用來install和commit的時候, 該選項自動安裝或commit,
軟體可以以兩種方式進行安裝:
applied state: 該狀態安裝軟體到系統同時保留以前版本的軟體 ,該狀態是非常有用來測試新的軟體,在有必要的時候可以返回到以前版本的軟體
committed state : 安裝軟體同時刪除以前的軟體
例如:
1、安裝在 bos.net軟體包中的所有的filesets 到 /usr/sys/inst.images目錄( in the applied state)
Installp–avX –d/usr/sys/inst.images bos.net
2、預安裝在bos.net軟體包中的所有的檔案集到/usr/sys/inst.images目錄( In the committed state )同時檢查磁碟空間的需求
3、清除一箇中斷的安裝和刪除所有沒有完成的安裝
  # installp –C
4、committing applied updates  命令: # installp –cgx all 或者是 smitty install_commit
這個命令將commit所有的updates同時刪除以前版本的filesets
5、Rejecting applied updates 命令 # installp –rBfX ./reject.list或是smitty install_reject
該命令將刪除所有uncommitted updates listed in ./reject.list 同時將系統帶回到以前的maintenance level
6、刪除一個安裝的軟體  # installp –ugp –V2 bos.net.ipsec.rte 執行該命令將顯示一個將要刪除的檔案的列表,但並不真正刪除它 或是 # smitty install_remove
7、列示在媒質上的所有的軟體
  # installp –L –d /dev/cd0
8、使用smitty安裝軟體 # smitty install_latest
注意: 在安裝結束後,無論命令的狀態報告是成功的還是失敗的,都應該看看 $HOME/smit.log檔案,因為你想安裝的fileset系統可能並沒有安裝
A version number and a release number : 標示 release level
A modification level and a fix level number : 標示 the level of the update

用下面的步驟使一個系統升級到最新的maintenance level:
1、列示軟體的 maintenance level
2、下載 fixs
3、顯示並升級安裝的軟體到最新的level

為了看你當前執行的filesets的maintenance level ,使用下面的命令:
# lslpp –l
為了display all files installed with the bos.64bit fileset
# lslpp –f bos.64bit

為了顯示filesets安裝和升級的歷史  : # lslpp –h bos.sysmgt.trace

下載 FIXs :
1、ftp://service.software.ibm.com
2、通過fixdist的工具 訪問: http://service.software.ibm.com
通過fixdist 下載的軟體BFF的格式的,是用backup命令建立的,如*.bff,可以用restore命令來讀。
如果你經常應用升級並將所有的升級軟體放在相同的目錄中,.toc檔案可能會過期,installp命令使用.toc檔案來執行安裝,為了當你執行安裝的時候使正確並最新的軟體安裝,推薦重構.toc檔案,命令如下:
# inutoc ;  還有一個 inutoc /usr/sys/inst.images/.toc
該命令在執行installp的時候自動呼叫

你可以使用fixdist工具下載個別的fix,為了決定一個fix是否安裝在系統上或為了安裝一個fix,使用instfix命令( 和fix有關)
instfix命令允許你安裝一個fix或set of fixes without knowing any information 除了APAR號或唯一的關鍵字來標示這個fix
例一:為了列示在一個CD-ROM中的fixes
# instfix –T –d /dev/cd0
例二:為了決定是否APAR IX75893安裝到系統
# instfix –ik IX75893
例三:To examine information about APAR IX75893 and what it does
# instfix –aik IX75893
例四:To list what maintenance levels have been installed on your system with the instfix command
  # instfix –i | grep ML
例五:為了從/dev/cd0安裝APAR IX75893
  # instfix –k IX75893 –d /dev/cd0
例六:To view the new maintenance level of your software
  # lslpp –l   主要還是顯示 fix level
this will show you the latest maintenance level of the filesets including those you just updated
為了建立installation images on your hard disk
# smitty bffcreate
為了克隆rootvg到一個新的磁碟 # smitty alt_clone
條件: The target disk should be a stand-alone disk not belonging to a VG,同時,SSA disks cannote be used as your target disks

第四部分: ODM
大多數的系統 object classes 和 objects儲存在/usr/lib/objrepos目錄,然而,ODM資訊儲存在
1、/usr/lib/objrepos
2、/usr/share/lib/objrepos
3、/etc/bojrepos
ODM的相關命令:
  odmadd:      add objects to an boject class
  odmcreate:    create empty object classes
  odmchange:    change specific objects in a specified object class
  odmdelete     remove objects from an boject class
  odmdrop      remove an entire object class
  odmget       retrives objects from object classes
  odmshow      display the description of an object class

第五部分:儲存管理和檔案系統
VGDA:
The VGDA, located at the beginning of each physical volume,contain informatino that describes all the logical volumes and all the physical volumes that belong to the volume group of which that physical volume is a memober

The VGDA is allocated when the disk is assigned as a physical volume,When the PV is assigned to a VG ,The actual VG informationg is placed in the VGDA

VGSA:
The VGSA contains state information about PP and PV

LVCB:
The LVCB is located at the start of every LV , It contains information about the LV and users a few hundred bytes

Disk Quorum:
Each Physical disk in a VG has at least one VGDA/VGSA,
single PV in a VG:  two  VGDAs on one disk
two    PV in a VG: two VGDAs on the first disk, one VGDA on the second disk
Three or more    :  one VGDA on each disk

Disk Mirroring :
disk mirroring is the association of two or three PP with each LP in a LV,在LV建立的時候就可以做Mirroring 。
mklv 命令允許你選擇 one or two additional copied for each LV,Mirror也可以加在一個已經存在的LV,通過使用mklvcopy命令
mirrorvg命令映象在一個給定VG中的所有的LV,相同的功能可以被完成通過mklvcopy命令,如果在一個VG中執行mklvcopy命令for 每一個單獨的LV,注意此處就是目標磁碟必須和源磁碟等等在同一個VG中
例一:# mirrorvg -c 3 workvg  三重映象一個卷組
例二:# mirrorvg workvg    以預設的方式映象卷組

為了刪除一個卷組中已經損壞的磁碟:
  # unmirrorvg workvg hdisk7
  # reducevg work hdisk7
  # remdev -l hdisk7 -d
刪除後新增一個新的磁碟(以同樣的名稱)
  # extendvg workvg hdisk7
  # mirrorvg workvg
同步新建的映象
  # mirrorvg -S -c 3 workvg
注意:在這個例子中,mirrorvg 將建立兩個copy for the LV in workvg,他將建立新的映象在新替換的磁碟上,但如果原來的系統被三重的映象的話,將沒有新的映象建立在hdisk7上,因為其他的copy已經存在
為了建立一個卷組精確的對映
  # mirrorvg -m datavg hdisk2 hdisk3

當rootvg mirroring完成後,下列的任務必須做:
一、執行bosboot命令  ( 從RAM磁碟檔案系統和核心建立一個boot image )
二、執行bootlist命令
三、reboot system( 預設情況下,mirrorvg命令使quorum to be turned off, 為了 turn on the quorum on a rootVG,系統必須重啟)
注意: 不要reboot 系統當 bosboot命令沒有成功建立一個boot disk的時候

非rootvg的 mirroring:
當一個非rootvg的卷組被映象時,the quorum state is deactivated,為了解決這個問題,all open LV must be closed, 然後vary off and vary on the VG for the changes to take effect

The dump device can be queried and modified with the sysdumpdev command

有三種方法用來配置一個新的disk ,如果你的LVM想用這磁碟的話,同時還必須做成一個PV
方法一:shutdown 然後Power on
  # lspv 的輸出結果中如果對應的hdiskx有PVID,說明該hdisk已經是PV了,可以被LVM使用,但如果沒有PVID的話,就要使該disk成為PV
方法二:手工執行cfgmgr

一個新的磁碟只有被分配給一個VG才可以使用,必須作為一個PV才可以被LVM使用
相應命令: chdev -l hdisk1 -a pv=yes

The following command is used to turn off the allocation permission for the PV hdisk1
# chpv -a n hdisk1

To turn the allocation permission back on .use the following command
# chpv -a y hdisk1

當一個PV由於損壞要被從該系統刪除時,該PV should be made unavailable :
# chpv -v r pvname
The following command will make a PV available to the system
# chpv -v a pvname
注意:當執行chpv命令失敗了的時候,檢查/tmp的空間

A PV must be unconfigured before it can be removed from the system,The following example shows how to unconfigure a PV and change its state from available to defined
# rmdev -l hdisk1
該PV的定義仍然保留在ODM中,使用 -d 將 remove the definition from the ODM
List PV on the system  # lspv
List PV on the system along with the status of each PV # lspv -C -c disk
List PV characteristic   # lspv hdisk1
List all the LV on the PV  # lspv -l hdisk1
List PP allocation by PV region  # lspv -p hdisk1
List PP allocation table      # lspv -M hdisk1

下列的過程描述瞭如何從一個failing disk移出資料 before it is removed for repair or replacement
1、首先確定source and destinatino PV are in the same VG
  # lsvg -p rootvg
2、a、make sure the disk is available
    # lsdev -Cc disk
   b、if the disk is listed and in the available state , make sure it does not belong to another VG
    # lspv
   c、if the disk is not listed or is not available,you need to check or install the disk
   d、add the new disk to the Vg
    # extendvg VGNAME hdisknumber
3、確定目標磁碟有足夠的空間可以容納源盤的內容
4、如果準備移動的資料所在的磁碟屬於rootvg:
  a、檢查是否 boot logical volume(BLV)也就是hd5在 sourec disk中
     # lspv -l sourcedisknumber | grep hd5
   如果在的話: # migratepv -l hd5 SourceDiskNumber DestinationDiskNumber
  注意: migratepv命令cannot migrate striped LV ,if htis is the case , to move data from one PV to another,use the cplv命令 to copy the data,and then use the rmlv command to remove the old copy
         migratepv command is not allowed if the VG is varied on in a concurrent mode
  b、在目標磁碟上執行bosboot命令
   當BLV is migrated from a PV ,the boot record on the source should be cleared ,Failure to clear this record may result in a system hang
  c、在源磁碟上執行bosboot -c命令 to clear the boot record on the source
    # bosboot -a -d /dev/DestinationDiskNumber
    # bootlist -m normal DestinationDiskNumber
    # mkboot -c -d /dev/SourceDiskNumber
5、如果你要移動的資料所在的磁碟屬於使用者定義的卷組
   # smitty migratepv
To remove source disk from the Vg ,such as when it is failing
   # reducevg VGNAME SourceDiskNumber
在物理的卸掉Source disk之前,執行
   # rmdev -l SourceDiskNumber -d

建立一個新的VG ,# mkvg 或 # smitty mkvg
當使用mkvg建立VG的時候,root filesystem 至少需要2MB的Free space才能夠保證VG成功建立

To make a VG to be varied on automatically each time a system is restarted
# chvg -ay newvg
Turn off the automatic varying on of the VG at system restart
# chvg -an newvg
Unlock a Vg
# chvg -u newvg
Add the PV hdisk3 to Vg newvg
# extendvg newvg hdisk3

The Vg must be varied on before it can be reduced
# reducevg myvg hdisk3
Remove a PV reference
# reducevg VG PVID
To remove the system definition of a VG from the ODM database,the VG need to be exported using the exportvg command,This command will not remove any user data in the VG ,but will only remove its definition from the ODM database
# exportvg myvg
# importvg –y myvg hdisk12
你也可以使用exportvg 和importvg來給一個使用者定義的卷組改名
  # varyoffvg vg00
  # exportvg vg00  (匯出前要先varrry off)
  # importvg –y cadsvg hdisk1
A VG that has a paging space volume on it cannot be exported while the paging space is active
在匯出一個包含活動的paging space的卷組的時候,首先:
  # chps –a n paging_space_name
然後重起系統,從而該paging space處於inactive的狀態
if you don’t activate the VG that contains file systems, or if you activated the VG through smitty importvg,It is highly recommended that you run the fsck command before you mount the file systems, if you are moving the VG to another system,be sure to unconfigure the disks before moving them
The smitty exportvg command deletes references to file system in /etc/filesystems,but it leaves the mount points on the system

啟用一個卷組:
# varyonvg newvg
Deactivate a Vg (The varyoffvg command will deactivate a VG and its associated LV,This requires that the LV be closed ,which requires that file systems associated with LV be unmounted,)
# varyoffvg myvg
List all the Vg known to the system
# lsvg
List the Vg that are currently active
# lsvg –o
List the characteristics of a VG
# lsvg rootvg
List the LV in a VG
# lsvg –l rootvg
List the PV status within a VG
# lsvg –p rootvg

使用reorgvg命令的兩個必要的條件:
1、VG must be varied on
2、Must have free partitions
The relocatable flag of each LV must be set to y using the chlv –r command for the reorganization to take effect,otherwise, the LV is ignored
注意:對於LV的relocatable必須用chlv -r設定成 y ,reorgvg命令對含條帶集的邏輯卷無效,同時在該卷組中至少包含一個自由的物理分割槽
To synchronize the copies on PV hdisk04 and hdisk05
  # syncvg –p hdisk04 hdisk05
To synchronize the copies on VG vg04 and vg05
  # syncvg –v vg04 vg05
# mklv newlv     建立邏輯卷
# rmlv newlv     刪除邏輯卷
# extendlv newlv 3  擴充套件該邏輯卷的邏輯分割槽(增加了3個LP)
使用cplv命令來拷貝一個邏輯捲到另外的新的磁碟或已經存在的邏輯卷
# cplv –v myvg –y newlv oldlv 該命令將拷貝oldlv的內容到一個新的邏輯卷newlv ,如果卷組沒有指定的話,該命令將在相同的卷組中建立一個新的邏輯卷
拷貝一個邏輯卷的內容到一個已經存在的邏輯卷(existinglv卷組中的資料將被覆蓋)
# cplv –e existinglv oldlv
如果卷組is varied on in concurrent mode的話,使用cplv命令來建立一個新的LV將失敗
# splitlvcopy –y newlv oldlv 2 (以前的oldlv的一個LP對應三個PP)
該命令執行後:
oldlv的一個LP對應兩個PP
newlv的一個LP對應一個PP
Before splitting LV ,You must unmount file system and close the LV
下列的LV在系統安裝的時候自動建立
hd5 :This is boot logical volume that holds the boot code, it is available only at system startup time
hd6: This is the default paging space logical volume that is used by the system to perform. paging.
hd8 : This LV is used as the default logging space for the JFS,一個分割槽,4MB
hd2 : This LV is used by the /usr file system
hd4 : This LV is used by the / root file system
hd9var  : This LV is used bye the /var file system
hd3:  This LV is used by the /tmp file system
hd1 :  This LV is used by the /home file system
# lslv newlv
每一個檔案系統都對應一個LV
建立一個檔案系統
# smitty crjfs
在載入檔案系統的時候一個常規的錯誤是無法使用pwd命令,通過設定加在點目錄的許可權至少為111可以解決這個問題
有兩種型別的automatic mounting
第一種:Those mounts that are required to boot and run the system,These file systems are explicitly mounted by the boot process. The stanzas of such file systems in the /etc/filesystems file have mount=automatic,
注意:
  如果在/etc/filesystems檔案中有定義且mount=automatic,則這些檔案系統將不受mount all 和umount all 命令的影響
型別二:
  The second type of automatic mount is user-controller,These file systems are mounted during initialization by the /etc/rc script. when it issues the mount all command, The stanzas of user-controller automatic mounts contain mount=true in /etc/filesystem
顯示當前所有載入的檔案系統
# mount
如果想刪除一個檔案系統,首先要umount it
  # umount filesystem_name
然後 # rmfs –r filesystem_name或使用 # smitty rmjfs 
使用df命令顯示當前檔案系統的大小
使用mksysb去減小一個檔案系統的大小
  在通過mksysb來恢復rootvg卷組的過程中,一個選項就是 shrink在磁碟上安裝的檔案系統,當選中這個選項時,在該卷組的LV和FS將按照容納資料的最小尺寸來重新建立LV和FS
使用者定義的卷組也可以通過 # restvg –s 來呼叫這個shrink的選項。
在載入檔案系統之前執行fsck,同時必須能夠讀the device file on which the file system reside
The logform. command initializes a LV for use as a JFS log device
執行該命令在一個檔案系統上將完全破壞該檔案系統上的資料,if a log device is open due to its use by a mounted file system, the file system should be unmounted prior to running logform. against the log device

Troubleshooting file system problems
1、Recovering from super block errors
  If you receive one of the following errors from the fsck or mount commands,The problem may be a corrupted superblock
  This problem can be resolved by restoring the backup of the superblock over the primary superblock using one of the following commands
  dd count=1 bs=4k skip=31 seek=1 if=/dev/lv00 f=/dev/lv00
The follow command works only for Aix version 4
fsck –p /dev/lv00
當恢復的程式結束後,使用 fsck /dev/lv00,在一般情況下,restoration of the backup of the superblock to the primary superblock will recover the file system ,if this does not resolve the problem, recreate the file system and restore the data from a backup
2、Cannot unmount file systems
情形一:、file are open within a file system
The fuser command is often the best way to determine what is still active in the file system,
  # fuser –xc /tmp
情形二:A kernel extension that is loaded but exist within the source file system,此時fuser命令將無法顯示kernel extension,通過genkex命令則可以顯示
情形三:在該檔案系統中仍然由檔案系統處於載入的狀態
情形四:一個程式正在使用該檔案系統中的一個目錄作為它當前的工作目錄

第六部分: Paging space
Paging space 的大小在AIX安裝系統定製的時候,要根據下列標準:
1、Paging space can use no less than 16MB,except for hd6,In AIX version 4.2.1,hd6 can use no less than 32 MB ,and in AIX Version 4.3 and later,no less than 64MB
2、Pagin space使用的空間不能超過總磁碟空間的20%
3、如果真實的物理記憶體小於256MB的話, Paging space is tow times real memory
4、if real memory is greater than or equal to 256MB, Paging space is 512MB
   或者使用公式:Total paging space=512+(memory size-256)*1.25
理想情況下,There should be serveral paging spaces of roughly equal size each on a different physical volume

可以利用vmstat和topas這兩個命令來獲得Paging space的狀態

  # lsps -a 提供 a snapshot of the current utilization of each of the paging spaces on a system
  # lsps -s 提供 a summary of the total active paging space and its current utilization

注意:避免增加paging space到一個行動式的硬碟上
Remove a disk that is online with an active paging space will require a reboot to deactivate the paging space and , therefore ,cause user disruption.

注意: In version prior to AiX 5L version 5.1,A VG that has a paging space volume on it cannot be varied off or exported while the paging space is active,Before deactivating a VG having an active paging space volume,ensure that the paging space is not activated automatically at system initialization and then reboot the system.

管理paging sapce的相關命令:
chps : change the attributes of a paging space
lsps:  Display the characteristics of a paging space
mkps:  creates an additional paging space
rmps:  remove an inactive paging space
swapon: Activates a paging space
swapoff : Deactivates one or more paging space

考點: Active paging space cannot be removed .To remove an active paging space ,it must first be made inactive
在AIX version to AIX version4.3 ,使用chps命令 so the paging sapce is not used on the next system restart,Then restart the system,此時,The paging space is inactive and can be removed using the rmps cmmand, IN Aix version 5.1 ,使用swapoff命令去動態deactivate the paging space,Then use the rmps command
  # swapon -a

Deactivate a paging space
AIX 5.1 deactivate a paging space and to decrease the size of a paging space without having to reboot
  # swapoff DeviceName  or # smitty swapoff

在AIX 4.3中:
# smitty chps  ---->>;reboot  ----->>; lsps -a

Decreasing the size of a paging space
AIX 5.1
# chps -d 2 paging03 不需要deactivate ,不需要reboot,
AIX4.3中
# 要deactivate it--->>; reboot ---->>; remove it --->>; recreate it

如果要刪除一個paging space

注意: remove default paging space incorrectly can prevent the system from restarting,You must deactivate the paging space before you can remove it , which require a reboot
check the primary dump device you are using by executing the command

# sysdumpdev -l
  you cannot remove the default dump device,you must change the default dump device to another paging space or LV before removing the paging space

刪除一個paging space  ( except hd6 )
  
deactivate it--->>; reboot ---->>; remove it

如果在AIX 5L中  
# swapoff /dev/paging00
# rmps paging00

管理預設的 paging space ( hd6 )

1、減小 hd6 paging space的大小 (在 AIX4.3或之前的版本 )

注意: 在AIX4.2.1 and later does not support reducing the size of hd6 below 32MB
第一步:mkps -a -n -s 30 rootvg hdisk0  (建立一個臨時的paging sapce)
第二步:chps -a n hd6 ( deactivate the hd6 )
第三步:將 /sbin/rc.boot中的 swapon /dev/hd6改成 swapon /dev/paging00
第四步:sysdumpdev -l ( check the primary dump device designation)
第五步:sysdumpdev -P -p /dev/paging00 (change the primary ……to paging00
第六步:bosboot -d /dev/hdisk -a ( Create a bootable image
第七步:shutdown -r
第八步:rmps hd6
第九步:mklv -t paging -y hd6 rootvg 30
第十步:sysdumpdev -P -p /dev/hd6
十一步:在/sbin/rc.boot檔案中將 ……改成 swapon /dev/hd6
十二步:bosboot -d /dev/hdisk0 -a
十三步:chps -a y hd6
十四步:chps -a n paging00
十五步:shutdown -r
十六步:rmps paging00
減小hd6 (在 AIX 5.1 )
# chps -d
  
Moving a paging space with the name hd6 from rootvg to another VG is not recommended because the name is hard-coded in serveral places

移動 hd6 paging space在相同的卷組中不需要重新啟動系統

# migratepv -l hd6 hdisk0 hdisk1

第七部分:System Backup ,restores and availability

使用tctl命令控制磁帶機

mksysb : create an installable image of the rootvg either in a file or onto a bootable tape
-e  Excludes files listed in the /etc/exclude.rootvg file from being backup up
-i  Call the mkszfile command , which generates the /image.data file automatically during a backup
-m  Call the mkszfile command to generate map files

savevg : The savevg command saves non-root VG

The mksysb command creates a bootable image of all mounted file systems on the rootvg
The tape format include a BOS boot image ,a BOS install image and a dummy table of contents(TOC)follow by the system backup(rootvg)

使用者定義的卷組和裸裝置不能用mksysb來備份

The BOS boot image contains a copy of the system's kernel and device drivers needed to boot from the mksysb tape,It is created by the bosboot command

There are three important files in the mkinsttape image:
./tapeblksz  contains the block size
./bosinst.data  allow you to specify the requirements at the target system and how the user interacts with the target system
./image.data  contain information describing the image installed during the BOS installation process,This information includes the size,names ,maps,and mount points of logical volumes and file systems in the rootvg

# mksysb -i 產生一個新的image.data on the tape during a backup( mkszfile命令產生的image.data)

The mksysb commmand creates a bootable image of the rootvg file system either in a file system directory onto a bootable tape,an is used to restore a system after a system failure or for system cloning

# savevg -if /dev/rmt0 uservg
使用tar備份目錄:
  進入該目錄,執行: # tar -cvf /dev/fd0 *
使用backup備份目錄:
  進入該目錄,執行: # find . -print ( or -depth ) | backup -i -f /dev/rmt0 (相對的路徑)恢復時使用restore
使用cpio備份目錄:  
#  cd /  
# find /userdirectory -print | cpio -o -c -v -B >; /dev/rmt0 (恢復時使用cpio -i) (絕對的路徑)

增量備份:
# backup -0 -uf /dev/rmt0 /home
# backup -1 -uf /dev/rmt0 /home

對於磁帶機:
Rewind the tape to the beginning by using the following
  # tctl -f /dev/rmt0 rewind ( mt 也可以 )

顯示在一個備份的媒質上的內容
# restore -T -d -v -q -s4 -f /dev/rmt0.1

恢復一個檔案:
# restore -x -d -v -q -s4 -f /dev/rmt0.1 ./etc/hosts
# tar -xvg /dev/rmt0 /etc/hosts
# cpio -i -c -v -d -u -m -B < /dev/rmt0 "/etc/hosts"  (注意多了一個 -d )
The following shows how to restore the file /etc/hosts from a backup that was made using the -i flag option during a backup by file sytem , notice the -d flag is used to restore the file
# restore -x -d -v -q -f /dev/rmt0 /etc/hosts
The following shows how to restore the file /etc/hosts when a file system backup was used to make the backup
# restore -x -v -q -f /dev/rmt0 /etc/hosts

恢復一個目錄:
先 tctl -f /dev/rmt0 rewind
# restore -x -d -v -s4 -f/dev/rmt0.1 ./var/dt
# tar -xvf /dev/rmt0 /var/dt
# cpio -i -c -v -d -u -m -B < /dev/rmt0 "/var/dt/*"

考點: 一個典型的錯誤發生在磁帶和系統之間移動資料的時候,是因為不正確的 Block size
使用 # tcopy /dev/rmt0 來決定 tape block size
      # dd if=/dev/rmt0 bs=128k count=1 | wc -c  來決定 tape block size
改變 tape block size 使用 # chdev -l rmt0 -a block_size=512
複製磁帶: # tcopy /dev/rmt0 /dev/rmt1
建立一個軟盤的copy:
  # dd if=/dev/fd0 f=/tmp/ddcopy
  # dd if=/tmp/ddcopy f=/dev/fd0

第九部分: SRC
啟動SRC:
  涉及到一個 /usr/sbin/srcmstr 程式,Remove the srcmstr daemon from the /etc/inittab file would cause these startsrc command to fail
  Make a record for the srcmstr daemon in the /etc/inittab file using the mkitab command
  # mkitab -i fbcheck srcmstr:2:respawn:/usr/sbin/srcmstr
  #telinit q

The syslogd daemon read the /etc/syslog.conf configuration file when it is activated or when it receives a hangup signal

If you decide to capture the warning messages from all users int hte /var/spool/syslog file,
1、 .warning    /var/spool/syslog (在 /etc/syslog.conf中加入相關資訊 )
2、 touch /var/spool/syslog   ( 建立該檔案 )
3、 chmod 666 /var/spool/syslog  ( 改變許可權使所有的使用者都可以寫資訊到該檔案 )
4、 refresh -s syslogd
安裝skuler command只需要將/var/spool/cron/crontabs/root檔案中的註釋去掉

第十部分: Newwork adminsitration
At IPL time, the /init process will run /etc/rc.tcpip after starting the SRC
The script. /etc/tcp.clean can be used to stop TCP/IP daemon, It will stop some daemons and remove the /etc/locks/lpd TCP/IP lock file
  Note that the /etc/tcp.clean does not stop the portmap and nfsd daemons ( 要使用stopsrc 和 startsrc )
該命令呼叫方法: # sh /etc/tcp.clean
注意:不要使用 # startsrc -g tcpip 來啟動TCP/IP daemons(它將同時啟動routed和gated)
Remove the rc.tcpip條目在/etc/inittab中將在IPL階段不會啟動任何 server application,如果使用的圖形終端,一定要確認刪除了rc.dt和rc.tcpip條目,否則系統將掛起

Inetd程式呼叫了inet.conf檔案,如果使用smit改變該/etc/inetd.conf的話,inetd程式自動refresh,如果使用vi來更新的話,則要使用refresh -s inetd 或者是 kill -l inetdPID來手工重新整理
subserver controlled by inetd in the inetd.conf檔案
# lssrc -ls inetd   列示啟動的subserver
When the inetd daemon is stopped, The previously started subserver processes are not affected , However , new service requests for the subservers can no longer be satisfied,此時,就不能telnet 或 ftp了
如果Inetd程式停止,已經存在的session將不會受到影響,但不會產生新的session

The protmap daemon converts remote procedure call (RPC) program numbers into Internet port numbers
When an RPC server starts up , it registers with the portmap daemon
  Since standard RPC servers are normally started by the inetd daemon,The portmap daemon must be started before the inetd daemon is invoked
注意: if the portmap daemon is stopped or comes to an abnormal end,all RPC servers on the hosts must be restarted, The nfsd is a common RPC server

The default order in resolving host names is :   1、 BIND/DNS (named) 2、NIS  3、/etc/hosts
通過建立/etc/netsvc.conf檔案可以改變該順序
通過設定NSORDER變數可以改變預設的和/etc/netsvc.conf檔案中的順序,NSORDER的優先順序最高
一個/etc/resolv.conf的例子:
# cat /etc/resolvl.conf
nameserver  9.3.1.12
domain      itsc.ibm.com
search      itsc.ibm.com  itse.ibm.com

確認named程式的狀態:  # lssrc -s named

插入一塊新的網路卡後需要的配置步驟:(基於硬體的配置)
1、必要的話重新呼叫cfgmgr命令來載入硬體
2、smitty devices安裝驅動軟體
3、# diag -a 確認新的網路卡已經加入到硬體配置中了
4、再次執行cfgmgr
5、# lsdev -cl ent0 確認該網路卡處於available的狀態
6、使用 # smitty inet來配置nework interface,不要使用smitty mktcpip,It is used for configuration TCP/IP for the first time

To change advanced feature of network adapters
# smitty chgenet
To configure TCP/IP
# smitty tcpip
To change/show Characteristics of a nework interface
# smitty chinet

Enable IP forwarding:
no -o ipforwarding=1

配置IP地址: # smitty mktcpip

Identify network interface on your server
# lsdev -Cc if
This will list of all interfaces on the system,whether they are being actively or not

  或者使用 # ifconfig -a
This will produce a list of all network interfaces on the system that have ip addresses and are actively

To get information about one specific network interface
  # ifconfig en0
To activate a network interface
  # ifconfig tr0 up
  # ifconfig tr0 10.32.1.1 netmaski 255.255.255.0 up (同時分配一個IP address)
To deactivate a network interface
  # ifconfig tro down
To delete an address from a network interface
  # ifconfig tro delete ( this command does not place the interface in the down state,nor does it remove the interface from the work interface list )
To remove the interface tro from the network interface list
# ifconfig tr0 detach ( This command remove  all network addresses assigned to the interface and removes the interface from the output of the ifconfig -a command,To add an interface back to the system , or to add a new interface to the newwork interface list  , run  # ifconfig Interface

考點: 給一塊網路卡綁兩個IP address :
  # ifconfig tr0 10.32.1.1 netmask 255.255.255.0 alias
刪掉該IP  # ifconfig tr0 10.32.1.1 netmask 255.255.255.0 delete

MTU to small    :may be lost during transmission
MTU to length   :may be collide with other packets
如何看一塊網路卡的MTU ( 同一個LAN中必須有相同的MTU)
# lsattr -El en0
調整MTU的大小:
# ifconfig en0 mtu 12000

Example of trusted daemons :  ftpd  , rexecd , telnetd
Example of non-trusted daemons  :  rshd , rlogind , tftpd

The $HOME/.netrc 檔案
   Contains information used by the automatic login feature of the rexec and ftp command , 該檔案的許可權必須設定成600
The /etc/hosts.equiv and $HOME/.rhosts 檔案
  Define the hosts and user accounts that can invoke remote commands on a local host without supplying a password,先檢查/etc/hosts.equiv後檢查$HOME/.rhosts
  如果一個遠端的命令由root使用者所發出,/etc/hosts.equiv檔案被忽略,只有 /.rhosts 檔案被檢查,同樣,這兩個檔案的許可權應該設定成600

為了安裝匿名的FTP在一個伺服器上(執行AIX 5L)
   # /usr/samples/tcpip/anon.ftp
To enable FTP logging
1、編輯 /etc/syslog.conf檔案增加該條目  daemon.info FileName ,在執行下一步之前該檔案必須存在
2、執行 # refresh –s syslogd
3、編輯 /etc/inetd.conf 修改包含ftp的那一行
4、執行 # refresh –s inetd
可以使用 # uname –n 命令來顯示系統的主機名
   # uname  可以顯示你使用的是什麼作業系統
網路問題的決定:
  考點:當 Paging space may be full or not enough memory 的時候,如果一個使用者嘗試telnet或者是ftp 到系統,There will be time out as the system cannot create additional processes
  考點:一個檔案系統可能滿了
如果一個使用者可以訪問系統,但該使用者不能啟動 Web based system manager,可能是/tmp檔案系統滿了

第十一部分 Network File System administration
The /usr/sbin/nfsd daemon on the server
The /usr/sbin/biod daemon on the client
The /usr/sbin/rpc.mountd daemon on the server
The /usr/sbin/mount command on the client
要啟動NFS daemon程式在每一個系統,無論是伺服器還是客戶機:
  # smitty mknfs
或者使用  # mknfs –N
使用下面的步驟配置一個NFS Server
1、啟動NFS daemon (如果沒有啟動的話)
# startsrc –s nfsd ( 啟動 nfsd程式 ) 或使用  # startsrc –g nfs   (啟動 All of the NFS daemons )
注意: 如果/etc/exports 檔案不存在的話,The nfsd 和 rpc.mountd程式將不會啟動,你可以建立一個空的/etc/exports 檔案 # touch /etc/exports ,從而nfsd和rpc.mountd程式就可以啟動了
匯出一個NFS目錄方法一:
1、確認NFS程式已經執行了
# lssrc –g nfs
2、使用 # smitty mknfsexp 去匯出目錄
3、匯出後,使用 # /usr/sbin/exportfs –a : tell the exportfs command to send all information in the /etc/exports file to the kernel
4、確認所有的檔案系統已經被匯出   # showmount –e CROOM
匯出一個NFS目錄方法二:
  # vi /etc/exports    建立條目在該檔案中,List each directory to be exported in the left margin,
  OK 後 執行 # /usr/sbin/exportfs –a
臨時匯出一個目錄:
# exportfs –i /dirname   
Unexporting an NFS directory
# smitty rmnfsexp   從而該目錄的條目從/etc/exprots檔案中刪掉
你也可以使用vi來Unexprot 一個目錄 然後執行 # exprotfs –u dirname

Mounting an NFS directory
由三種型別的NFS Mount
1、預定義的載入指定在 /etc/filesystems檔案中
2、explict mounts serve the needs of the root user,,不需要升級/etc/filesystems檔案
3、Automatic mounts are controlled by the automount command,
NFS 載入的過程:
1、When the server starts , the /etc/rc.nfs script. runs the exportfs command , which reads the server /etc/exports file and then tells the kernel which directory are to be exported and which access restrictions they require.
2、The rpc.mountd daemon and several nfsd daemons are then started by the /etc/rc.nfs script
3、When the client start, the /etc/rc.nfs script. starts several biod daemons, which forward client mount request to the appropriate server
4、Then the /etc/rc.nfs script. executes the mount command , which reads the file systems list in the /etc/filesystems file
5、The mount command locates one or more servers that export the information the client wants and sets up communication between itself and that server
6、The mount command then request that one or more servers allow the client to access the directory in the client /etc/filesystem file
7、The server rpc.mountd daemon receives the client mount requests and either grants or denies them , if the requested directory is available to that client
8、The client kernel then ties the file handle to the mount point by recording certain information in a mount record
載入方法一:
編輯/etc/filesystem
方法二: # smitty mknfsmnt
確認The NFS Server has exported the directory:
  # showmount –e ServerName

自動載入一個檔案系統
1、showmount –e ServerName
2、建立一個對映檔案 /tmp/mount.map
3、# lssrc –s automountd 確認該程式已經啟動
4、 /usr/sbin/automount –v /backup /tmp/mount.map
5、可以 # cd /backup了 ( 自動載入成功 )
6、
為了得到所有的NFS程式的狀態
   # lssrc –g nfs   

改變一個匯出的檔案系統
在做改變時要先 unexport   # exportfs –u /dirname
然後  # smitty chnfsexp
然後再次匯出   # exportfs /dirname

使用文字編輯器改變一個匯出的檔案系統
1、exportfs –u /dirname
2、vi /etc/exportfs   改變相應的內容儲存退出
3、重新匯出 # exportfs /dirname

To Unmount an explicitly or automatically mounted NFS directory ,
  # umount /backup
The rmfs command can be used to remove any file systems you created

相關的檔案,命令和程式的參考:
/etc/exports   List the directories that can be exported to NFS clients
/etc/xtab     List the directories that are currently exported
/etc/filesystems    List all file systems that can potentially be mounted and their mounting configuration.
在診斷NFS的問題的時候,如果要確認 the server is up and running (在客戶端執行)
# /usr/bin/rpcinfo –p server_name
確認 the mountd, portmap ,and nfsd daemons are running on the NFS server
# /usr/bin/rpcinfo –u server_name mount
# /usr/bin/rpcinfo –u server_name portmap
# /usr/bin/rpcinfo –u server_name nfs
確認在伺服器上的/etc/exports 檔案列出了要載入的檔案系統的名字
確認在伺服器上已經匯出了該檔案系統 # showmount –e ServerName
nfsstat命令決定現在是否丟包  nfsstat –c and nfsstat –s 命令來決定客戶機和伺服器是否在重傳大包, 重傳率達到5%就是很高了

NFS 的錯誤資訊
1、if a server fails to respond to a hard-mounted request
顯示資訊:   ……………… not respond
2、If a server fails to respond to a soft-mount request
顯示資訊:  ……………… time out
3、Bad sendreply error message
Insufficient transmit buffers on your network can cause the following error message
顯示資訊: nfs_server : bad sendreply
為了增加transmit buffers , # smitty commodev
4、Server not responding
首先看看NFS程式是否啟動或是否停止了,如果mountd或者是nfsd程式被停止了或是沒有啟動在伺服器上的話,當客戶端欲mount filesystem的時候將會出錯

如果rpc.mountd程式在啟動後停止了,解決方法:
1、telnet 到伺服器
2、cd /etc
3、# stopsrc –g nfs
4、# stopsrc –s portmap
5、rm –rf state sm sm.bak xtab rmtab
6、startsrc –s portmap
7、startsrc –g nfs
8、exportfs –a
9、showmount –e servername
考點:
  A file system name that appears in the /etc/exports file but not in the output from the showmount command ,說明 a failure in the mountd daemon , either the daemon could not parse that line in the file , it could not find the directory, or the directory name was not a locally mountd directory, If the /etc/exports file looks correct and your network runs NIS , check the server’s ypbind daemon , it may be stopped or hung

NFS mounts and unmount are only allowed for root user and members of the system group



















第十五部分 Sendmail and E-mail
Mail system provides two user interfaces : mail and mhmail
The sendmail command is a daemon that uses information in the /etc/sendmail.cf , /etc/aliases, /etc/sendmail.nl ,並通過syslogd daemon來記錄郵件系統的活動,The syslogd daemon must be configured and running for logging to occur  ( 看/etc/syslog.conf檔案要包含mail.debug    /var/spool/mqueue/log 這一行, ,還要有/var/spool/mqueue/log檔案,如果沒有的話用touch建立)

啟動sendmail
  # startsrc –s sendmail或者是 /usr/lib/sendmail
停止sendmail程式
  # stopsrc –s sendmail 或者是 # ps –ef | grep sendmail    然後  # kill –9 sendmail_PID
重新整理sendmail程式:
  # refresh –s sendmail
得到sendmail 程式的狀態
  # lssrc –s sendmail
在系統啟動時自動啟動sendmail:編輯/etc/rc.tcpip,刪掉和sendmail有關行的註釋
注意在/etc/rc.tcpip中的QPI的值可以改變 ( Query Porcess Intervel )
To process the queue every 15 days
  # /usr/sbin/sendmail –q15d
to process the queue every 15 hours
  # /usr/sbin/sendmail –q15h
To process the queue every 15 miniutes
  # /usr/sbin/sendmail –q15  (如果不指定的話,預設是minute 分鐘 )
Mail Queue Directory : /var/spool/mqueue
如果你想列印該佇列 : 用mailq 或者 sendmail –bp
Force the mail queue to run  : # /usr/sbin/sendmail –q –v

/etc/aliases檔案必須包含以下三個別名:
   MAILER-DAEMON
   Postmaster
   Nobody
當編輯了/etc/aliases檔案建立了別名列表後,要rebuild the alias database才可以使用別名
  執行 sendmail –bi 或者是newaliases

在使用者的宿主目錄建立一個檔案.forward同樣可以用來轉發郵件

mail  顯示系統信箱
mail –f 顯示個人信箱
mail –f+folder 顯示一個郵件目錄
mail user@address  給使用者發郵件

第十六部分 Online Documentation
For the client: (需要安裝的軟體)
A、A web browser
B、The bos.docsearch.client.*
For the documentation server
A、The entire bos.docsearch.package
B、The documentation libraries
C、A Web browser
D、A web server
安裝Documentation 的方法:
  方法一:configuration assistant taskguide  執行 # configassist
  方法二:web_based systems service
  方法三:SMIT
For a documentation clients,::
you need only a web browser , installation of the bos.docsearch.client fileset will give you the CDE desktop icon and the docsearch command
在客戶端: http://server_name:port_number/cgi-bin/ds_form
在命令列敲入該命令/usr/prod/bin/netscape將設定newscape為預設的瀏覽器

第十七部分 The AIXwindows font server
這一章主要記住:
   當對/usr/lib/x11/fs/config檔案做了改變時,首先要執行xfsconf ( 一個shell指令碼 )然後啟動fontserver
# startsrc –s xfg

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/235507/viewspace-628507/,如需轉載,請註明出處,否則將追究法律責任。

相關文章