SUNSOLARIS操作指南.doc

上传人:仙人指路1688 文档编号:2387213 上传时间:2023-02-17 格式:DOC 页数:21 大小:72.50KB
返回 下载 相关 举报
SUNSOLARIS操作指南.doc_第1页
第1页 / 共21页
SUNSOLARIS操作指南.doc_第2页
第2页 / 共21页
SUNSOLARIS操作指南.doc_第3页
第3页 / 共21页
SUNSOLARIS操作指南.doc_第4页
第4页 / 共21页
SUNSOLARIS操作指南.doc_第5页
第5页 / 共21页
点击查看更多>>
资源描述

《SUNSOLARIS操作指南.doc》由会员分享,可在线阅读,更多相关《SUNSOLARIS操作指南.doc(21页珍藏版)》请在三一办公上搜索。

1、Solaris 操 作 指 导第一章Boot PROMBootPROM相当于PC的CMOS,可以在BootRPOM下检测硬件和设置启动选项。Sun系统包含下列两样基本硬件: BootPROM芯片 非易失性存储器(NVRAM):保存主机的ID号和启动选项设置BootPROM基本命令l bannerbanner命令显示系统的基本配置信息,包括机器型号、CPU数量和主频、内存大小、以太网地址、主机序列号等。ok bannerSun UltraSPARC 60 UPA/PCI (2 X UltraSPARC-II 296MHz), Keyboard PresentOpenBoot 3.11, 256

2、MB memory installed, Serial #3159808.Ethernet address 8:0:22:1a:e7:3f, Host ID: 72303700.okl boot 命令及参数ok boot device_name - optionsok boot disk2 -r选项包括:a交互式启动操作系统r重新配置操作系统硬件信息s操作系统进入调试状态(单用户模式)v显示启动信息的详细情况l printenv命令printenv命令显示NVRAM变量的设置和缺省值。ok printenvParameter Name Value Default Valuetpe-link-t

3、est? true trueoutput-device ttya screeninput-device ttya keyboardsbus-probe-list f0123 f0123keyboard-click? false falsediag-filediag-device net netboot-fileboot-device disk2 diskauto-boot? true trueMore ,q ? qokl setenv命令setenv设置PROM的参数值,常用的参数有:参数值意义auto-boot?true下次自动启动操作系统false下次启动停在OK状态boot-device

4、cdrom从光驱启动操作系统disk2从第二个硬盘启动操作系统ok setenv boot-device /pci1f,0/pci1/pci1/SUNW,isptwo4/sd2,0:a注:由于Ultra 5没有内置SCSI口,只能加块带SCSI口的网卡。此时设置启动盘应该是:ok setenv boot-device /pci1f,4000/SCSI3,1/disk2,0:aUltra 60外置硬盘的启动应为:l set-defaults将NVRAM的所有参数复原为默认值机器启动时的键盘输入l stop如果在系统加电自检时按下Stop键,就取消POST(加电自检)诊断,然后停留在OK状态。l

5、Stop+d在系统自检时同时按下stop和d键,系统将自动转到诊断模式,诊断模式下系统将更完全地进行自检。l Stop+n如果由于NVRAM的设置不正确而导致系统无法正确启动时,可以在系统加电自检时同时按下stop和n键。它的作用是将NVRAM的参数值设为默认值。l Stop+a同时按下stop和a键将中断操作系统的运行,退到OK状态。警告:尽量不要在操作系统运行时按stop+a,这将导致操作系统停止并且导致数据的丢失。在万不得以的时候,在按下stop+a后,键入sync命令用以将内存的数据同步到硬盘中。查找系统设备l probe-scsi-all这个命令查找系统的所有SCSI设备。ok pr

