Tuesday, January 23, 2007

solaris 5.8 notes 1

Stop Power Management for Server (if turn it on before)
vi /etc/power.conf
autoshutdown 30 9:00 9:00 shutdown -- change to --> noshutdown

Network Configuration
use DHCP
1. touch /etc/hostname.<> (e.g. hostname.hme0)
2. touch /etc/dhcp.<> (e.g. dhcp.hme0)

use Fixed IP
1. touch /etc/hostname.<>(e.g. hostname.hme0)
2. echo "<> (e.g. sun1)" >> /etc/hostname.
3. vi /etc/hosts
127.0.0.1 localhost
# add a new line
loghost
e.g. 192.168.0.1 sun1 loghost
4. touch /etc/defaultrouter
5. echo "<>" >> /etc/defaultrouter
6. echo "<> (e.g. 192.168.0.0 255.255.255.0) " >> /etc/inet/netmasks
7. init 6
8. use ifconfig -a to check status
9. use ifconfig up/down to start/stop interface ( e.g ifconfig hme0 up )

Simple NFS Server Configuration
for example: wanna to share /testing with read & write permission
1. chmod 766 /testing
2. /usr/lib/nfs/nfsd -a (start nfsd service)
3. /usr/lib/nfs/mountd (start mountd service)
4. /etc/init.d/nfs.server start
5. share -F nfs -o rw /testing
6. showmount -a (check who are mounting from you)
NFS Client
for example: wanna to mount 192.168.0.1's /testing folder
1. mount 192.168.0.1:/testing /mnt
2. cd /mnt