AIX 第四天偶记

来源:互联网 发布:visio 2017 for mac 编辑:程序博客网 时间:2024/05/06 12:38
匿名FTP:

[p275:root:/] find / -name 'ano*'
/etc/security/ice/scripts/anonymousftp
/home/anonymou
find: 0652-023 Cannot open file /proc/5439654.
find: 0652-023 Cannot open file /proc/5767378.
find: 0652-023 Cannot open file /proc/5963970.
/usr/lpp/bos/inst_root/etc/security/ice/scripts/anonymousftp
/usr/samples/tcpip/anon.ftp
/usr/samples/tcpip/anon.users.ftp
[p275:root:/] cat /usr/samples/tcpip/anon.ftp
#! /bin/sh
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#  
# tcpip610 src/tcpip/usr/samples/tcpip/anon.ftp 1.14
#  
# Licensed Materials - Property of IBM
#  
# COPYRIGHT International Business Machines Corp. 1985,1989
# All Rights Reserved
#  
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#  
# IBM_PROLOG_END_TAG
# @(#)68        1.14  src/tcpip/usr/samples/tcpip/anon.ftp, tcpip_samples, tcpip610 9/12/97 10:56:07
#
# COMPONENT_NAME: TCPIP anon.ftp
#
# FUNCTIONS:
#
# ORIGINS: 27
#
# (C) COPYRIGHT International Business Machines Corp. 1985, 1989
# All Rights Reserved
# Licensed Materials - Property of IBM
#
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#
#
#           NOTICE TO USERS OF THE SOURCE CODE EXAMPLES
#
# INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THE SOURCE CODE
# EXAMPLES, BOTH INDIVIDUALLY AND AS ONE OR MORE GROUPS, "AS IS" WITHOUT
# WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
# LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
# PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE
# OF THE SOURCE CODE EXAMPLES, BOTH INDIVIDUALLY AND AS ONE OR MORE GROUPS,
# IS WITH YOU.  SHOULD ANY PART OF THE SOURCE CODE EXAMPLES PROVE
# DEFECTIVE, YOU (AND NOT IBM OR AN AUTHORIZED RISC System/6000* WORKSTATION
# DEALER) ASSUME THE ENTIRE COST OF ALL NECESSARY SERVICING, REPAIR OR
# CORRECTION.
#
#  RISC System/6000 is a trademark of International Business Machines
#   Corporation.
#
#
#
#       Shell script to create login account for anonymous ftp users:
#       'ftp' and 'anonymous'.  One account is created, but both login
#       names are set up to use the same account (same UID and $HOME).
#       Note that the real login name of 'anonymous' is 'anonymou'.
#

CMD=`basename $0`
PATH=/etc:/bin:/usr/bin
export PATH
TERM=ibm6153
export TERM
umask 0

if [ -z "`/usr/bin/id | /bin/grep 'uid=0'`" ]
then
        echo 'sorry, you must be root to run this script.'
        exit
fi

if [ -n "`/bin/grep '^ftp:' /etc/passwd`" ]
then
        echo 'Warning: user "ftp" already exists, proceeding anyway.'
fi

if [ -n "`/bin/grep '^anonymou' /etc/passwd`" ]
then
        echo 'Warning: user "anonymous" already exists, proceeding anyway.'
fi

echo 'Creating anonymous ftp user.'

#  Now run the mkuser command to create user 'ftp'.
/bin/mkuser ftp 1>/dev/null
echo 'Added user ftp.'

#  get the home directory of ftp user from /etc/passwd.
FTPHOME=`awk -F: '/^ftp:/{print $6}' /etc/passwd`

#
# make sure that FTPHOME is reasonable, to protect against
# outherwise disastrous results.
#
if [ -z "$FTPHOME" ]; then
        echo 'ftp login directory not set.'
        exit 1;
fi

if [ ! -d "$FTPHOME" ]; then
        echo "$FTPHOME: not a directory."
        exit 1
fi

case $FTPHOME in
    /|/etc|/bin|/usr|/usr/bin|/dev)
        echo "$FTPHOME: not a wise choice."
        exit 1
        ;;

    *)
        /bin/echo -n "Are you sure you want to modify $FTPHOME? "
        read answer
        case x$answer in
            x[Yy]*)
                ;;
        
            *)
                exit 1
                ;;
        esac
        ;;
esac

#  Now run the mkuser command to create user 'anonymous'
/bin/mkuser anonymou 1>/dev/null
echo 'Added user anonymous.'

#  Change home directory for anonymous user to ftp's home directory
/bin/chuser "home=$FTPHOME" anonymou

# make $FTPHOME/bin directory
cd $FTPHOME
mkdir bin
chown root bin
cp /bin/ls $FTPHOME/bin/ls
chmod 111 $FTPHOME/bin/ls
chmod 555 $FTPHOME/bin
chgrp system $FTPHOME/bin
echo "Made $FTPHOME/bin directory."

# make $FTPHOME/etc directory
mkdir etc
chown root etc
chmod 555 etc
chgrp system $FTPHOME/etc
if [ -f /etc/nls/ctab/default ]
then
        mkdir etc/nls
        mkdir etc/nls/ctab
        cp /etc/nls/ctab/default etc/nls/ctab/default
        chmod 2755 $FTPHOME/etc/nls
        chmod 2755 $FTPHOME/etc/nls/ctab
        chown root $FTPHOME/etc/nls
        chgrp system $FTPHOME/etc/nls
        chown root $FTPHOME/etc/nls/ctab
        chgrp system $FTPHOME/etc/nls/ctab
        chown root $FTPHOME/etc/nls/ctab/default
        chgrp system $FTPHOME/etc/nls/ctab/default
