Knowledge about rpm packages and files in linux

Source: Internet
Author: User
Tags rpmbuild

Knowledge about rpm packages and files in linux rpm-qpl xxxxxx. rpm 1. How to install the rmp package of the rpm package can be completed using the program rpm. Run the following command rpm-I your-package.rpm where the your-package.rpm is the file name of the rpm package you want to install, typically placed under the current directory. The following warning or prompt may appear during installation :... conflict... it may be that some files in the package to be installed may overwrite the existing files. In this case, you cannot correctly install them by executing rpm -- force-I... is needed ...... is not installed... you can use rpm -- nodeps-I to ignore the required software. That is to say, rpm-I -- force -- nodeps can ignore all dependencies and file problems, any package can be installed, but this forced installation package cannot make full use of the function 2. how to install. src. rpm Software Package IXDBA. some software packages in the NET technical community are. src. this type of software package is an rpm package that contains the source code and needs to be compiled during installation. This type of software package has two installation methods: 1. run rpm-I your-package.src.rpm 2. cd/usr/src/redhat/SPECS 3. rpmbuild-bp your-package.specs A specs file with the same name as your package 4. cd/usr/src/redhat/BUILD/your-package/a directory with the same name as your package 5 .. /configure is the same as compiling common source code software. parameter 6 can be added. make 7. make install method 2: 1. run rpm-I you-package.src.rpm 2. the first two steps of cd/usr/src/redhat/SPECS are the same as those of method 1. 3. rpmbuild-bb your-package.specs A specs file with the same name as your package at this time, in/usr/src/redhat/RP M/i386/(depending on the specific package, it may be i686, noarch, etc.) in this directory, there is a new rpm package, which is a compiled binary file. Run the rpm-I new-package.rpm to complete the installation. 3. how to uninstall the rpm package using the command rpm-e package name. The package name can contain the version number and other information, but cannot have a suffix. rpm-e proftpd-1.2.8- 1 rpm-e proftpd-1.2. 8 rpm-e proftpd-rpm-e proftpd may not be in the following format: rpm-e proftpd-1.2.8-1.i386.rpm rpm-e proftpd-1.2.8-1. I 386 rpm-e proftpd-1. 2 rpm-e proftpd-1 sometimes has some errors or warnings :... is needed... this indicates that this software is required by other software and cannot be detached at will. You can use rpm-e -- nodeps to forcibly uninstall it. 4. how to get the files in the rpm package without installing rpm2cpio and cpio rpm2cpio xxx. Rpm | cpio-vi rpm2cpio xxx. rpm | cpio-idmv rpm2cpio xxx. rpm | cpio -- extract -- make-directories parameter I is the same as extract, which indicates extracting files. V indicates that the execution process d is the same as make-directory, and the directory m is created based on the original path of the file in the package, which indicates that the file update time is maintained. 5. how to view rpm package-related files and other information all of the following examples are assumed to use the software package mysql-3.23.54a-11 1. the rpm-qa packages installed in my system list all installed packages. If you want to find all installed packages that contain a string of SQL, rpm-qa | grep SQL 2. how to obtain the full name of a software package file rpm-q mysql can obtain the full name of the mysql software package installed in the system, and obtain the version of the current software package. In this example we can get information mysql-3.23.54a-11 3. Where is the file installed in an rpm package? Rpm-ql package name note here is the name of the package that does not include the. rpm suffix that means you can only use mysql or mysql-3.23.54a-11 instead of mysql-3.23.54a-11.rpm. If you only want to know where the executable program is put, you can also use which, such as which mysql 4. an rpm package contains files that have not been installed. Use rpm-qlp ****. rpm is a software package that has been installed. You can also use rpm-ql ****. rpm 5. how can I obtain the version, purpose, and other information about a software package? For a software package that has not been installed, use rpm-qip ****. rpm is a software package that has been installed. You can also use rpm-qi ****. rpm 6. which software package is installed for a program, or which package contains this program rpm-qf'which program name' returns the package's full name rpm-qif 'which program name' returns information about the package rpm-qlf 'which program name' note, it is not a quotation mark, but a key in the upper left corner of the keyboard. You can also use rpm-qilf to output the package information and file list at the same time. which software package is installed for a file, or which software package contains this file. Note that the method in the previous question only applies to executable programs. The following method, it can be used not only for executable programs, but also for common files. The premise is that you know the file name. First, obtain the complete path of the program. You can use whereis or which, and then use rpm-qf for example: # whereis ftptop: /usr/bin/ftptop/usr/share/man/man1/ftptop.1.gz # rpm-qf/usr/bin/ftptop proftpd-1.2.8-1 # rpm-qf/usr/share/doc/proftpd-1.2.8/ rfc/rfc0959.txt proftpd-1.2.8-1 summary: to obtain information about the software package, use rpm-q and q to query the query. You can use other options, such as I to represent info, to obtain the information about the software package. Use l to represent list and obtain the file list; a Indicates all, and queries are executed in all packages; f indicates file, and related queries are performed based on files; p indicates package. grep can be used to generate the query conditions required for queries based on software packages, or from" The command line in ''generates 6. knowledge about rpm Software Package 1. what is rpm, that is, RedHat Package Management, is one of the RedHat inventions 2. why is rpm required in an operating system? install software packages that implement various functions. These software packages generally have their own programs, but they also have intricate dependencies. It also needs to solve the software package version, installation, configuration, and uninstall automation problems. To solve these problems, RedHat puts forward a good way for its own system to manage thousands of software. This is the RPM management system. After the rpm management system is installed in the system, as long as it is a package that meets the rpm file standards, you can easily install, upgrade, and uninstall 3. is it true that all linux systems use rpm and require a package management system? Therefore, many linux systems use rpm. However, the rpm System is dedicated to RH, but all systems such as TL and Mandrake also use rpm. Since the rpm source program can be compiled on other systems, it is possible to use rpm on other systems. In addition to rpm, some other systems also have their own software package management programs, for example, deb package in debian, slakware also has its own package management system 4. why is the rpm package file name so long? The rpm package file name contains the version information, operating system information, hardware requirements, and so on. For example, in the mypackage-1.1-2TL.i386.rpm, mypackage is the name of the software package registered in the system 1.1 is the software version number, 2 is the release number, TL represents for the TL operating system, or it may be RH and so on. I386 indicates that it is used on intel x86 platform, or it may be a type. 5. The i386 and i686 in the package file name contain not only the software name and version information, but also the information about the applicable hardware architecture. I386 indicates the software package is applicable to computers with x86 architectures of intel 80386 or above (AI32) i686 indicates the software package is applicable to computers with x86 architectures of intel 80686 or above (Pentium pro or above) (IA32) noarch indicates that this software package is not related to the hardware architecture and can be used in general. The program of the i686 software package is generally optimized for the CPU, so backward compatibility is used for comparison. The i386 package can be used on x86 machines. Forward is generally incompatible. However, the CPU below the Pentium pro is rarely used on current computers. Generally, the configured machines can use the i686 software package. 6. Can the rpm packages released by different operating systems be mixed? For rpm packages that have been compiled into binary files, they cannot be mixed due to different operating systems. Software packages released with src. rpm can be installed on different systems because local compilation is required during installation. 7. some special problems encountered when using rpm q I use rpm-e **. rpm cannot delete rpm package A. The package name does not include rpm or rpm-e. It can contain version numbers and other information, but cannot have A suffix. rpm Q: Are there tools for reading RPM files in MS systems? A wincmd with rpm plugins... Q Can I install and upgrade the rpm package through ftp? A can. Rpm-ivh ftp: // xxxxxxxx/PATH2SomeRPM Q What should I do if the existing package version is too high during rpm installation? A sometimes because the installed software package is too old and the related software package version in the system is relatively new, some files on which the package to be installed may not be found. There are two solutions. The first is to find a file with the same or similar functions as the desired file in the system file and link it with a symbol to the desired directory. The second is to download and install the new version of the software package.

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.