6、obe-scsi-allTarget 3Unit 0 Disk SEAGATE ST1480 SUN0424626600190016Copyright (c)All Rights ReservedTarget 6Unit 0 Removable Read Only device SONY CD-ROM注:如果从操作系统中退出后再运行此命令可能会造成系统的死机。请先设置auto-boot?为false后再运行reset-all,系统将重新自检,停留在OK状态下,然后可以运行这个命令。l probe-ide查找系统的所有IDE设备。ok probe-ideDevice 0 ( Primary Ma

7、ster )ATA Model : ST 34342ADevice 1 ( Primary Slave )Not PresentDevice 2 ( Secondary Master )removable ATAPI Model : CDR-8240BDevice 3 ( Secondary Slave )Removable ATAPI Model yyyyyyyyyyyyyyy注:如果从操作系统中退出后再运行此命令可能会造成系统的死机。请现设置auto-boot?为false后再运行reset-all,系统将重新自检,停留在OK状态下,然后可以运行这个命令。设备检测l eject将软盘放入软

8、驱,然后在输入eject,软盘将自动弹出。l watch-net-all测试所有网卡和网络状态。每个网卡测试分两部分:loop-back测试和网络线路测试。如果loop-back(网卡自环)通过,说明网卡状态良好。如果网络线路测试没通过,说明网线没接收到信号,可能是网线没接好或是网线不好。第二章软件包管理软件包管理的命令基本包括:pkginfo、pkgadd和pkgrm。pkginfo查看当前操作系统已经安装的软件包。# pkginfo | moreapplication SUNWAxg Solaris XGL 3.3 AnswerBookapplication SUNWaadm Solari

9、s 7 System Administrator Collectionsystem SUNWab2m Solaris Documentation Server Lookupsystem SUNWab2r Solaris Documentation Serversystem SUNWab2s Solaris Documentation Serversystem SUNWab2u Solaris Documentation Serverapplication SUNWabda Sun Ultra 5/10 Hardware AnswerBookapplication SUNWabe Solaris

10、 7 User Collectionapplication SUNWabsdk Solaris 7 Software Developer Collection参数:pkginfo -d device | pathname -l pkg_named软件包所在的设备路径l软件包的详细描述# pkginfo -d /cdrom/cdrom0/s0/Solaris_2.7/Product -l SUNWaudioPKGINST: SUNWaudioNAME: Audio applicationsCATEGORY: systemARCH: sparcVERSION: 3.6.4,REV=1.98.08.

11、13BASEDIR: /VENDOR: Sun Microsystems, Inc.DESC: Audio binariesPSTAMP: dtbuild37s19980813171753HOTLINE: Please contact your local service providerSTATUS: spooledFILES: 9 spooled pathnames2 directories3 executables4 package information files700 blocks used (approx)pkg_name软件包的 名字pkgrmpkgrm用于删除软件包# pkg

12、rm SUNWaudioThe following package is currently installed:SUNWaudio Audio applications(sparc) 3.6.4,REV=1.98.08.13Do you want to remove this package? y# Removing installed package instance # Verifying package dependencies.WARNING:The package depends on the packagecurrently being removed.WARNING:The p

13、ackage depends on the packagecurrently being removed.WARNING:The package depends on the packagecurrently being removed.WARNING:The package depends on the packagecurrently being removed.Dependency checking failed.Do you want to continue with the removal of this package y,n,?,q语法:pkgrm package_name注:如

14、果某个文件被多个软件包共用,则只当最后的包被删除时才被删除。pkgadd使用pkgadd添加软件包命令格式:# pkgadd -d /cdrom/cdrom0/s0/Solaris_2.7/Product SUNWaudioProcessing package instance fromAudio applications(sparc) 3.6.4,REV=1.98.08.13Copyright 1998 Sun Microsystems, Inc. All rights reserved.Using as the package base directory.# Processing pac

15、kage information.# Processing system information.2 package pathnames are already properly installed.# Verifying package dependencies.# Verifying disk space requirements.# Checking for conflicts with packages already installed.# Checking for setuid/setgid programs.This package contains scripts which

