[ssdb01.shz.hn|oracle|/home/oracle]$oslevel -rq 

--查看系统已安装的维护级别
Known Recommended Maintenance Levels
------------------------------------
5300-09
5300-08
5300-07
5300-06
5300-05
5300-04
5300-03
5300-02
5300-01
5390-00

 

 

root@db:/usr/sys/inst.images#bootlist -m normal -o

查看启动系统的磁盘hdisk0 blv=hd5
hdisk1 blv=hd5

 

 

 

root@db:/usr/sys/inst.images#lsvg -l rootvg       

查看rootvg是否有镜像    当PPs是LPs的两倍,代表有镜像
rootvg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
hd5                 boot       1       2       2    closed/syncd  N/A
hd6                 paging     210     420     2    open/syncd    N/A
hd8                 jfs2log    1       2       2    open/syncd    N/A
hd4                 jfs2       160     320     2    open/syncd    /
hd2                 jfs2       80      160     2    open/syncd    /usr
hd9var              jfs2       40      80      2    open/syncd    /var
hd3                 jfs2       16      32      2    open/syncd    /tmp
hd1                 jfs2       1       2       2    open/syncd    /home
hd10opt             jfs2       16      32      2    open/syncd    /opt
lg_dumplv           sysdump    12      12      1    open/syncd    N/A
lg_dumplv0200       sysdump    12      12      1    open/syncd    N/A

 

 

 

root@db:/usr/sys/inst.images#lsdev -Cc adapter

--查看支持的适配器类型

ent0    Available 03-08 2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)
ent1    Available 03-09 2-Port 10/100/1000 Base-TX PCI-X Adapter (14108902)
ent2    Available 04-00 2-Port 10/100/1000 Base-TX PCI-Express Adapter (14104003)
ent3    Available 04-01 2-Port 10/100/1000 Base-TX PCI-Express Adapter (14104003)

--网络适配器

ent4    Available       Logical Host Ethernet Port (lp-hea)
ent5    Available       Logical Host Ethernet Port (lp-hea)

fcs0    Available 05-00 4Gb FC PCI Express Adapter (df1000fe)
fcs1    Available 07-00 4Gb FC PCI Express Adapter (df1000fe)

--光纤存储卡(用于服务器与阵列柜的连接)

lhea0   Available       Logical Host Ethernet Adapter (l-hea)
sa0     Available 02-08 2-Port Asynchronous EIA-232 PCI Adapter
sissas0 Available 00-08 PCI-X266 Planar 3Gb SAS Adapter
usbhc0  Available 01-08 USB Host Controller (33103500)
usbhc1  Available 01-09 USB Host Controller (33103500)
usbhc2  Available 01-0a USB Enhanced Host Controller (3310e000)
vsa0    Available       LPAR Virtual Serial Adapter

 

 

root@db:/usr/sys/inst.images#lsdev -Cc if

--直接查看网络适配器   -if  表示 interface  -C表示已经定制的 (Customized)  -c表示class (类别)

en0 Available 03-08 Standard Ethernet Network Interface
en1 Available 03-09 Standard Ethernet Network Interface
en2 Defined   04-00 Standard Ethernet Network Interface
en3 Defined   04-01 Standard Ethernet Network Interface
en4 Defined         Standard Ethernet Network Interface
en5 Defined         Standard Ethernet Network Interface
et0 Defined   03-08 IEEE 802.3 Ethernet Network Interface
et1 Defined   03-09 IEEE 802.3 Ethernet Network Interface
et2 Defined   04-00 IEEE 802.3 Ethernet Network Interface
et3 Defined   04-01 IEEE 802.3 Ethernet Network Interface
et4 Defined         IEEE 802.3 Ethernet Network Interface
et5 Defined         IEEE 802.3 Ethernet Network Interface
lo0 Available       Loopback Network Interface

 

 

 

root@db:/usr/sys/inst.images#smit chgenet

--查看/更改网络适配器信息

 

AIX 第3章 指令记录_#if

 

root@db:/usr/sys/inst.images#smit tcpip

--smit tcpip--Minimum Configuration & Startup

--网络接口、主机名、TCP/IP地址、网关等信息查看及配置

AIX 第3章 指令记录_配置文件_02

 

root@db:/usr/sys/inst.images#ifconfig -a

--查看系统中已分配ip地址的网络接口

en0: flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN>
        inet 10.136.6.222 netmask 0xffffff00 broadcast 10.136.6.255
         tcp_sendspace 131072 tcp_recvspace 65536 rfc1323 0
en1: flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN>
        inet 10.136.10.134 netmask 0xffffff00 broadcast 10.136.10.255
         tcp_sendspace 131072 tcp_recvspace 65536 rfc1323 0
lo0: flags=e08084b<UP,BROADCAST,LOOPBACK,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT>
        inet 127.0.0.1 netmask 0xff000000 broadcast 127.255.255.255
        inet6 ::1/0
         tcp_sendspace 131072 tcp_recvspace 131072 rfc1323 1

 

 

root@db:/usr/sys/inst.images#ifconfig en0

--查看特定的网络接口
en0: flags=5e080863,c0<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),PSEG,LARGESEND,CHAIN>
        inet 10.136.6.222 netmask 0xffffff00 broadcast 10.136.6.255
         tcp_sendspace 131072 tcp_recvspace 65536 rfc1323 0

 

root@db:/usr/sys/inst.images#ifconfig en0 up

