Beruflich Dokumente
Kultur Dokumente
Topic on Solaris 10
Mo Qiuju /57859
www.huawei.com
Introduction to server
hardware
Models of SUN
Standard computers of T2000/T2100
Introduction to hardware and software
of SUN workstation
Blade2500
UNIXUNIX genres:
SUN Solaris ,HP HP-UX, Digital unix, Linux
Main features:
multi-tasking, multi-users, pipe, powerful Shell, security
sh csh
cpp
kernel
kernel
vi
shell(B shell,
Hardware
K shell, C shell)
Application
Outer Layer Program
Program
file tree
as file
client server
t2000
- ordinary file
r readable owner
w writable group
x executable other
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.
There are several types of shell: B Shell, K Shell, C Shell.
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 %.
Normally the default shell is Bourne Shell. To change shell, just
input corresponding shell command. For example, input “ksh”
to change to Korn shell in B shell.
keyboard
Include:
switch user
File maintenance
Display the content of file
System resource navigation and control
Modify the hostname
Configure and query the IP address
Configure the default network route
For example: ls _ -a _ -l _– F
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 52
Common Operations
cd Change directory
ls List the directory contents, for example: ls -al
mkdir Create directory
cp/rcp Copy files
pwd Present the current working directory
rmdir Delete directory
rm Delete file, for example: rm –r /tmp/t2000
mv Move file or change file name
man Obtain help information on command
su Switch user
Execute showrev –p | grep patch number to query the pacth whether it has
been installed.
Example: #showrev -p | grep 117350
Return value:
Patch: 117350-02 Obsoletes: 116897-01 Requires: 108528-29, 117000-0 Incompatibles:Packages:
SUNWcarx, SUNWcar, SUNWcsr, SUNWpmu, SUNWpmux, SUNWhea
the processes.
Common commands
ps show status of active processes, for example: ps –ef
kill terminate a process, for example: kill -9 213
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 59
Modifying Hostname
Modify /etc/nodename file, input the new hostname. If
the new hostname is Primary, input Primary in
nodename file.
Open /etc/hostname.interface file, change the old
hostname to the new one.
# 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
Configuration of Default Network Route
Application scenario: default route is configured in routine
maintenance where one workstation is used to log in to other remote
workstation in different LANs.
Procedure
a. # route add default 129.9.1.254 1
The parameter route indicates the route management command; add
indicates adding route option; default indicates the default route;
129.9.1.254 indicates the IP address of the internal port of the local
network; 1 refers to the hop number.
b. Run the netstat –nr command to query the added default route in the
system route table. In this event, NEs at other network segments can be
pinged through.
c. To facilitate the system to automatically add the default route when the
system is restarted every time, create the defautrouter file in the /etc
directory and write in the IP address of the relevant route port (take
129.9.1.254 as an example)
HUAWEI TECHNOLOGIES CO., LTD. Huawei Confidential Page 62
Use of tools
Include:
Vi
Use of Snapshot Tool
Data Collection Tool
Smc
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 TECHNOLOGIES CO., LTD. Huawei Confidential Page 64
Tools --Use of Snapshot Tool
When a user logs in to CDE, the password is correct, but the system
is down after the desktop is displayed.
Problem cause:
Solution:
Problem description
Solution
./etc/init.d/volmgt start
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
HUAWEI is restarted.
TECHNOLOGIES CO., LTD. Huawei Confidential Page 77
Question