Sun Solaris指令大全

本文详述了Sun Solaris的发展历程,包括硬件和软件体系的演变,并着重介绍了PROM状态下的各种命令,如banner、probe-scsi、boot等,用于系统管理和维护。此外,还涉及了系统安装、NFS和NIS的配置,以及一系列Unix基本和增强命令的使用,如ls、vi、rsh、rcp等,强调了网络监控和图形窗口配置的相关内容,为Solaris系统的使用者提供了全面的指导。
摘要由CSDN通过智能技术生成
一、 Sun 发展简史
(本节不作学习要求)
(一)硬件体系
·          81--89 Sun1/2/3 CISC Motrala 680x0系列
·          89--94 Sun4/60 sparc1 Risc sparc:  65 sparc1+ ; 70 sparc2; Server : Sun/290/670/690
·          93--96 Sparc10/20 SuperSparc: Server : 1000/2000
·          96--97 Solaris-test1(140/170/170E/200E)
o    Solaris-testSparc SBUS体系结构,UPA接口
o    Solaris-test2
o    Server : E150,E3000
·          98--99 Solaris-test5 ,Solaris-test10 PCI体系结构 (IDE外设)
o    Solaris-test30,Solaris-test60
o    Server : E250,E450,E3500
·          00-04 …..
(二)软件体系
·          Solaris 1.x SunOS 4.1.3+OpenWindow 1.x BSD
·          Solaris 2.x System V 32bit
·          2.5.1 SunOS 5.5.1 +OpenWindows
·          2.6 SunOS5.6+CDE1.2
·          Solaris 2.7(7) 64 bit
·          Solaris 5.8  (Solaris 8)
·          Solaris 10
二、 PROM 状态命令与参数
(本节不作学习要求)
(一)指令集
格式: OK> 指令
1.banner 显示当前机器配置状况,CPU,内存,hostid,EtherNet
2.probe-scsi 显示内部SCSI通道所挂接设备
3.probe-scsi-all 显示所有SCSI通道及所挂接设备
4.probe-ide 显示所有IDE通道及所挂接设备(针对U10,U5) probe-fcal-all
5.devalias 显示设备别名,如 cdrom,disk,disk0,disk1等
6.printenv 无参数,显示环境变量或参数为环境变量名 如: printenv auto-boot?
7.setenv 设置环境变量,如: setenv auto-boot? false
8.set-default 恢复环境变量预定值 如:set-default auto-boot?
9.set-defaults 恢复所有环境变量预定值
10.boot device [option] 启动主机
device :设备别名,如:cdrom,disk,net 或直接设备名。如:Solaris-test60 外置CDROM/pci@1f,4000/scsi@3,1/disk@6,0:f
option : -r 系统重新配置 -s 启动单用户环境
如,捷迅的Unix系统都是从网络来安装的,我们在运行进用如下命令即可:
boot net
11.eject [cdrom|floppy] 弹出cdrom或floppy
12.reset 复位
 
(二)环境变量
·          1.auto-boot? 预定值=true 自动启动 =false 进入PROM状态
·          2.diag-switch? 预定值=false 启动状态,启动设备名为boot-device =true 诊断状态,启动设备名为diag-device
·          3.boot-device 预定值=disk
·          4.diag-device 预定值=net
·          5.tpe-link-test? 网络检测 =true 检测网络(一部分机器具有此变量)
三、系统安装
(本节不作学习要求,主要是我的安装和配置的经验,仅供对Solars系统安装和配置感兴趣的同事参考)
(一) 系统配置步骤
主机名 luhua
网络连接(y/n) y
IP地址 172.16.12.121
命名服务 agile.agilesoft.com
子网(y/n) y
地理,时区 PRC
时间
(二) 系统安装步骤
系统安装 初始化
软件安装 完全
硬盘分区 手动,用户化
/ 4000
swap 300
backup 4300
( 三)安装 Solaris 之后的 9 个主要的设置
1. 下载并安装最新的补丁
e.g.
ftp://sunsolve.sun.com/pub/patches/
8_Recommended.zip
J2SE_Solaris_8_Recommended.zip
安装补丁前,kill dtlogin 和inetd进程,以确保没有人登录进系统。安装后重启系统。

2. 设置路由: vi /etc/defaultrouter, add the default gateway to the file.
# cat /etc/defaultrouter
10.6.2.1
3. 设置DNS:vi /etc/resolv.conf
# cat /etc/resolv.conf
nameserver 10.6.2.15
nameserver 10.0.13.11
search sz.mydomain.com abcd.mydomain.com mydomain.com abcd.com

4. vi /etc/nsswitch.conf 在hosts:file 后,加上dns, e.g.
# cat /etc/nsswitch.conf
hosts: files dns
......

5. 把管理域的域名加到 /etc/defaultdomain中。 e.g.
# cat /etc/defaultdomain
abcd.sz
注意:这个域名与主机的DNS域名是两个概念。这是基于管理的需要而设,与实际DNS可不相同。
6. vi /etc/hosts
# cat /etc/hosts
#
# Internet host table
#
127.0.0.1 localhost
10.6.3.191 admin
#
10.6.3.192 db1
10.6.3.193 app1
10.0.13.5 loghost

