Você está na página 1de 10

LINUX(RedHat) Root filesystem / {/dev/sda1}

AIX Filesystem Mapping / {/dev/hd4} /home {/dev/hd1} /tmp {/dev/hd3} /usr {/dev/hd2} /var {/dev/hd9var} User Management /etc/passwd /etc/security/passwd /etc/group /etc/security/group 65535 4294967295 /etc/security/user {rlogin=true} 1.) Boot from install media 2.) Start Maintenance Mode for system recovery 3.)Select "Access this volume group and start a shell" 4.) Use passwd command to set new password 5.) Enter sync command thrice and reboot system

Home Directory

Password files Group file Maximum number of user ID Allow / Deny remote login

/etc/passwd /etc/shadow /etc/group /etc/securetty {ttyp1} 1.) Boot from install media 2.) Enter Linux Rescue mode

3.) cd /mnt/sysimage/etc Recover root password 4.) vi passwd

Create new user Delete user List users Modify user account Unique host ID Administrator Performance monitor System activity reporter Virtual Memory statistics I/O statistics Error logs Swap device Display swap size Activate Swap

5.) Remove x from root:x: 6.) Login to server again. It will not prompt for password 7.) Use passwd command to set new passwd useradd mkuser userdel rmuser lsuser -f ALL usermod chuser -a General Commands hostid hostid linuxconf smit top monitor top sar sar vmstat vmstat iostat iostat alog -o -t boot errpt dmesg /dev/sda2 /dev/hd6 free lsps -a swapon -a swapon -a Printers

Printer Queues Stop LP Start LP