16、will be executed with super-userpermission during the process of installing this package.Do you want to continue with the installation of y,n,? yInstalling Audio applications as # Installing part 1 of 1.Installation of was successful.pkgadd -d device | pathname pkg_name第三章改变系统运行级别系统运行级别有8种,分别为:运行级别意

17、义0进入PROM状态(OK状态)1管理状态(所有文件系统都挂上的单用户模式,禁止其他用户登录)2多用户模式(没有网络文件共享服务)3多用户模式(有网络文件共享服务)4未使用5退出操作系统并关机6重新启动机器S,s单用户模式initinit命令用于改变操作系统的运行级别。# init 0INIT: New run level: 0The system is coming down. Please wait.System services are now being stopped.Print services stopped.Stopping the syslog service.syslogd

18、: going down on signal 15Aug 14 14:54:30 snmpdx: received signal 15The system is down.syncing file systems. doneProgram terminatedType help for more informationokinit 0123456Ss 命令格式:shutdown用于改变操作系统运行级别。命令格式:shutdown -y -g seconds -i init-state message选项:y系统提示时默认回答为YESg过多长时间改变i想要的运行级别# shutdown -y -

19、g 0 -i 0Shutdown started. Mon Dec 15 15:13:57 PST 1997Broadcast Message from root (console) on mcmurdo Mon Dec15 15:13:57.THE SYSTEM IS BEING SHUT DOWN NOW ! ! !Log off now or risk your files being damagedChanging to init state 0 - please waitokmessage给所有登录用户的信息halt进入0运行级别poweroff关闭系统并切断电源reboot重新启动

20、系统第四章系统安全改变用户$ su - bobPassword:su命令用户改变当前的用户。# ls -l memo-rw-r-r- 1 rimmer other 0 Jul 6 18:30 memo# chown chris memo# ls -l memo-rw-r-r- 1 chris other 0 Jul 6 18:30 memo# cd /export/home# chown -R chris mydocs改变文件所有者chown user_name filenameR选项把mydocs目录下所有子目录及其文件的所有者都改变为chris。# chown -R lister:staf

21、f mydocs把mydocs目录的所有者改为lister,所在组改为staff。注:只有管理员才能改变所有者。查看登录状态命令who、finger、last可以查看用户登录状态。l who$ whorimmer pts/1 Dec 21 07:07 (nepal)lister console Dec 21 12:18 (:0)查看本机登录的用户状态。显示用户名、登录的设备、登录时间以及登录的主机名字。用户rimmer从机器nepal上登录。而用户lister则在本地登录。l finger$ finger bevwLogin name: bevw In real life: bevs acco

22、untDirectory: /home/bevw Shell: /bin/kshLast login Wed Oct 21 08:07 on console from :0No unread mailNo Plan.显示本地和远程系统用户的详细信息。包括用户名、用户注释信息、终端名、空闲时间、登录时间、登录主机名。l last$ lastrimmer pts/4 pluto Fri Dec 18 10:24 - 11:00 (00:36)lister pts/4 pluto Tue Dec 8 09:39 - 09:49 (00:10)rimmer pts/4 pluto Thu Dec 3

23、15:16 - 15:17 (00:00)rimmer console :0 Wed Dec 2 08:47 still logged inreboot system boot Wed Dec 2 08:44rimmer pts/0 pluto Tue Dec 1 17:27 - 17:28 (00:00)rimmer pts/3 pluto Tue Dec 1 16:13 - 16:39 (00:26)rimmer pts/2 pluto Tue Dec 1 15:32 - 15:38 (00:06)holly term/a pluto Tue Dec 1 15:12 - 08:41 (17

24、:29)显示系统的最近用户登录状况。第五章系统管理命令#hostnameSunland#hostname SundaySunday#hostname hostname改变主机名改变某网卡IP地址# ifconfig -alo0: flags=849 mtu 8232 inet 127.0.0.1 netmask ff000000hme0: flags=863 mtu 1500 inet 172.16.255.2 netmask ffff0000 broadcast 172.16.255.255 ether 8:0:20:ee:11:51ifconfig hme0 172.16.3.3 netm

