"First article": Installation of Linux system and service control

Source: Internet
Author: User

Introduction to the skills of this article

Learn how to install the Red Hat Linux operating system
Learn about the boot process for Linux systems
Learn how to control system services in Linux
Learn how to optimize startup tasks for Linux

Red Hat Series Linux distributions

Red Hat Enterprise Edition
Red Hat Enterprise Linux (RHEL)
Currently the latest version is rhel7.x
Http://www.redhat.com
Fedora Community Edition
Maintained by Red Hat-funded community, targeted to individual desktop users
Currently the latest version is Fedora 21
http://fedoraproject.org

CentOS Community Edition
Community Enterprise Operating System (Community business operating system)
Currently the latest version is CentOS 7.x
http://www.centos.org

Installation steps:
1. Insert the RHEL6 installation disc to boot the installer
Set the host boot device as the optical drive
Booting the host from the installation CD
2. Detecting the integrity of the installation disc
3. Configuring the Setup program
Select the installation process display language, keyboard type, initialize disk, partition
Set network address, System time zone, Administrator password
Customizing the packages to be installed
4. Copy the files and complete the installation process
Takes 10-30 minutes
5. Initializing the Rhel 6 system

The disk partition represents:

Linux drives, partitions, and other devices are represented as files

  

Hard disk and partition structure

The number of primary partitions is only 4 , and the logical partition starts with the number 5

For example: The 1th partition in the first IDE hard disk is represented as "hda1", the 2nd partition is "Hda2", the 1th partition in the second SCSI is represented as "SDB1", the 3rd partition is "SDB3", and the 5th partition is represented as "SDB5" (logical partition)

    

File system type:

1. File system types currently used by default for RHEL6
EXT4, 4th Generation Extended (Extended) file system, a partition for storing file and directory data, RHEL6 the file system used by default
Swap, swap file system, virtual memory to some extent alleviate the problem of insufficient physical memory, generally set to 1.5~2 times of physical memory

If the physical memory is large enough, you can not set the
Other file system types supported by 2.Linux
FAT16, FAT32, NTFS
XFS, JFS
......

Initialize the RHEL system:

  

After the RHEL system is installed:

Tips for Beginners
Close Iptables

Syntax: #chkconfig iptables off

Close Sellinux
Mouse Double click Open/etc/sysconfig/selinux File
Modify "selinux=disabled"
Exit after saving

Rebooting the system

boot process for Linux operating system:

Post (BLOS)---->MBR boot---->grub menu----> Load kernel (Kernel)---->init process initialization

  

Init process:

Run/sbin/init program loaded by Linux kernel
Is the first process in a system
PID (Process tag) number is always 1

Inittab configuration file:

Related configuration Files
Scatter various initialization configurations
Related Start-up events

Structure of the Inittab file:

  

Runlevels Operating level:

0: Turn off the machine

1: Single user mode, no password Authentication required to log into the system, more for system maintenance

2: Multi-user mode for character interface (network access not supported)

3: Full multi-user mode for character interface (most server hosts run at this level)

4: Not assigned to use

5: Graphical interface for multi-user mode, provides a graphical desktop operating system

6: Reboot, reboot the host

Only the default run-level configuration is left in the RHEL6/etc/inittab file

    

  Please think??
How is the 3rd logical partition of the 2nd SCSI Drive represented?
RHEL6 what type of file system is used by default?
What is the PID of the Init process?
How do I set the operating level of the system default startup?

System Service Control

Common ways:

Service Name control type

/etc/rc.d/init.d/Service Name control type

Control type:

Start: Startup
STOP: Stop
Restart: Restart, stop the service first, and then restart
Reload: Reload, do not stop the service, just refresh the configuration, more secure, some services are the same as the restart operation
Status: View service status

Cases:

Service Crond

Service Crond Status

To view the run level:

[Email protected] ~]# RunLevel
N 5
[[Email protected] ~]# Init 3
[Email protected] ~]# RunLevel
5 3
[[Email protected] ~]# Init 6
[[Email protected] ~]# init 0

  

Optimize the startup process:

System Services Administration Tools

    NTSYSV Tools
Provides an interactive, visual window
Can be run at the character terminal
Facilitates centralized management of multiple services

Cases:

NTSYSV--level Level list (0~6)

        

    chkconfig Tools
Do not provide interactive, visual windows
More efficient management of individual services

To view the startup status of a system service:

Chkconfig--list
Chkconfig--list Service Name

        

Set the startup status of a system service

Chkconfig--level Level list service name On|off

"First article": Installation of Linux system and service control

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.