/var/spool/lpd/lp/* /etc/init.d/lpd stop /etc/init.d/lpd start

Submit print jobs

lpr

LP statistics

lpq

Remove print jobs Add printer queue Remove Printer queue Make default printer

lprm printtool

/etc/qconfig stopsrc -s lpd startsrc -s lpd enq lp lpr qprt enq -A lpq lpstat qchk cancel lprm qcan enq -x smit mkpq smit rmpq export LPDEST="pq" TCP/IP

Network IP configuration Hosts IP addresses Name service switch Network parameters Routing daemon NIC Configurations Secondary IP Address Login prompt

/etc/sysconfig/network-scripts/ /etc/hosts /etc/nsswitch.conf sysctl -a | grep net routed ifconfig -a modprobe ip_alias ifconfig eth0:1 IP /etc/issue

lsattr -E -l inet0 /etc/hosts /etc/netsvc.conf no -a gated ifconfig -a ifconfig en0 alias IP /etc/security/login.cfg odmget -q "attribute=num and uniquetype=pty/pty/pty" pdAt | sed "s/0-64/0-512/" | odmchange -q "attribute=num and uniquetype=pty/pty/pty" -o PdAt chdev -l pty0-anum=256 -P reboot

Increase the # of pseudoterminals

cd /dev ./MAKEDEV -v pty

Maximum # of ptys Remote Shell YP/NIS service binder rsh /sbin/ypbind

256 remsh rsh /usr/lib/netsvc/yp/ypbind System Files /etc/exports

512

NFS exported

/etc/exports

NFS exported NFS Client mounted directories Max File System Max File Size Max # File Descriptors Filesystem table Free disk blocks Device listing Disk information Disk Label

/etc/exports /var/lib/nfs/xtab 2 TB 2 GB {512B block size} sysctl fs.file-max /etc/fstab df -k cat /proc/devices cat /proc/scsi/scsi0/sda/model fdisk -l logical extents logical volume volume group ext3 reiserfs vgdisplay -v pvchange pvcreate pvdisplay vgreduce pvmove vgcreate vgremove

/etc/exports /etc/xtab 128 GB 64 GB 64 K DISK/LVM Commands /etc/filesystems df -k lsdev -C bootinfo -s hdisk# lspv -l hdisk# Partition Volume Volume group jfs /dev/rootvg lsvg -l rootvg chpv mkdev -c disk -l hdisk# lspv reducevg migratepv mkvg chvg varyonvg varyoffvg exportvg importvg lsvg chlv lslv mklv extendlv rmlv bootlist -m normal

LVM Concepts Journal Filesystem type Default volume group Display volume group Modify physical volume Prepare physical disk List physical volume Remove diskvolumes to another Move logical from volume group physical volumes Create volume group Remove volume group

Volume group availability Restore volume group Exports volume group Imports volume group Volume group listing Change logical volume characteristics List logical volume Make logical volume Extend logical volume Reduce logical volume Remove logical volume Prepare boot volumes

vgchange vgcfgrestore vgexport vgimport vgscan lvchange lvdisplay lvcreate lvextend lvreduce lvremove lilo resize2fs resize_reiserfs lvsplit lvmerge

Extend File system Reduce/Split mirrors Merge mirrors Create mirrors Add mirrors Create striped volumes

chfs -a size=# /mt rmlvcopy mklv -c 2 mklvcopy lv 2 mklv -u 3 -S 64K

lvcreate -i 3 -I 64

System recovery tape Backup Restore Startup script Kernel

tar cvf /dev/rst0 / tar xvf /dev/rst0 /etc/rc.d/rc /boot/vmlinuz

mksysb -i /dev/rmt0 savevg -i rootvg restvg Miscellaneous /etc/rc /usr/lib/boot/unix_up

Kernel Parameters

Reconfigure the kernel

List modules Load module Unload module Initialize system Physical RAM Kernel Bits Crash utility Trace System Calls Machine model OS Level Run Level Core dump files

sysctl -a cd /usr/src/linux make mrproper make menuconfig make dep make clean make bzImage make install make modules make modules_install cp arch/i386/boot/bzImage /boot/vmlinuz2.2.16 mkinitrd /boot/initrd-2.2.16.img 2.2.16 vi /etc/lilo.conf lilo lsmod insmod rmmod netconf free getconf LONG_BIT lcrash strace uname -m uname -r runlevel {lilo} control-x linux S

lsattr -E -l sys0

chdev -l sys0 -a genkex

install_assist bootinfo -r bootinfo -K crash syscalls uname -m bootinfo -m oslevel who -r /var/adm/ras Key on service mode/F4 Boot from CD/Tape Select Maintenance Limited function Shell

Boot single user

{grub} cernel vmlinuz-2.4.9-13 single k ro root=/dev/hda8 initrd /initrd-2.4.9-13.img boot

Maintenance mode

Interrupt Key

Return to console Timezone Management NTP Daemon Install Software Uninstall software List installed software Verify installed software List all files List installed patches Package owner SW Directory Devices /etc/sysconfig/clock /etc/ntp.conf /etc/rc.d/init.d/xntpd rpm -i package rpm -e package rpm -qa rpm -V package rpm -ql package /etc/environment /etc/profile /etc/ntp.conf startsrc -s xntpd Software Management installp -a installp -u lslpp -L all lppchk -v lslpp -f fileset instfix -i lslpp -w path /usr/lpp Devices /dev

rpm -qf file /var/lib/rpm /dev

Install devices for attached peripherals Remove device Device drivers CPU List Terminal

/dev/MAKEDEV

cat /proc/cpuinfo lspci pnpdump

cfgmgr -v rmdev -l lscfg lsdev -Cc processor lsdev -Cc tty

Diagnostics Whole Disk CDROM CDROM file type Rewinding tape drive Non-rewinding tape drive Floppy drive

/dev/sda /dev/cdrom iso9660 /dev/rst0 /dev/nrst0 /dev/fd0

{ c 9 0} { c 9 128 }

diag /dev/hdisk# /dev/cd0 cdrfs /dev/rmt0 /dev/rmt0.1 /dev/rfd0

HP-UX / {/dev/vg00/lvol1} /home {/dev/vg00/lvol4} /tmp {/dev/vg00/lvol6} /usr {/dev/vg00/lvol7} /var {/dev/vg00/lvol8} /etc/passwd /tcb/files/auth/r/root /etc/group /etc/logingroup 2147483647 /etc/securetty {console} >boot Interact with IPL ? Y

Solaris / {/dev/vx/dsk/rootvol} /export/home /dev/vx/dsk/home} /tmp /dev/vx/dsk/swapvol} /usr /var /etc/passwd /etc/shadow /etc/group 2147483647 /etc/default/login {CONSOLE=/dev/console} boot cdrom -s mkdir /tmp/a

ISL>hpux -iS passwd root

mount /dev/c0t0d0s0 /tmp/a vi /tmp/a/etc/shadow

useradd userdel logins usermod uname -i sam top glance sar vmstat iostat dmesg /dev/vg00/lvol2 swapinfo -a swapon -a

useradd userdel logins usermod hostid admintool top sar vmstat iostat dmesg /dev/vx/dsk/swapvol swap swap -a

/etc/lp/interface/* lpshut lpsched

/etc/lp/interfaces/* /usr/lib/lp/lpshut /usr/lib/lp/lpsched lp lpr

lp

lpstat

lpstat cancel lprm

cancel lpadmin -p pq lpadmin -x pq lpadmin -d pq

lpadmin -p pq lpadmin -x pq lpadmin -d pq /etc/hostname.* /etc/inet/* /etc/defaultrouter /etc/inet/hosts /etc/nsswitch.conf ndd /dev/[tcp|ip] ? in.routed ifconfig -a ifconfig hme0:1 IP up BANNER @ /etc/default/telnetd {/etc/system} set pt_cnt = # {SYSV} set npty = # {BSD} {/etc/iu.ap} ptsl 0 # ldterm ttcompat halt boot -r

/etc/rc.config.d/netconf /etc/hosts /etc/nsswitch.conf ndd -h routed lanscan -v ifconfig lan0:1 IP telnetd -b /etc/issue rebuild your kernel with these new values NPTY=# NSTRPY=# reboot insf d ptys -n # insf -d ptym -n # insf -d pts s # -e -v

{MAXUSERS} remsh /usr/lib/netsvc/yp/ypbind

176 {BSD} 3000 {SYSV} remsh /usr/lib/netsvc/yp/ypbind /etc/dfs/dfstab

/etc/exports /etc/xtab 128 GB 128 GB 60K /etc/fstab bdf /sbin/ioscan diskinfo /dev/rdsk/c#t#d# pvdisplay -v /dev/dsk/C#t#d# logical extents logical volume volume group vxfs /dev/vg00 vgdisplay -v vg00 pvchange pvcreate pvdisplay vgreduce pvmove vgcreate vgremove

/etc/dfs/sharetab /etc/rmtab 1 TB 8000 TB {vxfs} 1 TB 64 K /etc/vfstab df -k sysdef format -d c#t#d# prtvtoc sub disk Volume Plex disk group vxfs /dev/vx/dsk/rootdg vxprint -l -g rootdg

vxdiskadd vxprint -dl vxdg rmdisk vxassist move vxdg init

vgchange vgcfgrestore vgexport vgimport vgscan lvchange lvdisplay lvcreate lvextend lvreduce lvremove lvlnboot extendfs /dev/vg00/lvol8 fsadm -F vxfs -b {LE * 1024} /mt lvsplit lvmerge lvcreate -m 1 lvextend -m 1 lvcreate -i 3 -I 64

vxdg deport vxdg import vxedit set vxprint -vl vxassist make vxassist growto vxassist shrinkto vxedit rm vxbootsetup vxva mkfs -M

vxassist mirror
vxassist make vol 100mb layout=raid5

/opt/ignite/bin/make_recovery fbackup frecover /sbin/rc /stand/vmunix sysdef kmtune kmsystem cd /stand/build /usr/lbin/sysadm/system_prep v -s system vi system mk_kernel -s system cd /stand mv system system.prev mv vmunix vmunix.prev mv dlkm dlkm.prev mv /stand/build/system system kmupdate /stand/build/ vmunix_test kmadmin -s kmadmin -L kmadmin -U set_parms initial grep -i Physical /var/adm/ syslog/syslog.log getconf KERNEL_BITS adb tusc model uname -m uname -r who -r /var/adm/crash >boot Interact with IPL ? Y ISL>hpux -iS

ufsdump ufsrestore /etc/init.d /kernel/genunix

sysdef -i vi /etc/system reboot

modinfo modload modunload sys-unconfig prtconf isainfo -kv crash truss uname -imp uname -r who -r /var/crash/`uname -n` ok boot -s

>boot Interact with IPL ? Y ISL>hpux -lm control-B

ok boot -as

Stop-A

co /etc/TIMEZONE /etc/rc.config.d/netdaemons /sbin/init.d/xntpd swinstall swremove swlist swlist -l fileset -a state swlist -l file fileset swlist -l patch what /stand/vmunix swlist -l file | grep path /var/adm/sw/ /dev

ok go /etc/TIMEZONE /etc/default/init /etc/inet/ntp.conf /etc/init.d/xntpd pkgadd pkgrm pkginfo pkginfo -i pkginfo -p pkgchk -l package patchadd -p pkgchk -l -p path /var/sadm /devices drvconfig devlinks disks tapes rem_drv prtconf -D psrinfo -v pmadm -l /usr/platform/`uname -m`/ sbin/prtdiag ok test-all /opt/SUNWvts/bin/sunvts /dev/c#t#d0s2 /dev/dsk/c#t6d0s2 hsfs /dev/rmt/0 /dev/rmt/0n /dev/diskette

nt

insf -e rmsf lsdev ioscan -fnC processor ioscan -fnC tty

stm /dev/dsk/c#t#d0 /dev/dsk/c#t2#d0 cdfs /dev/rmt/0m /dev/rmt/0mn

Você também pode gostar