The first chapter of cloud computing: the server hardware and linux first experience

Chapter One: server hardware and linux first experience

First, understand the linux;

1.linux of three branches: debian, redhat, ubuntu

2.redhat version:

  redhat: Red Hat, referred to as RHEL, enterprise-level official version, the free version;

  centos: business community operating system version, does not belong to Red Hat, but be based on source community version of Red Hat's reconstruction, code components;

3. Install linux system Precautions:

  . A CD-ROM into the ISO file, click on the link;

  . B Select Now custom installation package, check the development of tools when using the default disk partition, the installation system;

4. The specific parameters:

  Zoning: Zoning can be understood as a house of partition;

  File system: A method for the external storage device management and organization of files, it can be understood as a house renovation program;

  Format: can be understood as the beginning of the decoration of a house, clear out all previous configuration;

5. Upon completion of the installation system optimization:

  关闭selinux:sed  -i  "/SELINUX/s/enforcing/disabled/g"  /etc/selinux/config

  Boot does not start the firewall: chkconfig iptables off

  Verify selinux is closed: getenforce

File system type 6.centos 6 version of the system:

  EXT4: fourth generation extended file system, the main area for storing data files and directories;

  SWAP: swap file system, a swap partition for linux system, can alleviate the shortage of physical memory;

Attachment:

Centos virtual machine installation steps:

  1. Download the image files and virtual machine software;

  2. Create a virtual machine in vmware;

  3. Connect centos6.5DVD1 image file;

  4. The mounting system (desktop environment can be selected or minimum installation, note that the check tools);

  5. Close the firewall;

    /etc/init.d/iptables stop ## temporarily shut down the firewall state

    chkconfig iptables off ## Power disable the firewall

  6. Close selinux:

    Find the system / etc / selinux / config file selinux = enforcing into selinux = disabled;

  7. easy to take snapshots off the next use;

Two, init process;

1.linux system boot:

  Boot bios POST --MBR guide --GRUB guide - load the kernel - Load init process - start tty-- landing system

 

2.init process:

  Process: linux process in the system with PID tag, / sbin / init is first loaded kernel process, PID is 1;

  Run level field: runlevel

    0-- single-user shutdown 1-- 2-- 3-- no network character complete character 4-- 5-- not use graphics mode 6-- restart

  init run levels: this command indicates switching to a different operating state levels

Third, the system services control:

1. control of a state of the service:

  Syntax: service name of the service control type

  Control Type: start ## to start the service

                      stop ## stop this service

                      restart ## Restart the service

                      reload ## reload this service

                      view the status of the service status ##

2. The control of the service status of two:

  Syntax: /etc/init.d/ service name type of control

  Control Type: ditto the same type of control

3. control the startup type of services (whether to activate the boot):

  Syntax: chkconfig service name type of control

  Control Type: on ## boot automatically start this service

                      off ## boot does not start this service

  Syntax: chkconfig --list service name ## view this type of state service starts running at different levels of

  语法:chkconfig --add 服务名称                ##添加此服务到ckhconfig的管理列表中

四、扩展:

  uname -r                 ##查看内核版本信息

  uname -a                  ##查看系统版本信息

  free -m                     ##查看系统内存状态信息

  df -hT                        ##查看系统磁盘信息

  hostname                 ##查看主机名

五、Centos 7 扩展:

1.systemctl进程:代替在Centos 6中的init进程,因为init进程启动时是串行化的,速度较慢,Centos 7在这一点做了优化;

2.运行级别:

 

systemctl  get-default                                    ##查看当前的默认运行级别

systemctl  set-default  运行级别标签          ##设置系统的默认运行级别

init 运行级别数字                                           ##切换当前的运行级别

Guess you like

Origin www.cnblogs.com/zonkidd/p/11919244.html
Recommended