You are on page 1of 83

Solaris 10

Operating System

Solaris
Solaris
Solaris

Solaris

1982 : SunOS 4.1


1990 : SunOS 4.1.1 (Solaris 1.0)
Solaris 2.0 2.12.22.32.42.5.1Solaris 2.6

1998 : Solaris 7 (64 )

2000 : Solaris 8

2002 : Solaris 9

2005 : Solaris 10

Solaris 10

SunOS 5.10

Common Desktop Environment (CDE)

Java Desktop System (GNOME)

Solaris

SPARC :

SPARC CPU

Ultra
Ultra 2 Ultar 10
SunBlade
SunBlade 100 , SunBlade 2500
SunFire
SunFire V100 , SunFire V480
SunEnterprise SunEnterprise 3000 , SunEnterprise 4000

X86 :

INTEL / AMD CPU

HP / IBM / Dell , or PC

Solaris 10

http://www.sun.com.tw

Solaris 10

X86
Solaris 10 :

http://www.sun.com/bigadmin/hcl/

11

Solaris 10 (SPARC)
Solaris
OK boot cdrom

Solaris
OK boot cdrom - text

13

Solaris 10 (X86)

14

15

16

17

DHCP

18

19

IP Address

20

IPV6

21

22

IP

23

Kerberos

24

25

26

27

28

root

29

30

31

32

33

34

35

36

37

38

39

40

41

42

Solaris fdisk

43

44

45

46

47

48

49

50

DNS Client

Vi /etc/resolv.conf

51

DNS Client

Vi /etc/nsswitch.conf

52

Solaris File System

53

Solaris

( run level)

54

Solaris

Solaris
Root (/)

/etc
/usr
/var
/opt
/tmp
/kernel
/boot
/home

/usr

Solaris

56

Telnet :
Telnet Telnet

Telnet telnet

SSH :
ssh,telnet
.
Google putty

57


.
..

~account account

cd

pwd
mkdir
rmdir
58

/
cd /export/home/mary

: /

Mary John ;cd ../John


export

home

usr

bin

John

Mary

59

ls
-a
-A
-d
-f
-F

-i
-l
-n
-r
-R

[]

[]

( . )
. ..

(ls )

* /
inode

UID GID

man ls !!

60

cp [ ]
cp file1
cp [ ]
cp file1

file2 ; cp -r dir1 dir2

~user1/ ; cp -r dir1 /tmp

mv [ ]

mv file1 file 2 ; mv dir1 dir2


mv [ ]

mv file1 /tmp ; mv dir1 ../


61

cat

nl

more
-c ; -line ; + linenumber
less more less

-n ; cat file | grep 123

head
-n ;

tail
-n ; -f
62

Grep :
-i
-l
-n
-v

:
:
:

grep

root /etc/passwd
grep -v root /etc/passwd
ps -ef

| grep process

63

find
find


/home -name sh
(/homesh*

find

. name sh?eet1
(sh?eet1

find

/etc/rc?.d | grep -i apache


(Script Apache )

find . -newer ./home/sheet1


(sheet1

man ls !!
64

Useradd []
-d
-c
-s
-m
-u
-g
-D

dir
:
comment :
shell : shell
:
uid
: uid
group :
:

useradd leosys
useradd s /bin/bash -d /export/home/leosys m cengineer leosys
useradd -u 101 g adm leosys

65

()

passwd [] []
-l
-d
-u
-f
-x
-w

:
:
:
:
:
:

warn

passwd leosys
passwd -d leosys
passwd -x 30 -w 5

leosys

66

Solaris

PROM OpenBoot

NF S NIS

0 boot
3

Ss

67

Solaris

68

Solaris

Shutdown [-y] [-g sedonds] [-i init-state] [message]


-y : yes
-g :
-i :
message :
reboot
:
poweroff :
half
:

sync ;

init

sync;sync;sync;init 0
69

/usr/platform/i86pc/sbin/prtdiag |more
cpu
psrinfo v

prtconf |more

cat /etc/release
swap
swap s
process
prstat
70

ifconfig -a | more

ifconfig hme0 up/down


hme0 ip address
ifconfig hme0:1 192.168.1.1 up
hme0
ifconfig hme0 plumb/unplumb

netstat -an |more

71

IP/Gateway/dns

IP/etc/hosts
Vi /etc/hosts
# Internet host table
#
127.0.0.1
localhost
120.109.7.2 mail loghost mail.ctu.edu.tw
120.109.7.1 cc
cc.ctu.edu.tw

Gateway/etc/defaultrouter
Vi /etc/defaultrouter

dns/etc/resolv.conf
Vi /etc/resolv.conf
domainname ctu.edu.tw
nameserver 120.109.6.1
72

Process

Ps (process)
ps ef | more ; (
ps ef | grep httpd (
bash-2.05# ps -ef | grep httpd
nobody 261 257 0 Nov 14 ?
nobody 262 257 0 Nov 14 ?
root
257
1
0 Nov 14 ?

0:00 /usr/local/apache2/bin/httpd -k start


0:00 /usr/local/apache2/bin/httpd -k start
0:00 /usr/local/apache2/bin/httpd -k start

Kill HUP PID (


Kill -1 PID (
Kill -9 PID ()

73

/etc/syslog.conf log
/var/adm/messages

/var/log/syslog

last |more

/usr/local/apache2/logs/access_log log

cp /dev/null
74

( Z ; tar ; tar.gz ; gz ; tar )


Zcompress -d .Z ; or
uncompress *.Z
;
gzgzip -9
gzip -d .gz

;
;

tartar xvf .tar ; tar


tar cvf /tmp/file1.tar file1 ()
tar cvf /tmp/file1.tar ./etc/file1 ()

tar.gzgzcat .tar.gz | tar xvf tar zxvf .tar.gz

75

Quota

quota -v

Disk quotas for ice (uid 32435):


Filesystem
usage quota limit timeleft files quota limit
/home1
674552 1590000 1600000
81
0
/var/mail
8
29000 30000
0
0

timeleft
0
0

quota
edquota

quota
edquota -p A (quota) B (quota)
76

pkgadd d
pkgadd -d openssl-0.9.8k-sol9-sparc-local

pkgrm
pkgrm openssl

pkginfo
pkginfo | grep openssl

77

tarball

apache 2.0.59
1. gzcat httpd-2.0.59.tar.gz | tar xvf 2. cd httpd-2.0.59
3. ./configure help >111 ()
4. ./configure prefix=/usr/local/apache2
--version --enable-so --with-ssl .
5. make (complier)
6. make install
7. apache
8. apache

78

Vi
VI

k j h l

i, I, o, O, a, A, r, R

:
vi
79

Vi
H

yy

p, P

pP

x, X

x X

dd

undo
80

Vi

i, I

a, A

o, O

Esc

81

Vi

:w

:q

vi

:wq

:wq!

:e!

82

83

You might also like