fi
echo "Made $FTPHOME/etc directory."

# make $FTPHOME/pub directory
mkdir pub
chmod 777 pub
chgrp system $FTPHOME/pub
echo "Made $FTPHOME/pub directory."

# make $FTPHOME/lib directory
mkdir lib
chmod 555 lib
chgrp system $FTPHOME/lib
cp /lib/libc.a lib/libc.a
cp /lib/libcurses.a lib/libcurses.a
cp /lib/libcrypt.a lib/libcrypt.a
echo "Made $FTPHOME/lib directory."

# make $FTPHOME dev/null entry
mkdir dev
#do equiv of mknod dev/null c 2 2
/usr/sbin/mknod dev/null c $(ls -l /dev/null | awk '{print $5, $6}' | tr -d ,)
chmod 555 dev
chown root dev
chgrp system dev
echo "Made $FTPHOME/dev/null entry."

# make $FTPHOME message catalog directory
mkdir usr
mkdir usr/lpp
mkdir usr/lpp/msg
mkdir usr/lpp/msg/$LANG
chmod 555 usr
chown root usr
chgrp system usr
chmod 555 usr/lpp
chown root usr/lpp
chgrp system usr/lpp
chmod 555 usr/lpp/msg
chown root usr/lpp/msg
chgrp system usr/lpp/msg
chmod 555 usr/lpp/msg/$LANG
chown root usr/lpp/msg/$LANG
chgrp system usr/lpp/msg/$LANG
if [ -f /usr/lpp/msg/$LANG/ls.cat ]
then
cp /usr/lpp/msg/$LANG/ls.cat usr/lpp/msg/$LANG/ls.cat
fi
echo "Made $FTPHOME/usr/lpp/msg/$LANG directory."

# fix up ftp's root directory
chmod 555 $FTPHOME
chown root $FTPHOME
[p275:root:/]

SystemDirector6.2.1支持linux,支持windows,支持aix,还支持交换机

WSM不支持aix7.1
在smit中选择到最后一页 esc+>
返回到第一页 esc+<

vi中页首:1
vi中页尾:$

/etc/ssh/sshd_config 中可以配置ssh用户的登录

#premitRootlogin Root YES 修改为NO,去掉#即可

AIX5.3 5300-03 开始支持 NFSv4 副本功能。

NFSv4 的副本功能允许用户在多个 NFS 服务器上放置文件副本,并通过配置实现当某个主服务器上的 NFS 不可用时,客户端可以自动切换到备份服务器。虽然 NFSv4 副本功能不提供数据同步的考虑,用户需要自己保证各个服务器上的复本的一致性,但是对于提供只读 (Read Only) 或者以读为主 (Read Intensive) 的文件共享来讲,NFSv4 副本功能可以作为一种简单的、易于配置、易于维护和稳定的高可用性方案。


所有 LV 和 VG 的所有关系都存储在 AIX 系统的 ODM 中。其实这个就像是数据库中数据的关系表一样,环环相扣。


Pconsole https://192.168.1.88:5336/ibm/console/
root/root

安装完AIX后,需要
[p275:root:/etc/security] pwd
/etc/security
[p275:root:/etc/security] vi limits

default:
        fsize = -1
-1代表不受文件大小限制。

loopmount -i aix61.iso -o "-V cdrfs -o ro" -m /mnt

DCEM 分布式命令执行管理

SMS模式就是PC BIOS

SMS中setup remote IPL(Initial Program Load) 配置网卡

看当前级别 who -r

操作系统中bootlist -m normal -o 管理下次引导的normal模式
bootlist -m normal hdisk1
bootlist -m normal hdisk0 hdisk1 hdisk2
bootlist -m normal emt0 bserver=


alog -t boot -o|more 查看启动日志信息

alog -ot bosinst|more 查看操作系统安装过程

进程ID都是偶数

which init? /etc/init
ping也在/etc/中,是一个链接文件,只想/usr/sbin

inittab文件注释是:,不是#

id:runlevel:action:command

建议/etc/inittab备份一份,因为此文件清空或出错后,系统无法启动

init:2:initdefault 系统缺省运行级别2,也就是多用户模式

id不能超过14个字符

安装HACMP5.5之前的时候,需要将其将运行级别变换为a,5.5后不再提供

active中wait是一直等待返回码为0才继续,respawn是监护其必须启动,如果进程挂掉那么就再叫起来,总之不能死,是杀不死的进程

mkitib 并不是创建一个inittab文件,而是创建一行
mkitab "tty002:2:respawn:/usr/sbin/getty /dev/tty2“

lsitab -a |grep clinfo  此命令列出所有的,但是依然有问题,会常常将HACMP里面的clinfo漏掉部分pid列不出,这样需要lssrc -s clinfo列出

lssrc -a |grep cd

lssrc -ls inetd 用此命令的-ls参数可以将有子系统的服务查询出出来

lssrc -g spooler 将以组的形式列出来。

startsrc -s lpd 启动lpd服务
stopsrc -g spooler 停止一组服务


stopsrc -t ftp 停止ftp服务,已经连上的不会断掉,但新连的上不来
startsrc -t ftp

更改了配置文件后重新读下配置信息:refresh -s sshd




原创粉丝点击