SOLARIS NOTES


1. MOVE FILE

tar cvf - * | ( rsh dpnetwatcher ' cd /etc ; tar xvf - ' )


2. YPCAT HOST NAME

ypcat hosts.byaddr | grep 129.146.78


3. EXPORT DFS:

/etc/dfs/dfstab

/etc/init.d/nfs.server start


4. TIPTO:

cmdtool

/set/misc/bin/tipto

domino ctrl + ] to quit


5. CHANGE IP ADDRESS

/etc/hosts

/etc/nodename

/etc/hostname.*

/etc/motd

/etc/net/ticlts/hosts

/etc/net/ticots/hosts

/etc/net/ticotsord/hosts


6. NEWFS

newfs -i 1024 /dev/rsdk/c0t0d0s7

umount /export/home


7. CHECK IP ADDRESS

ifconfig -a


8. DEFAULT DOMAIN

/etc/defaultdomain -> tools.sfbay.sun.com


9. DEFAULT ROUTER

/etc/defaultrouter -> gateway


10. UFS DUMP

ufsdump 0uf dpnetwatcher:/export/home-copy /hankook/root.full /


11. CRONTAB

/var/spool/cron/crontabs


12. CHECK DISK SPACE

du -sk *


13. FIND NETSTAT

netstat -rn

in.rdisc -s

in.routed -q

ps -ef |grep rdisk


14. APACHE

/etc/init.d/apache start

/etc/apache/httpd.conf


15. COPY CSHRC

/etc/skel/local.cshrc


16. SET PATH

PATH=”/usr/jav/...:${PATH}”

export PATH


17. PACKAGE SEARCH

pkginfo |grep {package}


18. CHANGE TO 64 BITS

vi /platform/sun4u/boot.conf

uncommet last line

ok> boot kernel/sparcv9/unix 64 bit

ok> boot kernel/sparcv8/unix 32 bit


19. SAMBA

tar xvf samba-latest.tar

cd /source

./configure

cc compiler /set/dist/----

/usr/ccs/bin/make

/usr/ccs/bin/make install

/usr/local/samba/bin/smbd -D

/usr/local/samba/bin/nmbd -D

/usr/local/samba/lib/smb.conf


20. SYSTEM INFO

dmesg


21. SAMBA SERVER

\\sm-ump16-01\\yom


22. SYSTEM UNCONFIG

/usr/sbin/sys-unconfig


23. PC NFS

/etc/pcnfsd.conf

uidrange 0-600000

/opt/SUNWpcnfs/sbin/rpc.pcnfsd


24. LOOK FOR DEV

drvconfig


25. NAMETOOL

/usr/dist/exe/nametool


26. YPMATCH CONSOLE

ypmatch dpnetwatcher consoles

nts-devpro1 5056

telnet nts-devpro1 5056


27. IFTP

/usr/dist/exe/iftp


28. FIND A FILE

find /etc -name xhost -print


29. NETGROUP

ypmatch “domino.*” netgroup.byhost


30. SAMBA 2.9

/etc/sfw/smb.conf

/etc/init.d/samba start


31. XHOST

/usr/openwin/bin/xhost +


32. START VOL MANAGER

/etc/init.d/volmgt start


33. FORMAT DISK

fdformat


34. MOUNT DISK

mount -F pcfs /dev/diskette

/mnt


35. PATCH DATABASE

patchdb.central


36. BASHRC

.profile

source .profile

export PATH=${PATH}:/usr/dist/exe


37. START SAMBA

/usr/sfw/sbin/smbd -D

/usr/sfw/sbin/nmbd -D


38. YPCAT NETGROUP

ypcat -k netgroup.byhost |grep denson


39. START/STOP SEND MAIL

/etc/init.d/sendmail [start/stop]


40. PATCH ADD

/var/spool/patch/104945-02


41. PATCH REMOVE

patchrm 104945-02


42. SAMBA RC START

etc/rc3.d/S90samba

#!/sbin/sh

# Copyright (c) 2001 by Sun Microsystems, Inc

