How to disable the SUN server in Solaris

Source: Internet
Author: User
In Solaris, how to disable the SUN server-Linux Enterprise Application-Linux server application information is as follows. 1. Become a Super User or assume an equivalent role.
A role contains commands that grant permissions and have certain permissions.

2. Check whether the user has logged on to the system.
# Who
The list of all logon users is displayed. You may need to send an email or broadcast message to let the user know the system
Close soon.

3. Shut down the system.
# Shutdown-iinit-level-g grace-period-y

-I init-level: Is the system entry different from the default S level? Nit level. Options include 0, 1, 2, 5, and 6.
Running levels 0 and 5 are reserved for shutting down the system. Run level 6 is used to reboot the system.
Runlevel 2 can be used for multi-user operations.
-G grace-period indicates the time (in seconds) before the system is shut down ). The default value is 60 seconds.
-Y: Continue to shut down the system without any intervention. Otherwise, the system will prompt you to continue the execution in 60 seconds.
Close the process.

4. If the system requires confirmation, Type y.
Do you want to continue? (Y or n): y
If the shutdown-y command is used, the system does not prompt you to continue the operation.

5. If the system prompts, enter the superuser password.
Type Ctrl-d to proceed with normal startup,
(Or give root password for system maintenance): xxxxxx

6. After completing the system management task, press Control-D to return to the default system running level.

7. You can use the following table to check whether the system is at the running level specified in the shutdown command.




Example 1: Type A server with a running level of S.

In the following example, you can use the shutdown command to enable a Linux-based system to enter the running level S (single-user level) within three minutes ).
# Who

Root console Jun 14 :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
#

Example 2: Type A server with a running level of 0.

In the following example, the shutdown command is used to enable a Linux-based system to enter the running level 0 within 5 minutes without additional validation.

# Who

Root console Jun 17 :39
Userabc pts/4 Jun 17 :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

Example 3: Linux: reboot the server to transport level 3

In the following example, the shutdown command can be used to redirect a Linux-based system to runtime Level 3 within two minutes. No additional validation is required.

# Who

Root console Jun 14 :49 (: 0)
Userabc pts/4 Jun 14 :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:

If the system is shut down for any reason, it may need to be returned to runtime Level 3. At this level, all file resources can be used and users can log on.

How to disable an independent system

1. Become a Super User or assume an equivalent role.
A role contains commands that grant permissions and have certain permissions. More information about roles.

2. Shut down the system.
# Init run-level
The run-level identifies the new running level.

3. Use the following table to check whether the system is at the running level specified in the init command.




Example 1: enable the independent system to enter the running level 0

In this example, the init command enables an x86-based independent system to enter a safe power-off level.
# 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

Example 2: using a Linux instance

In this example, the init command can be used to enable the standalone system (single-user level) to enter the running level S (single-user level ).
# 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
#
If the system is shut down for any reason, it may need to be returned to runtime Level 3. At this level, all file resources can be used and users can log on.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.