Python Full Stack road Day5 (complement)

Source: Internet
Author: User

first edited September 21, 2017 23:05:29

Summary
I. System monitoring
Two. RPM Package Management
Three. Yum Package management
Four. Source installation Python Interpreter
Homework
Summary today

Summary

Citation: Mr. Haifeng

    1. System Monitoring
    2. RPM Package Management
    3. Yum Package Management
I. System monitoring
  1. concept of virtual memory and settings and management: Virtual memory is a piece of hard disk space is used as memory, also known as swap partition (swap)
    • mkswap : Set swap partition
      • m KSWAP/DEV/SDB2 : Set partition/DEV/SDB2 to swap partition
    • swapon : Start swap partition
    • s Wapon–a : Start all swap partitions
    • swapon–s : Lists the status of all system swap partitions currently in use
    • free View memory information
    • buffer&cache : Buffer is used to store the data to be output to disk, and the cache is the data read from the disk (read into memory)
    • strong>used memory =total-buffer/cache-free
  2. Process Management
    • Top: When the system status is listed, the system defaults to refresh the display results every 5 seconds on the screen
    • PS aux: View process
    • PS aux | grep character : Displays a process that contains characters
    • kill-9 PID: Forced kill process
    • pkill-9 Process name : Force Kill Process
    • Process &: running in the background
    • Jobs: View the current terminal running process
    • kill-9% Work number : Forced kill process
    • pgrep Process name display process PID
    • pstree: Displaying programs in a tree view
Two. RPM Package Management
    1. RPM Definition: RPM is the abbreviation for Red Hat package Manger
    2. The rpm file name is divided into 5 parts
      • The 1th part is name, which indicates the names of the RPM packages;
      • The 2nd part is version, which indicates the revision number of the RPM package;
      • The 3rd part is release, which indicates the number of releases (fixed number) of this RPM package;
      • Section 4 is architectures, which indicates which platforms this RPM package applies to;
      • The last part is RPM, which indicates that the RPM package file extension
    3. Frequently used options in RPM software Installation and removal work
      A) –i: Installation (install) software.
      b) –U: Upgrade (Upgrade) old version of the software.
      c) –e: Remove/Remove (Erase) software.
      d) –v: Displays detailed processing information.
      e) –h: Displays the installation progress. Uninstall is not available
      RPM-IVH Package Name: Installing the RPM software
    4. Querying for Installed package information
      • RPM-QL Package name : Query Installation location
      • RPM-QF file name : What package the file was generated from
      • RPM-QI Package name : View package information
      • RPM-QA |grep Package name : A package is not installed from all installations
      • RPM-E Package : Uninstalling the Package
Three. Yum Package management
  1. CD mount and mirrored mount
    • CD Mount : Mount/dev/sr0 mount point or Mount/dev/cdrom mount point
    • Mount of image file : mount-o loop-t iso9660 image file mount point
  2. Configuration of Yum
    • Yum makecache-y: Loading a repo file to speed up package installation
    • One is to configure the yum.conf file directly in the/etc directory
    • Add. repo files under the/ETC/YUM.REPOS.D directory
  3. Yum command
    1. Yum clean all is used to clear the Yum cache
    2. Yum-y Install epel-* all Epel-related packages
    3. Yum Makecahe-y is used to build caches, and it's much quicker to download packages later.
    4. Yum Erase httpd-*-y Delete all httpd-packages
    5. Creatrepo self-built warehouse dependencies
  4. Yum Summary
    1. To modify the location of the Yum installation package that Yum downloads
      • View cat/etc/yum.conf file
      • Open the/etc/yum.conf file and rewrite
        Cachedir=/rpm_bak (the equal sign is followed by the specified directory, which is used to store the packages downloaded from the web later)
        Keepcache=1 (changed from 0 to 1)
      • Download yum install package to warehouse
      • Creatrepo Path : establishing dependencies
      • cd/etc/yum.repos.d/: View the network yum source
      • Create a local Yum source Local.repo
      • Local Yum source content
        [Local]
        Name=local Repo
        Baseurl=file:///opt
        Enabled=1
        Gpgcheck=0

        That is , the custom yum Source: Download the package file into the specified folder Createrepo the specified folder edit/ETC/YUM/REPOS.D join the dependent file
Four. Source installation Python Interpreter
    1. Installing software development tools
      1. Yum Grouplist | More
      2. Yum groupinstall ' dev tool '-y
    2. Unzip the source package CD in configure represents a script file./configure--prefix=/usr/local/python3.6 indicates that the source package is installed in this directory/usr/local: User-level program directory, can be understood as c:/ Progrem files/. User-compiled software is installed by default in this directory (after the equals sign is the source installation path)
    3. After the source is installed, compile make and install make &&
    4. Path=/usr/local/python3.6/bin:&path: Modify the environment variables so that python can be used in the current directory (understand PATH and: add after)
    5. add Path=/usr/local/python3.6/bin:&path to/etc/profile: permanently modified
Homework
    1. System monitoring. Jobs
      1) Real-time dynamic monitoring System Status
      2) exit the previous step
      3) Turn on the top process
      4) Use the PS command to view the top command's PID and kill
      5) View process tree for process with PID 2
      6) Open Firefox browser
      7) Look for a process named Firefox
      8) Kill the process called Firefox
      delivered jobs: system monitoring. Jobs
    2. RPM Package management. Jobs
      1) Mount the disc file to the/media directory
      2) Enter the packages directory under the/media directory
      3) View all RPM packages installed on the system
      4) Check to see if the system is installing DHCP packages
      5) Install the DHCP package
      6) View information for DHCP packages
      7) View all files included in the DHCP package
      8) See which package generated the/bin/ls file
      9) Uninstalling the DHCP package
      Homework Delivered: RPM Package management. Jobs
    3. Yum Management RPM Package
      1) To minimize the start of the Linux system
      2) Configure local Yum
      3) Install Vim
      4) Clear Yum Cache
      5) Install the component "KDE desktop"
      paid jobs:Yum manages rpm packages. Jobs
Summary today
    1. Familiar with memory common commands, memory management buffer and cache, and familiar with used memory =total-buffer/cache-free
    2. Master rpm, yum software package, binary installation, production of your own Yum source, source installation

Python Full Stack road Day5 (complement)

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.