25、ask 255.255.255.0ifconfig alo0: flags=849 mtu 8232 inet 127.0.0.1 netmask ff000000hme0: flags=863 mtu 1500 inet 172.16.3.3 netmask ffffff00 broadcast 172.16.3.255 ether 8:0:20:ee:11:51l ifconfigifconfig用于配置网卡地址,改动后立即生效,但并不保存配置,下次启动后失效。l /etc/hosts想要永久更改配置,则要更改配置文件,以网卡hme0为例:修改处(/etc/netmasks文件记录网络掩码

26、)修改处(/etc/hosts文件记录网卡地址)#more /etc/hostname.hme0Sunland#more /etc/hosts127.0.0.1 localhost172.16.255.2 Sunland loghost#vi /etc/hosts#more /etc/hosts127.0.0.1 localhost172.16.3.3 Sunland loghost#more /etc/netmasks# The netmasks file associates Internet Protocol (IP) address# masks with IP network num

27、bers.# network-number netmask# The term network-number refers to a number obtained from the Internet Network# Information Center. Currently this number is restricted to being a class# A, B, or C network number. In the future we should be able to support# arbitrary network numbers per the Classless I

28、nternet Domain Routing# guidelines.# Both the network-number and the netmasks are specified in# decimal dot notation, e.g:# 128.32.0.0 255.255.255.0#vi /etc/netmasks#more /etc/netmasks# The netmasks file associates Internet Protocol (IP) address# masks with IP network numbers.# network-number netmas

29、k# The term network-number refers to a number obtained from the Internet Network# Information Center. Currently this number is restricted to being a class# A, B, or C network number. In the future we should be able to support# arbitrary network numbers per the Classless Internet Domain Routing# guid

30、elines.# Both the network-number and the netmasks are specified in# decimal dot notation, e.g:# 128.32.0.0 255.255.255.0172.16.3.0 255.255.255.0reboot增加用户组groupadd -g gid groupgroupadd命令增加用户组说明:g制定组的ID号gid组的ID号(不能与现有的组ID号重复)#groupadd g 100 sungroup组名增加用户useradd -u uid | -g group | -d dir | -s shell

31、| -c comment | -m -k skel_dir loginuseradd命令增加用户组说明:u指定用户ID号g制定所在组d指定用户目录s制定用户SHELLc用户的注释m建立用户目录useradd u 1233 g sun d /export/home/sun c “Sun test user.” m s /usr/bin/sh sunlogin用户的登录名改变用户口令passwd sunNew password:Re-enter new password:passwd (SYSTEM): passwd successfully changed for sun#root可以更改所有用

32、户的口令,其它用户只能更改自己的口令。$passwdpasswd: Changing password for sunEnter login password:New password:Re-enter new password:passwd (SYSTEM): passwd successfully changed for sun$增加和改变系统硬件#reboot - -r如果新增加了光驱、硬盘、网卡或是更换了显卡、网卡、硬盘等,需要让操作系统重新配置硬件信息。命令reboot - -r用于通知系统重新启动并配置系统的硬件信息。第六章 错误排除忘记root口令1、 系统自检时按下:STOP+

33、A,进入OK状态。2、 将系统安装光盘放进光驱。3、 键入:boot cdrom s4、 启动完成后将系统盘挂接到/a目录下:mount /dev/dsk/c0t0d0s0 /a,其中/dev/dsk/c0t0d0s0视实际情况而定,为启动分区的设备名。5、 编辑文件:vi /a/etc/shadow6、 把root所在的行第一个和第二个冒号中间的字符删除7、 存盘退出并重新启动系统,此时root的口令为空,应重新设置。系统不能正常启动,提示:CTRL+D正常启动,输入root口令进入维护状态可能发生的原因:1、 系统异常掉电,导致文件系统被破坏2、 更换硬盘位置,变更了硬件设备号3、 硬盘损

