Linux study Notes-Software Package management

Source: Internet
Author: User
Linux Study Notes & mdash; an example of managing RPM packages for 1 rpm packages: sudo-172p1-5el5i 386rpm this RPM Package name includes the software name sudo, version 172p1, release number 5el5, and hardware platform i386 (1) install the mounting disc: mkdirmntcdrommount Linux study Notes-software package management 1. an example of managing RPM packages for RPM packages: sudo-1.7.2p1-5.el5.i386.rpm this rpm Package name includes the software name sudo, version 1.7.2p1, release number 5. el5, and hardware platform i386 (1) mounting disc: mkdir/mnt/cdrommount/dev/cdrom/mnt/cdrom [plain] # rpm-ivh sudo-1.7.2p1-5.el5.i386.rpm-ivh is optional, generally, I is required. v indicates that the installation information is displayed, and h indicates that # indicates the installation progress in CentOs light. The disk contains binary packages of all core rpm. you can use the ls | grep sudo command to find several related commands of the sudo installation package: [plain] rpm-q sudo query whether the sudo tool has been installed with [plain] rpm-qa | grep sudo query other installation options for all sudo-related software packages: -- excludedocs does not install the document file in the software package -- prefix PATH to install the software package to a PATH specified by PATH -- test only tests the installation, not actually install [plain] rpm-ivh -- excludedocs sudo here -- excludedocs has two -- it doesn't make much sense for -- prefix PATH, because most rpm installation packages cannot specify the installation path. override installation when the following message is prompted when installing software with rpm-ivh: package sudo-1.7.2p1-5.el5.i386 is already ins To overwrite and install the package, use the -- replacekgs option B in the command line. file conflict if a file of the software package to be installed is already installed when other software packages are installed, the following error message is displayed: # rpm-ivh sudo-1.7.2p1-5.el5.i386.rpmconflicts with file from bark-3.2-11sudo-1.7.2p1-5.el5.i386.rpm cannot be installed if you want RPM to ignore this error message, you can use the -- replacefiles command line option C. the unresolved dependency RPM Package may depend on other software packages, which can be installed only after a specific software package is installed. # Rpm-ivh sudo-1.7.2p1-5.el5.i386.rpmfailed dependencies: sudo is needed by bark-3.2-11 you must install the dependent software package to solve this problem, force installation can use -- nodeps option (2) uninstall [plain] # rpm-e sudo note:. if other software packages are dependent on each other, a message is displayed during uninstallation. you can use-nodeps to forcibly uninstall B. rpm-e sudo the software name sudo is written here, instead of the software package name (3) upgrade [plain] # rpm-Uvh sudo-1.7.2p1-5.el5.i386.rpm note: below are several common commands for managing RPM packages in uppercase: command function: run rpm-qf to query the packages that belong to the File: rpm-qi, rpm-qip to query the package information: rpm-ql, rpm-qlp to query the package installation file: rpm-qd query package help File rpm-qc query package configuration file. rpm-qi is used to view information about installed software, while-qip is used to query information about uninstalled software packages. B. rpm-qi software name rpm-qip software package name c. run the rpm-ql sudo command to check which files are installed on the system. d. run the rpm-qlp package name to check the directories in which the software to be installed. e. rpm-qa | grep vim query installed software packages (4) verify [plain] # rpm-V software name rpm-V sudo is used to verify that the sudo software directory file is changed, if no changes are made, this command will not return any information. The following table lists the values returned by this command and their meanings: 5 File md5 checksum value S file size L link file T file creation time D device file U file user G File User Group M file permission for example, if this command returns 5, S, and T, the md5 value of the software is changed, the file size is changed, and the creation time is also changed.. (5) package file extraction. decompress all files to the current directory [plain] # rpm2cpio initscripts-8.45.30-2.el5.centos.i386.rpm | cpio-idv B. decompress the specified file to the current directory [plain] # rpm2cpio initscripts-8.45.30-2.el5.centos.i386.rpm | cpio-idv. /etc/inittab description: The first command is to extract all files of the software to the current directory, which is rarely used. for example, you accidentally delete important configurations of the system, if the file is not backed up, the system cannot be mounted. in this case, you need to use a CD to restore the deleted file. 2. YUM package management the advantage of using yum is that it not only automatically solves the dependency between software packages, but also facilitates software upgrades. The following are common yum management commands: command function yum install yum check-update check upgrade yum update upgrade yum list package query yum info package information yum remove uninstall yum-help, man yum help 3. sample Code package installation application (proftpd): [plain] # tar-xzvf proftpd-1.3.3d.tar.gz (extract package) # cd proftpd-1.3.3d #. /configure -- prefix =/usr/local/proftpd (configuration) # make (compilation) # make install (installation). the source code has good applicability and strong customization. you can configure B by yourself. some linux systems do not support rpm packages, but the source code installation package is suitable for various linux operating systems c. it is best to specify the installation directory when installing the source code. The installation of the pm package is different. the make and make install commands are not followed by the f. when you delete the software, the process is disabled first, and then the rm directory is 4. example of a script installation application (webmin): [plain] # tar-xzvf webmin-1.530.tar.gz # cd webmin-1.530 # vi README #. /setup. the sh script is usually a shell script or a java Script. the installation of the script is not much different from the installation of software in windows. 5. APT package management for Ubuntu linux operating systems, use APT package management software. Apt-cache search package apt-cache show package information apt-get install apt-get remove delete apt-get update software source apt-get upgrade update installed package
Related Article

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.