RHEL 6 System Management (1)

Source: Internet
Author: User

 

Start

Motherboard BIOS -- Grub -- kernel -- run-level results

Running level

0 Shutdown

1 single user (Repair Mode)

2. No NFS Mode

3. Full mode without image Interface

4. Custom Mode

5. Full mode with image Interface

6. Restart

 

Add password to Grub

Cd/boot/grub

Vi menu. lst

Add a row to timeout

Password

Save and exit

Grub-install -- no-floppy/dev/sda # Make the modified grub start content take effect

 

Modify the running level

Init number

 

Service

Chkconfig -- list # list service statuses (started)

Service name running status

Sshd 0: Disable 1: Disable 2: Enable 3: Enable 4: Enable 5: Enable 6: Disable

 

Modify

Chkconfig -- level 1 sshd on

The sshd service is started by default at runlevel 1.

Chkconfig -- level 1 sshd off

The sshd service is disabled by default at runlevel 1.

If no running level is set, the 2345 running level status is adjusted.

Chkconfig sshd on

Chkconfig sshd off

 

Xinetd is a special service.

For example, enable the telnet service.

First let the ekrb5-telnet be turned on

Xinetd is enabled.

If one of them is not enabled, the operation fails.

 

All xinetd-based services: The same as the method for enabling telnet

 

Restart service

Service name restart

 

Stop Service

Service name stop

 

Start the service

Service name start

 

* The firewall will affect services and disable the firewall.

Chkconfig iptables off

Service iptables stop

 

* Telnet cannot be used as the root user to log on directly. If you use a common user to log on, run su-to change to the root user.

 

/Etc/rc. d/rc. local

The last service executed when the system starts. It exists by default and is generally not canceled.

 

Programs and processes

View the programs currently running in the system

Ps-ax

-A for all users

-X expanded

 

Process number running Terminal status (S wait, s sleep, T is to stop the program, Z is a zombie program, R is running) How long to run the command

PID TTY STAT TIME COMMAND

1? Ss 0: 01/sbin/init

 

Top System Process Monitor

Top-09:53:35 (system time) up (system running time), 5 users (number of currently logged on users), load average: 0.00, 0.00, 0.01 (system load value)

Tasks: 197 total (number of system processes), 1 running (number of running), 196 sleeping (number of sleep), 0 stopped (stop not quit), 0 zombie (botnet)

Cpu (s): 0.2% us, 0.3% sy, 0.0% ni, 99.2% id (CPU remaining), 0.3% wa, 0.0% hi, 0.0% si, 0.0% st

Mem: 2980496 k total (total physical memory), 1023280 k used (maximum memory used), 1957216 k free (minimum idle), 132928 k buffers (Cache used for the Network)

Swap: 5079032 k total (total virtual memory), 0 k used (maximum virtual memory usage), 5079032 k free (minimum virtual memory idle ), 488952 k cached (memory ready for quick use)

 

Process No. User status CPU usage memory usage Run Time Command

Pid user pr ni virt res shr s % CPU % mem time + COMMAND

2869 root 20 0 2660 1120 R 848 1.0. 25 top

 

Memory computing

Maximum memory used-memory ready for quick use = memory used by the System

 

 

System load value (the usage of a computer is 10.00)

Every 3 minutes every 5 minutes every 15 minutes

Load average (average): 0.00, 0.00, 0.01

 

 

Close Process

Kill-9 process no.

-9 Force Execution

 

Killall-9 process name

-9 Force Execution

 

Scheduled tasks

Backup System users are required at every day

1. the/etc/passwd/etc/shadow/etc/group file to be backed up by the System user is the system's all user information files.

2. The/home directory contains the file directory of the System user.

Creation Method: copy the files and directories to the/sysbak directory at every day.

 

Crond Service

Crondtab-e: Enter scheduled task orchestration

Minute hour day month week command

0 1 * mkdir-p/sysbak

The time requirement must be that the table can appear.

Run every minute

*/1 ****

Hourly

0 */1 ***

Every day

0 0 */1 **

Monthly

0 0 0 */1 *

Every week

0 0 0 0 */1

 

Interval

1, 30 ****

 

Continuous

1-30 ****

 

0-7. Both 0 and 7 are sundays.

 

After the orchestration, restart the crond service.

Service crond restart

 

Date: view system time

Date-s 0059 modification time

 

 

 

This article is from the blog "Wang Dao-Xu zhongzhi (MakeWong )".

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.