34、坏等处理方法:1、 键入root口令进入维护状态2、 如果是更换了硬盘,则到第3步,否则到第6步3、 键入:reboot - -r4、 系统将重新启动,进入维护状态5、 按实际情况修改/etc/vfstab文件内容,重新启动就可恢复正常6、 检测并修复所有文件系统:fsck -f7、 如能修复成功,则重新启动系统,系统恢复正常8、 如果失败,则:9、 init 0退到OK状态10、 键入:setenv auto-boot? false11、 键入:reset12、 此时系统重新启动后停留在OK状态13、 键入:probe-scsi-all14、 系统将列出所能查到的所有SCSI设备,看是否和实

35、际数量一致15、 如果不一致,说明硬盘已损坏,需要更换软驱不能使用1、 更换软盘重试2、 键入命令:/etc/init.d/volmgt stop3、 键入命令:/etc/init.d/volmgt start4、 键入命令:volcheck网络不通1、 以root登录系统。2、 ping IPADDRESS是否成功,其中IPADDRESS为同一网段的某台机器的IP地址。3、 如果成功,说明网络连接正常。4、 运行命令:ifconfig a,查看对应网卡的IP地址是否正确。5、 若不正确,修改/etc/hosts文件,将网卡所对应的IP地址改为正确地址,重新启动机器。6、 查看/etc/hos

36、tname.*的内容是否在/etc/hosts内,所对应的IP地址是否正确,其中*为网卡的类型,如第一块10M网卡为le0,第二块为le1;第一块100M网卡为hme0,第二块为hme1。7、 将操作系统关闭(运行:init 0),退至OK状态。8、 测试硬件和网络连接,输入命令:watch-network-all。9、 系统将逐一测试所有的网卡,如果没出现测试结果,说明系统未发现任何网卡,网卡硬件损坏,需更换网卡。10、 如果loop-back测试通过,而trancieve测试失败,说明网络连接有问题,更换网线或查看交换机(HUB)。11、 如果测试都通过,说明硬件和网络连接完好,检查操作系

37、统配置。12、 只有配置了IP地址的网卡操作系统才能看到,检查/etc/hostname.*和/etc/hosts,其中*为网卡的类型。13、 要使某个网卡可用,运行:ifconfig * plumb,其中*为网卡的类型。机器不能加电启动1、 检查电源线2、 检查电源开关3、 检查系统硬件是否插好(内存、主板上的电源等等)4、 检查机器的电源5、 检查主板机器启动后屏幕无显示1、 检查显示器电源2、 检查监视器数据线3、 检查键盘是否插紧4、 启动时按stop+n出现错误提示:WARNING: /pci6,4000/scsi3 (glm4):SCSI bus DATA IN phase par

38、ity errorWARNING: /pci6,4000/scsi3 (glm4): Target 0 reducing sync. transfer rateWARNING: /pci6,4000/scsi3/sd2,0 (sd60):SCSI transport failed: reason tran_err: retrying command1、 检查外接设备的SCSI线2、 检查SCSI设备系统启动错误系统自检完毕后出现下面信息,不能从硬盘启动:boot device:net file and args: time out waiting for arp /rarp packet time out waiting for arp /rarp packet time out waiting for arp /rarp packet time out waiting for arp /rarp packet 1、 按STOP+A推到OK状态2、 检测系统所连接的SCSI设备3、 将boot-device设为正确值不能从光驱启动在OK下boot cdrom不能启动1、 在OK状态下检测SCSI或IDE设备,看是否有光驱2、 查看系统检测到的光驱设备地址是否和cdrom定义的别名相同3、 更换光盘4、 更换光驱14、

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 建筑/施工/环境 > 项目建议


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号