Beruflich Dokumente
Kultur Dokumente
08/02/15
Topic on Solaris 10
Mo Qiuju /57859
www.huawei.com
Huawei Confidential
Prefac
e
This course is developed on the
basis of common requirement on
knowledge
about
Solaris
10
operating system for technical
service engineers.
This course is used for engineers
to improve the management and
application capabilities of Solaris
10 operating system.
Huawei Confidential
Page 2
Study Guide
Huawei Confidential
Page 3
Objective
s
Huawei Confidential
Page 4
Content
Troubleshooting on Solaris 10
Huawei Confidential
Page 5
Content
Introduction to server
hardware
Models of SUN
Huawei Confidential
Page 6
Sun Netra240
( 3310 3320 )
Huawei Confidential
Page 7
T2100
Cluster)
T2000/T2100 HA System
Warm Standby)
Huawei Confidential
Page 8
Host
Color display
Software of SUN
workstation
Solaris
CDE
Sybase
T2000/T2100
CD-ROM
Tape drive
Floppy drive
single system
software
T2000/T2100 HA
system software
Huawei Confidential
Page 9
Question
Huawei Confidential
Page 10
Summ
ary
Models of SUN
Huawei Confidential
Page 11
Content
Troubleshooting on Solaris 10
Huawei Confidential
Page 12
Content
Huawei Confidential
Page 13
UNIXUNIX genres:
Main features:
Huawei Confidential
Page 14
csh
cpp
kernel
kernel
shell(B shell,
vi
Hardware
K shell, C shell)
Application
Program
Huawei Confidential
Page 15
Huawei Confidential
Page 16
bin
sh
dev
csh
etc
rc3.d
opt
usr
T2000
client
var
sybase
cdrom
export
tmp
home
server
t2000
Huawei Confidential
Page 17
ordinary file
readable
writable
executable
owner
group
other
Huawei Confidential
Page 18
Shell
The shell sits between you and the operating system, acting as a
command interpreter. It reads your terminal input and translates
the commands into actions taken by the system. The shell is
analogous to command.com in DOS.
Sh( B shell) uses the startup file .profile and the default prompt is
$; Csh uses the startup files .cshrc and .login, the default prompt is
%.
Huawei Confidential
Page 19
Environment Variables
Huawei Confidential
Page 20
Version of Solaris
Solaris 2.6
Stable, 32bit, widely used before.
Solaris 2.7
Failed version, not used.
Solaris 2.8
Currently main version, 64bit, stable, widely used in
T2000/T2100.
Solaris 2.9
Not used.
Solaris 2.10
The latest version, which T2000/T2100 will switch to, is the main version now.
Huawei Confidential
Page 21
Huawei Confidential
Page 22
Features of Solaris10
Huawei Confidential
Page 23
solaris8
CDE V1.6
CDE V1.4
SMC
Admintool
container
None
Built-in SSH2
None
Dynamic Tracing
None
Support x86
None
/etc/ftpusers
/opt/sybase/interfaces ip
Denoted in hexadecimal format
Huawei Confidential
Page 24
Question
Huawei Confidential
Page 25
Summ
ary
Huawei Confidential
Page 26
Content
Troubleshooting on Solaris 10
Huawei Confidential
Page 27
Content
Use of tools
Huawei Confidential
Page 28
Include:
Control Keys
Huawei Confidential
Page 29
Host
Color display
SUN workstation
type:
Ultra60
Blade2000
Blade2500
Sun Netra240
CD-ROM
Tape drive
Floppy drive
Huawei Confidential
Page 30
NM program
Huawei Confidential
Page 31
Huawei Confidential
Page 32
Before you install the T2000 system, make sure that the preparations for
the software, hardware and environment are done.
Hardware Installation
Insert the CD/DVD for Solaris 10 Software 1 (01/06 SPARC Platform Edition).
Notes:
Huawei Confidential
Page 33
b)
c)
d)
e)
f)
g)
h)
i)
Huawei Confidential
Page 34
Click the terminal window icon on the bottom of the screen (the
name is this host)
Huawei Confidential
Page 35
Huawei Confidential
Page 36
steps
Huawei Confidential
Page 37
Procedure
Huawei Confidential
Page 38
Start
Run
workstation)
b.
ftp ip address
c.
d.
ftp> ascll (transfer mode: text file in ascll mode; other files in bin mode)
e.
f.
ftp>lcd d:\
g.
ftp>put bbb (bbb refers to the file name. To obtain a file from the
workstation, replace put with get.)
h.
Huawei Confidential
Page 39
Use of Telnet
Application scenario: When the workstation server is placed remotely or
the server cannot be randomly used, you need to log in to the server
remotely on the client (PC or workstation) to perform some operations.
After remote login by using the Telnet function, using the workstation
server is the same as using the local workstation.
Procedure for Telnet
a.
Start
Run
workstation)
b.
c.
Huawei Confidential
Page 40
Control Keys
Control+C
Used to break program running abnormally
Control+D
Used to break system communication
Control+S
Used to inform terminal of stoping accepting input
Control+Q
Used to inform terminal of resuming accepting input
Stop + A
Used to go to OK state
Huawei Confidential
Page 41
Application scenario
The tar command combines files into one device or filename for
archiving purposes. The tar command does not compress the files; it
merely makes a large quantity of files more manageable.
Syntax
Example
tar cvf aaa.tar aaa (In current directory, dump all the files and subdirectories in aaa directory to aaa.tar in the current directory)
Huawei Confidential
Page 42
Syntax :
gzip filename
Example:
gzip aaa
gunzip aaa.gz
Huawei Confidential
Page 43
When a file has been compressed using the pack command, a suffix
of .z is appended to the file name.
unpack name
unpack aaa.z
unzip restores the files originally compressed by zip. When a file has
been compressed using the gzip command, a suffix of .zip is
appended to the file name.
Syntax :
unzip FileName.zip
Example:
unzip aaa.zip
Huawei Confidential
Page 44
Steps
a)
b)
Execute cd /T2000(T2100)/server/bin
c)
Huawei Confidential
Page 45
Huawei Confidential
Page 46
Include:
switch user
File maintenance
Huawei Confidential
Page 47
switch user
Two methods
Method1:su xxx
Method2:su xxx
Method1 is used to switch user in the current
environment
variables;
Method 2 is used to switch user completely .(recommend to use)
Example:
su root
User name:root
Password:rootkit
Huawei Confidential
Page 48
The UNIX file system is set up like a tree branching out from the root.
The root directory of the system is symbolized by the forward slash (/).
System and user directories are organized under the root. The following
table summarizes some directory navigation commands.
Command/Syntax
What it will do
cd [directory]
change directory
make a directory
pwd
remove a directory
Huawei Confidential
Page 49
Example: % pwd
Return value : /T2000/server
Change directory -- cd
Syntax: cd [directory]
Example:
%cd
%cd /
%cd ..
Huawei Confidential
Page 50
-a lists all files, including those beginning with a dot (.),such as .login
-l long listing lists the mode, link information, owner, size, last
modification (time). If the file is a symbolic link, an arrow (-->)
precedes the pathname of the linked-to file.
Example: ls l
Return value: drwxr-xr-x 2 t2000 ems 512 May 3 13:58 T2000/
Explanation :For the directory T2000, it allows the user (owner) t2000
to read, write and execute; other users except t2000 in the UNIX
group assigened to the file to read and execute; users on the
system only to read.
HUAWEI TECHNOLOGIES CO., LTD.
Huawei Confidential
Page 51
Huawei Confidential
Page 52
Common Operations
cd
Change directory
ls
-al
mkdir
Create directory
cp/rcp
Copy files
pwd
directory
rmdir
rm
mv
man
su
Delete directory
Delete file, for example: rm r /tmp/t2000
Move file or change file name
Obtain help information on command
Switch user
Huawei Confidential
Page 53
touch
a.txt
grep
chmod
chown
chgrp
more/less/pg
head/tail
echo
output, for
example: echo $SYBASE
HUAWEI TECHNOLOGIES CO., LTD.
Huawei Confidential
Page 54
df
du
which
date
env
tar
passwd
Huawei Confidential
Page 55
prtdiag
uname
hostname
hostid
id
pkginfo
pkginfo l xxx
package
showrev
-p
Huawei Confidential
Page 56
prtdiag
uname
hostname
hostid
du
id
pkginfo
pkginfo l xxx
package
showrev
Huawei Confidential
Page 57
Example: %prtdiag
Return value: the clock frequency, the amount of memory , CPU information, I/O
information
Huawei Confidential
Page 58
Controlling Processes
Common commands
ps
kill
Huawei Confidential
Page 59
Modifying Hostname
Huawei Confidential
Page 60
IP Address Configuration
ifconfig a
return value:
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL>
mtu 8232 index 1 inet 127.0.0.1 netmask ff000000
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500
index 2
inet 10.72.86.11 netmask ff000000 broadcast 10.255.255.255 ether
0:3:ba:18:40:62
HUAWEI TECHNOLOGIES CO., LTD.
Huawei Confidential
Page 61
Procedure
Huawei Confidential
Page 62
Use of tools
Include:
Vi
Smc
Huawei Confidential
Page 63
Tools --Vi
Application scenario: vi command is a powerful tool for editing text file
in UNIX, it can create and modify the text file.vi has two basic modes
for manipulating text, command mode and text entry mode. When you
start vi, you will be in command mode until you enter one of the text
entry commands, such as i, a, s, or o, which are explained in Entering
Text with vi.
To create a file named myfile and open it for editing, use this command: vi
filename
control command
ESC Key: switch between Command mode and text input mode
b: cursor go to the beginning of last word
X: delete a word
dd: delete an row
i: Insert the text at the location before the cursor(insert)
j:Move the cursor to up
k:Move the cursor to down
l:Move the cursor to right
o: insert the text in the next line where the cursor is(open)
:wq :Save and exit
:w! :Only save, no exit
:q! :Force exit without save
:e ! : reedit the file again without change
Huawei Confidential
Page 64
Procedure
1.
2.
3.
On the graphic viewer, choose File > Save as jpeg. Note: When
typing in the file name, do type in the suffix name like
XXXX.jpg(jpeg).
Huawei Confidential
Page 65
Huawei Confidential
Page 66
Tool-smc
Application scenario: graphic interfaces of common operations on the
workstation
admintool in Solaris8 is changed to smc in Solaris10. Compared with admintool,
smc features better expansion performance. smc does not provide specific
functions, but provides interfaces that access these functions.
a.
b.
c.
View the system log and find out abnormal or doubtful log records.
d.
e.
Configure and format the new system disk, including disk partition and
preparation for RAID configuration disk copy.
#smc
Huawei Confidential
Page 67
Question
Huawei Confidential
Page 68
Summ
ary
Use of tools
Huawei Confidential
Page 69
Content
Troubleshooting on Solaris 10
Huawei Confidential
Page 70
Content
Troubleshooting on Solaris 10
Huawei Confidential
Page 71
Huawei Confidential
Page 72
Huawei Confidential
Page 73
Huawei Confidential
Page 74
Huawei Confidential
Page 75
Huawei Confidential
Page 76
If the system remains abnormal, use the following command to restart the
workstation:
#/usr/sbin/shutdown -y -g0 -i6
Then the system is restarted.
If no computer connects to the workstation onsite or the computer fails to telnet
the workstation due to some reasons, do as follows:
(1) Type in STOP+A.
(2) When the system displays the ok prompt, type in sync to restart the
system.
Warning:
The preceding operation is bad to the file system, so it is used only when there is no
other method. Use fsck to check the file system after the system is restarted.
Huawei Confidential
Page 77
Question
Huawei Confidential
Page 78
Summar
y
Huawei Confidential
Page 79
Summa
ry
Huawei Confidential
Page 80
Thank You
www.huawei.com