7. 为man建立index,这样就可用man -k搜索。
catman -w
8. 建立一个管理用户作为远程登录,用su来管理
# user add -s /usr/bin/bash -d /export/home/admin -m admin
# passwd admin
9. 下载并安装Sudo
请参考:
http://www.chinaunix.net/bbsjh/3/10466.html
实际工作中,这是很有用的:不必告诉有特殊需要的普通用户关的Root的帐号,但给他权限。Sudo的操作是有记录可查的,可将log放到远程的log服务器中。[
(四)、安装 Solaris 之后 NFS 安装和配置
NFS 服务器 ( 被共享 )
1.启动服务
/etc/rc3.d/S15nfs.server start
2:共享目录
vi /etc/dfs/dfstab
e.g.
# hostname admin
# cat /etc/dfs/dfstab
share -F nfs -o ro=db1:app1:app2:app3:app4,anon=0 /usr/js
share -F nfs -o rw=db1:app1:app2:app3:app4,nosuid /home
3. 诊断
查看服务器的已共享资源 dfshares
查看共享资源被利用的状况 dfmounts
NFS 客户端 ( 使用共享 )
1.启动服务
/usr/lib/nfs/statd
2. 运行mount , e.g.
app4# mount admin:/home /home
3. 开机自动mount
vi /etc/vfstab, 加入新的一行启动mount配置:
e.g
app4:~% cat /etc/vfstab
#device         device          mount           FS      fsck    mount   mount
admin:/home     -               /home           nfs     -       yes     -
.....
这样,开机后,系统自动将admin:/home目录 mount 到app4的/home目录.

关于Linux的NFS与Solaris不同点:

1. Solaris的目录共享设置文件是/etc/dfs/dfstab, 而RadHat Linux共享目录设置文件是/etc/exports
2. Solaris开机自动mount设置文件是/etc/vfstab, 而RadHat Linux开机自动mount设置文件是/etc/fstab
 
(五)、安装 Solaris 之后 NIS 安装和配置
Server
1. /etc/nsswitch.conf
e.g.
# cat /etc/nsswitch.conf
passwd:     files nis
group:      files nis
netgroup:   files nis
...

2. vi /etc/defaultdomain
e.g.
# cat /etc/defaultdomain
agile.sz
注意:这个域名与主机的DNS域名是两个概念。这是基于管理的需要而设,与实际DNS可不相同。

3. /var/yp/Makefile

4. ypinit -m

5. 启动 /usr/lib/netsvc/yp/ypstart

6. 诊断
ypcat hosts
ypcat passwd
yp which -m
Client
1. /etc/nsswitch.conf
e.g.
# cat /etc/nsswitch.conf
passwd:     files nis
group:      files nis
netgroup:   files nis
...
2./etc/hosts
#app4:~% cat /etc/hosts
10.6.3.197      app4.sz
10.6.3.191      admin
3. /etc/defaultdomain
#app4:~% cat /etc/defaultdomain
agile.sz
注意:要与Server的设置相同。
4. ypinit -c

5./usr/lib/netSvc/yp.ypstart
根据所示,输入NIS Server的hostame:ad
  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
2013年最新版的强悍Unix版本Solaris 11.1系统文件,功能十分强大,不愧是真正血统的Unix系统! Oracle Announces Availability of Oracle Solaris 11.1 and Oracle Solaris Cluster 4.1 Delivers Oracle Database and Java Enhancements, Expanded Mission Critical Cloud Management Capabilities and Advanced Platform Features Redwood Shores, Calif – October 26, 2012 News Facts Oracle today announced general availability of Oracle Solaris 11.1 and Oracle Solaris Cluster 4.1. Oracle Solaris 11 is the first cloud OS that allows customers to build large-scale enterprise-class Infrastructure as a Service (IaaS), Platform as a Service (PaaS) and Software as a Service (SaaS) clouds on a wide range of SPARC and x86 servers and Oracle engineered systems. Oracle Solaris Cluster 4.1 extends high availability and disaster recovery capabilities of Oracle Solaris and includes unique virtual cluster features supporting highly efficient application consolidation with best-in-class availability. Oracle Solaris 11 is already widely in production with thousands of customers with mission critical deployments across industries such as financial services, communications, healthcare, retail, public sector and media and entertainment. Read customer success stories about Oracle Solaris here. Oracle Solaris 11 is also gaining strong momentum among enterprise application vendors with hundreds of applications already qualified for Oracle Solaris Ready status through the Oracle PartnerNetwork (OPN). OPN members can develop, sell and implement their solutions on Oracle Solaris 11 and take advantage of specialized Oracle Solaris resources to expand their market reach. Customers and partners can quickly and safely upgrade to Oracle Solaris 11.1 using the built-in update tools and software repositories available with Oracle Solaris 11. Oracle will host a webcast on November 7, 2012 at 8 a.m. Pacific time on Oracle Solaris 11.1 and Oracle Solaris Cluster 4.1, featuring Markus Flierl, vice president, Oracle Solaris Engineering, Core Technology and Bill Nesheim, vice president, Oracle Solaris Engineering, Platform Software. Register here. This event will also include an interactive chat with core developers of Oracle Solaris and Oracle Solaris Cluster. New and Enhanced Features in Oracle Solaris 11.1 Oracle Solaris 11.1 increases the performance, availability and I/O throughput of the latest Oracle Database technology. A new, optimized shared memory interface between the Oracle Database and Oracle Solaris 11.1 provides 8x faster database startup and shutdown, as well as online resizing of the Oracle Database System Global Area (SGA). Oracle Solaris 11.1 introduces unique new capabilities for optimizing Oracle Database performance. Oracle Solaris 11.1 exposes Oracle Solaris DTrace I/O interfaces that allow an Oracle Database administrator to identify I/O outliers and subsequently isolate network or storage bottlenecks. A new Oracle Solaris DTrace plug-in for Oracle Java Mission Control to enable customers to profile Java applications on Oracle Solaris production systems. New cloud management features add to Oracle Solaris 11’s zero overhead built-in virtualization capabilities across system, network and storage resources, including expanded support for Software Defined Networks (SDN) with Edge Virtual Bridging enhancements, to maximize network resource utilization and manage bandwidth in cloud environments. New built-in memory predictor monitors application memory use and provides optimized memory page sizes and resource location to speed overall application performance. Support for an unprecedented 32 TB of RAM and thousands of CPUs unlocks the full potential of Oracle’s latest server systems. Oracle Solaris Cluster 4.1 Highlights New Oracle Solaris 10 Zone Clusters allow customers to consolidate mission critical Oracle Solaris 10 applications on Oracle Solaris 11 cloud environments. Expanded disaster recovery operations using Oracle’s Sun ZFS Storage Appliance services along with Oracle Solaris Cluster 4.1 to coordinate failover of applications and data to a remote disaster recovery site. Faster application recovery with improved storage failure detection and resource dependencies management. New labeled security capability in Oracle Solaris Zone Clusters provides military grade application separation in highly consolidated mission-critical deployments using Oracle Solaris 11 Trusted Extensions. Integrated Oracle Deployments and Support Oracle Enterprise Manager Ops Center provides comprehensive cloud management capabilities for Oracle Solaris 11, including self-service provisioning of Oracle Solaris 11 Zones. Ops Center’s integrated systems management delivers enterprise scale cloud performance. Oracle Enterprise Manager Ops Center is available to Oracle Solaris customers at no additional cost under the Ops Center Everywhere Program. Oracle Solaris Studio delivers the latest in compiler optimizations, multithread performance and powerful analysis tools for native development, and optimized application performance and reliability on Oracle Solaris 11.1 systems. Oracle Solaris 11 guarantees binary compatibility with previous Oracle Solaris versions through the Oracle Solaris Binary Application Guarantee Program, which provides customers a seamless upgrade path and the industry’s best investment protection. Oracle Solaris Legacy Containers allows older Oracle Solaris environments to be brought forward onto latest generation hardware to provide power, cooling and footprint consolidation savings. OPN members can find Oracle Solaris tools and resources in the Oracle Solaris Knowledge Zone, including Oracle Solaris Ready, Oracle Solaris 11 Specialization and Oracle Solaris Development Initiative. The Oracle Solaris Remote Lab now provides a secure cloud environment for OPN members to test and validate their applications with Oracle Solaris 11 in SPARC and x86 virtual environments. Supporting Quotes “Oracle recommends Oracle Solaris 11 for all UNIX®-based Oracle implementations. Oracle Solaris 11.1 delivers over 300 new performance and feature enhancements and is engineered together with Oracle Database, middleware, applications to increase performance, streamline management and automate support for Oracle deployments,” said John Fowler, executive vice president, Systems, Oracle. “The combination of the secure, highly available capabilities of Oracle Solaris Cluster 4.1 and the built-in virtualization of Oracle Solaris 11.1 helps customers bring their most mission-critical applications into a cost effective, agile cloud environment and delivers extreme availability for enterprise applications.” “Clients are looking for ways to reduce the complexity of systems management while enabling Platform as a Service (PaaS) & Software as a Service (SaaS) clouds,” says Lee Diamante, solutions architect, Systems Computing Solutions at Forsythe. “The value of Oracle Solaris 11 is that it maintains all the enterprise-class features expected with a mission-critical OS, while bringing in new, innovative technologies. Forsythe has a long and rich history of delivering customer solutions on Oracle Solaris systems. This is why we are excited about the Solaris 11.1 release.” “Oracle is making it much easier for partners like Informatica to gain access to their software with the new testing environments; shrinking the time to measurable results and value,” said Julie Lockner, vice president, ILM, Informatica. “With the release of Oracle Solaris 11.1 Informatica customers now have access to mission critical deployments across major industries, with an environment of high performance and high availability. With all the new feature enhancements, we look forward to making the Informatica Platform certified on the Oracle Solaris 11 product family.”
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值