--激活特定接口

 

root@db:/usr/sys/inst.images#ifconfig en0 down

--关闭网卡接口(关闭操作不代表会将接口上设置好的地址删除,只是不启用这个接口)

 

root@db:/usr/sys/inst.images#ifconfig en0 delete

--删除网络接口上的ip地址

 

root@db:/usr/sys/inst.images#ifconfig en0 192.168.1.123 netmask 255.255.255.0 up

--给en0分配ip地址并激活

 

root@db:/#lssrc -g tcpip

--查看TCP/IP组的相关服务  -g 表示group

Subsystem         Group            PID          Status
hostmibd         tcpip            82386        active
snmpd            tcpip            70576        active
aixmibd          tcpip            127184       active
snmpmibd         tcpip            82632        active
muxatmd          tcpip            99278        active
inetd            tcpip            197242       active
rwhod            tcpip                         inoperative
xntpd            tcpip                         inoperative
dpid2            tcpip                         inoperative
dhcpcd           tcpip                         inoperative
dhcpcd6          tcpip                         inoperative
ndpd-host        tcpip                         inoperative
ndpd-router      tcpip                         inoperative
tftpd            tcpip                         inoperative
gated            tcpip                         inoperative
named            tcpip                         inoperative
routed           tcpip                         inoperative
iptrace          tcpip                         inoperative
timed            tcpip                         inoperative
dhcpsd           tcpip                         inoperative
dhcpsdv6         tcpip                         inoperative
dhcprd           tcpip                         inoperative
mrouted          tcpip                         inoperative
pxed             tcpip                         inoperative
binld            tcpip                         inoperative
dfpd             tcpip                         inoperative

 

 

inetd服务是众多Internet服务的管理程序,其配置文件中定义了那些internet服务会启动,启动inetd后,inetd服务(守护进程)会侦听客户端的连接请求,并在接受请求后,调用适当的服务程序进行处理

 

root@db:/#lssrc -s inetd

查看特定服务的状态   -s status
Subsystem         Group            PID          Status
inetd            tcpip            197242       active

 

root@db:/#startsrc -s inetd

--手工启动inetd服务

root@db:/#stopsrc -s inetd

--手工关闭inted服务

 

root@db:/#refresh -s inetd

--在修改了/etc/inetd.conf文件后,使用此命令进行刷新

 

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

root@db:/#lssrc -t ftp

--查看ftp服务状态

 

root@db:/#vi /etc/inetd.conf

--编辑配置文件将ftp哪行注释

 

root@db:/#refresh -s inetd

--刷新配置文件

 

root@db:/#lssrc -t ftp

--再次查看ftp专题

 

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

root@db:/# vi /etc/services

--可编辑此文件来修改Internet服务的服务端口

 

root@db:/#refresh -s inetd

--刷新配置文件

 

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

 

 

/etc/passwd文件记录用户定义列表

/etc/security/passwd文件记录相应的用户密码信息

 

mkuser--创建用户

 

passwd--设置密码(UINX通用指令)

pwdadm--设置密码(AIX特有指令)

 

chuser 修改用户属性,不包括密码

 

lsuser 查看用户属性

 

rmuser 删除用户

 

who 确定当前登录进来的用户

 

 

root@db:/#cat /etc/security/lastlog |more

--查看最后一次登录的信息,(成功的IP,失败的IP,成功的时间等信息)

 

root@db:/#vi /etc/security/limits

--查看用户的资源限制信息

 

root@db:/#vi /etc/motd

--修改登录AIX的欢迎词

 

 

 

root@db:/#lsuser oracle

--查看用户属性
oracle id=500 pgrp=oinstall groups=oinstall,dba,asmadmin home=/oracle2 shell=/usr/bin/ksh login=true su=true rlogin=true daemon=true admin=false sugroups=ALL admgroups= tpath=nosak ttys=ALL expires=0 auth1=SYSTEM auth2=NONE umask=22 registry=files SYSTEM=compat logintimes= loginretries=0 pwdwarntime=0 account_locked=false minage=0 maxage=0 maxexpired=-1 minalpha=0 minother=0 mindiff=0 maxrepeats=8 minlen=0 histexpire=0 histsize=0 pwdchecks= dictionlist= fsize=-1 cpu=-1 data=-1 stack=-1 core=2097151 rss=65536 nofiles=2000 time_last_login=1372709813 time_last_unsuccessful_login=1374957561 tty_last_login=/dev/pts/0 tty_last_unsuccessful_login=/dev/pts/1 host_last_login=10.136.5.165 host_last_unsuccessful_login=10.136.33.201 unsuccessful_login_count=10 roles=

 

root@db:/#who /var/adm/wtmp |more

--使用who命令查看/etc/utmp  /var/adm/wtmp /etc/security/failedlogin等文件信息

 

root@db:/#chsh

改变用户的shell
Current available shells:
                /bin/sh
                /bin/bsh
                /bin/csh
                /bin/ksh
                /bin/tsh
                /bin/ksh93
                /usr/bin/sh
                /usr/bin/bsh
                /usr/bin/csh
                /usr/bin/ksh
                /usr/bin/tsh
                /usr/bin/ksh93
                /usr/bin/rksh
                /usr/bin/rksh93
                /usr/sbin/uucp/uucico
                /usr/sbin/sliplogin
                /usr/sbin/snappd
root's current login shell:
                /usr/bin/ksh
Change (yes) or (no)? > no
Login shell not changed.