# All rights reserved.

#

#ident "@(#)samba 1.1 01/09/24 SMI"

#This is for locally installed samba


case "$1" in

start)

[ -f /usr/local/samba/lib/smb.conf ] || exit 0


/usr/local/samba/bin/smbd -D

/usr/local/samba/bin/nmbd -D

;;

stop)

pkill smbd

pkill nmbd

;;

*)

echo "Usage: $0 { start | stop }"

exit 1

;;

esac

exit 0


43. PC NFS RC START

etc/init.d/pcnfs

#!/bin/sh

# RE_SID: @(%)/dat/dovetail-re/builds/pcnfs/pcnfs/unix/pkg/pkg-sparc/SCCS/s.pcnf

s 1.7 94/05/26 10:40:57 SMI

#

# Copyright (c) 1991, by Sun Microsystems, Inc.

#

#


if [ ! -d /usr/bin ]

then # /usr not mounted

exit

fi


killproc() { # kill the named process(es)

pid=`/usr/bin/ps -ef | /usr/bin/grep $1 |

/usr/bin/grep -v grep | /usr/bin/grep -v /bin/sh |

/usr/bin/awk '{print $2}'`


if [ "${pid}" != "" ] ; then

echo $2

kill -TERM ${pid} > /dev/null 2>&1

fi

}


44. etc/rc3.d/K32pcnfs

#!/bin/sh

# RE_SID: @(%)/dat/dovetail-re/builds/pcnfs/pcnfs/unix/pkg/pkg-sparc/SCCS/s.pcnf

# s 1.7 94/05/26 10:40:57 SMI

#

# Copyright (c) 1991, by Sun Microsystems, Inc.

#

#


if [ ! -d /usr/bin ]

then # /usr not mounted

exit

fi


killproc() { # kill the named process(es)

pid=`/usr/bin/ps -ef | /usr/bin/grep $1 |

/usr/bin/grep -v grep | /usr/bin/grep -v /bin/sh |

/usr/bin/awk '{print $2}'`


if [ "${pid}" != "" ] ; then

echo $2

kill -TERM ${pid} > /dev/null 2>&1

fi

}


45. etc/rc3.d/S32pcnfs

#!/bin/sh

# RE_SID: @(%)/dat/dovetail-re/builds/pcnfs/pcnfs/unix/pkg/pkg-sparc/SCCS/s.pcnf

# s 1.7 94/05/26 10:40:57 SMI

#

# Copyright (c) 1991, by Sun Microsystems, Inc.

#

#


if [ ! -d /usr/bin ]

then # /usr not mounted

exit

fi


killproc() { # kill the named process(es)

pid=`/usr/bin/ps -ef | /usr/bin/grep $1 |

/usr/bin/grep -v grep | /usr/bin/grep -v /bin/sh |

/usr/bin/awk '{print $2}'`


if [ "${pid}" != "" ] ; then

echo $2

kill -HUP ${pid} > /dev/null 2>&1

fi

}



46. HOW TO MAKE META DISK

/etc/lvm/md.tab

/usr/sbin/metadb

metadb -a -f mddb01

metainit -n d15

metainit d15 -> this is format

metaclear d15 -> this is for clear

metastat


while 1

metastat

sleep 5

date

end


make hot spare

metahs -a hsp001

metahs -a hsp001 /dev/dsk/coto-----

mkdir /export/home2

newfs -m 1 /dev/md/rdsk/d15


vfstab

/dev/md/dsk/d15 /dev/md/rdsk/d15 /export/home2 ufs 3 yes -

mountall



47. SAMBA SMB.CONF

[global]

workgroup = WORKGROUP

server string = Samba Server

security = user

encrypt passwords = no

log file = /usr/local/log/samba.%m

max log size = 50

homedir map = auto.home

browseable = yes

dns proxy = yes


[homes]

comment=Home Directories

path=/home/%u

read only = No

create mask = 0755



[os-svr186 export]

comment=os-svr186 export

path=/export

writeable=yes