Linux notes: linux software package management

Source: Internet
Author: User

Linux notes: linux software package management
Introduction to linux software packages: 1. source code package (source code written in C language, not compiled): script installation package (source code package for installation and optimization) Advantages: open source, you can freely select the required functions for compilation and installation, which is more suitable for your system. It is stable and efficient to uninstall (directly Delete the installation directory without any junk files). Disadvantages: installation is complex and slow. 2. binary Package (Compiled binary machine language pack): RPM package (the Binary Package in centos is an RPM package, which is the default package) Advantages: the package management system is simple, you can install, upgrade, query, and uninstall packages using only a few commands. The installation speed is fast. Disadvantage: the source code is no longer visible; the software package has serious dependencies. ---------- RPM package management-general naming rules for RPM command Management full name of RPM package: package name-software version-number of software releases. suitable for linux platforms. suitable hardware platform. rpm RPM package dependency: install an rpm package depends on another rpm package file dependency: install an rpm package depends on the file library file dependency in another package query Website: www.rpmfind.net RPM installation: rpm-ivh package full name option:-I installation-v display details-h display progress -- nodeps does not detect dependency RPM package upgrade: rpm-Uvh package full name option: -U upgrade RPM package uninstall: rpm-e package name option:-e uninstall -- nodeps does not check dependent RPM package query: 1. run the rpm-q package name rpm-qa command to check whether all installed rpm packages are installed. query package details: rpm-qi package name option:-I query information of the installed package rpm-qip package full name option:-p query uninstalled package information 3. Query the file installation location in the package: rpm-ql package name option:-l file installation location list-p query uninstalled package information 4. which rpm package does the Query System File belong to? rpm-qf System File Name? 5. query the dependency of a software package: rpm-qR package name option:-p query the dependency information of an uninstalled package (the full name of the package is required) rpm package validation rpm-V package name purpose: check whether the files in the package are modified. Extract the full name of the rpm2cpio package from the rpm package | cpio-idv file absolute path: recovery of accidentally deleted files ---------- RPM package management-yum online management will automatically solve the rpm package dependency problem. Ip Address Configuration: Intranet access, only the ip address and subnet mask are required. If you want to access the Internet, you also need a gateway and dns. Configuration steps: 1. use setup tool: setup2. modify the configuration file:/etc/sysconfig/network-scripts/ifcfg-eth0, change ONBOOT to "yes", start Nic 3. restart network service: service network restart network yum Source: Default yum source configuration file:/etc/yum. repos. d/CentOS-Base.repo other yum sources are also in the current directory yum command: Query: yum list # query all available package list yum search keywords # search and keyword related package installation: yum-y install package name option:-y automatically answers yes upgrade: yum-y update package name uninstall: yum-y remove package name # The packages on which the unmounted package depends will also be uninstalled. Therefore, uninstalling the package with yum may cause serious problems. Use the CD as the yum Source: 1. attach a CD 2. invalidates all network yum sources and adds a suffix to the file names of all yum sources.. Bak, making the system unable to recognize the repo file name. 3. Modify the yum source to make the address correct and take effect. ---------- Differences between source code package management source code package and rpm package: Differences before installation: Conceptual differences after installation: different installation locations. 1. the rpm package is installed in the default location: /etc/Configuration File Installation Directory/usr/bin/executable command installation directory/usr/lib/library function used by the program save location/usr/share/doc/manual/ usr/share/man/Help File 2. the source code package is installed in a specified location manually. It is generally caused by/usr/local/software name/installation location: the services installed in the rpm package can be managed using the System Service Management command: /etc/rc. d/init. d/xxx start, that is, services installed using the service xxx start source package cannot be managed by service management commands because they are not installed in the default path. Therefore, you can only use absolute paths for service management. Source code package installation process: 1. installation preparation: Install C language compiler gcc download source package 2. installation notes: source code storage location:/usr/local/src/software installation location:/usr/local/3. download the source code package during the installation process. decompress the downloaded source code package and enter the decompressed directory 4 .. /configure preparation before Compilation :. /configure -- prefix = installation directory 5. make compilation (from source code to binary code) 6. make install compilation and Installation

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.