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
- System Monitoring
- RPM Package Management
- Yum Package Management
I. System monitoring
- 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
- 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
- RPM Definition: RPM is the abbreviation for Red Hat package Manger
- 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
- 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
- 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
- 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
- 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
- Yum command
- Yum clean all is used to clear the Yum cache
- Yum-y Install epel-* all Epel-related packages
- Yum Makecahe-y is used to build caches, and it's much quicker to download packages later.
- Yum Erase httpd-*-y Delete all httpd-packages
- Creatrepo self-built warehouse dependencies
- Yum Summary
- 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
- Installing software development tools
- Yum Grouplist | More
- Yum groupinstall ' dev tool '-y
- 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)
- After the source is installed, compile make and install make &&
- 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)
- add Path=/usr/local/python3.6/bin:&path to/etc/profile: permanently modified
Homework
- 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
- 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
- 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
- Familiar with memory common commands, memory management buffer and cache, and familiar with used memory =total-buffer/cache-free
- Master rpm, yum software package, binary installation, production of your own Yum source, source installation
Python Full Stack road Day5 (complement)