solaris系统关闭服务器,Solaris下如何关闭SUN服务器

Solaris下如何关闭SUN服务器

发布时间:2006-12-15 00:46:19来源:红联作者:samblue

1.成为超级用户或承担等效角色。

角色包含授权和具有一定权限的命令。

2.了解用户是否已登录到系统。

# who

屏幕上会显示所有登录用户的列表。您可能需要发送邮件或广播消息,以使用户知道系统

即将关闭。

3.关闭系统。

# shutdown -iinit-level -g grace-period -y

-i init-level 使系统进入与缺省的S 级不同?nit 级别。选项包括0、1、2、5 和6。

运行级0 和5 是为关闭系统而保留的状态。运行级6 用于重新引导系统。

运行级2 可用作多用户操作状态。

-g grace-period 指示系统关闭前的时间(以秒为单位)。缺省值为60 秒。

-y 继续关闭系统,无需任何介入。否则,系统会提示您在60 秒后继续执行

关闭过程。

4.如果系统要求您确认,请键入y。

Do you want to continue? (y or n): y

如果使用了shutdown -y 命令,系统将不提示您继续操作。

5.如果系统提示,请键入超级用户口令。

Type Ctrl-d to proceed with normal startup,

(or give root password for system maintenance): xxxxxx

6.完成系统管理任务后,请按Control-D 组合键,以返回到缺省的系统运行级。

7.您可使用下表确认系统是否处于您在shutdown 命令中指定的运行级。

示例1:SPARC: 使服务器进入运行级S

在以下示例中,使用shutdown 命令可使基于SPARC 的系统在三分钟内进入运行级S(单用户级别)。

# who

root console Jun 14 15:49 (:0)

# shutdown -g180 -y

Shutdown started. Mon Jun 14 15:46:16 MDT 2004

Broadcast Message from root (pts/4) on venus Mon Jun 14 15:46:16...

The system venus will be shut down in 3 minutes .

.

.

Broadcast Message from root (pts/4) on venus Mon Jun 14 15:46:16...

The system venus will be shut down in 30 seconds .

.

.

INIT: New run level: S

The system is coming down for administration. Please wait.

Unmounting remote filesystems: /vol nfs done.

Shutting down Solaris Management Console server on port 898.

Print services stopped.

Jun 14 15:49:00 venus syslogd: going down on signal 15

Killing user processes: done.

Requesting System Maintenance Mode

SINGLE USER MODE

Root password for system maintenance (control-d to bypass): xxxxxx

single-user privilege assigned to /dev/console.

Entering System Maintenance Mode

#

示例2:SPARC: 使服务器进入运行级0

在以下示例中,使用shutdown 命令可使基于SPARC 的系统在5 分钟内进入运行级0,而无需进行其他确认。

# who

root console Jun 17 12:39

userabc pts/4 Jun 17 12:39 (:0.0)

# shutdown -i0 -g300 -y

Shutdown started. Thu Jun 17 12:40:25 MST 2004

Broadcast Message from root (console) on pretend Thu Jun 17 12:40:25...

The system pretend will be shut down in 5 minutes

.

.

.

Changing to init state 0 -please wait

#

INIT: New run level: 0

The system is coming down. Please wait.

System services are now being stopped.

.

.

.

The system is down.

syncing file systems... done

Program terminated

Type help for more information

ok

示例3:SPARC: 将服务器重新引导至运行级3

在以下示例中,使用shutdown 命令可将基于SPARC 的系统在两分钟内重新引导至运行级3。不需要进行其他确认。

# who

root console Jun 14 15:49 (:0)

userabc pts/4 Jun 14 15:46 (:0.0)

# shutdown -i6 -g120 -y

Shutdown started. Mon Jun 14 15:46:16 MDT 2004

Broadcast Message from root (pts/4) on venus Mon Jun 14 15:46:16...

The system venus will be shut down in 2 minutes

Changing to init state 6 -please wait

#

INIT: New run level: 6

The system is coming down. Please wait.

.

.

.

The system is down.

syncing file systems... done

rebooting...

.

.

.

venus console login:

无论由于何种原因关闭系统,可能都需要返回到运行级3,在该级别下,所有文件资源均可用,并且用户可以登录。

如何关闭独立系统

1.成为超级用户或承担等效角色。

角色包含授权和具有一定权限的命令。有关角色的更多信息。

2.关闭系统。

# init run-level

其中run-level 标识了新的运行级。

3.使用下表确认系统是否处于您在init 命令中指定的运行级。

示例1:使独立系统进入运行级0

在此示例中,使用init 命令可使基于x86 的独立系统进入可安全关闭电源的级别。

# init 0

#

INIT: New run level: 0

The system is coming down. Please wait.

.

.

.

The system is down.

syncing file systems... [11] [10] [3] done

Press any key to reboot

示例2:SPARC: 使独立系统进入运行级S

在此示例中,使用init 命令可使基于SPARC 的独立系统进入运行级S(单用户级别)。

# init s

#

INIT: New run level: S

The system is coming down for administration. Please wait.

Unmounting remote filesystems: /vol nfs done.

Print services stopped.

syslogd: going down on signal 15

Killing user processes: done.

SINGLE USER MODE

Root password for system maintenance (control-d to bypass): xxxxxx

single-user privilege assigned to /dev/console.

Entering System Maintenance Mode

#

无论由于何种原因关闭系统,可能都需要返回到运行级3,在该级别下,所有文件资源均可用,并且用户可以登录。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值