1. Distinguish the role of RPM-QI-QF-QL-QA four different combinations of options?

Source: Internet
Author: User
Tags gpg php website tidy

1. Distinguish the role of RPM-QI-QF-QL-QA four different combinations of options?

A: Rpm-qi package name to view a package details

RPM-QF file name to see which package the file was installed by

RPM-QL package name see which files are installed in a package

Rpm-qa to see which packages are installed in the system

2. Rpm-qi what information will be displayed if followed by a package name that is not installed?

Answer: Package name is not installed

3. Please find out which RPM package This command was installed in?

Answer: RPM-QF ' which vim '

4. What are the commands for installing and uninstalling a package using RPM?

Answer: Install: Rpm-i package name or RPM--install package name

Uninstall: RPM-E package name or RPM--erase package name

5. When installing a package with RPM, how do I ignore dependencies and force the package to be installed?

Answer: Rpm-i--nodeps Package Name

6. How do I upgrade a package using RPM?

Answer: RPM-UVH Package Name

7. Use Yum to search for RPM packages that contain the keyword "tidy", install them, install them, and then use Yum to uninstall them.

Answer: Yum list |grep tidy

Yum install-y Tidy

Yum Remove tidy

8. How can I use Yum to download a RPM package?

Answer: Yum install-y yum-plugin-downloadonly# Install download plugin

Yum Install package name--downloadonly--downloaddir=/tmp/#仅下载一个没安装的包vte到目录/tmp/

Yum Reinstall package name--downloadonly--downloaddir=/tmp/#下载一个安装过的包

9. Please download a PHP source package to the official PHP website and try to compile and install it. (PHP website address http://www.php.net/)

Answer: Download the source package php-7.1.0.tar.gz

TAR-ZXVF php-7.1.0.tar.gz

CD php-7.1.0

./configure--PREFIX=/USR/LOCAL/PHP7

Error: Configure:error:xml2-config not found. Please check your LIBXML2 installation.

Yum List |grep XML2

Yum Install-y libxml2*

./configure--PREFIX=/USR/LOCAL/PHP7 Configuration

echo $? Return 0 indicates a successful configuration

Make compilation

echo $? Return 0 for compilation success

Make install Installation

echo $? Return 0 indicates successful installation

10. Check the data to see the difference between Yum upgrade and Yum update? Under what circumstances are they used?

A: Yum--help sees:

Update updates one or more packages in the system

The upgrade update package also considers the package substitution relationship

Yum upgrade and Yum Update are all capable of updating all software packages of the system, and the difference is that upgrade is quite a large-scale upgrade, with the older packages also upgraded. Update and upgrade the focus is not the same, update is mainly to make the software up-to-date, but upgrade more focused on the software features get a big promotion, different from the frequent release of the latest patches. Upgrade does not change the software settings and system settings, the system version upgrade, the kernel does not change, update changes the software settings and system settings, the system version of the kernel are upgraded.

Yum Upgrade: For large-scale version upgrades, updating Linux systems and the entire software version

Yum Update: For installing patch files, updating kernels and packages to the latest

11. How do I see if a package is installed on the Linux system (CentOS)?

Answer: Yum List installed | grep package name or Rpm-qa | grep Package Name

/configure: After the completion of the complete, do not know whether there is no success, with what command can be verified?

Answer: Use "echo $?" command to see if the previous command execution succeeded, the return code of "0" indicates success, and a nonzero indicates an error.

13. If this error occurs in./configure, "configure:error:no acceptable C compiler found in $PATH" What should we do?

A: The available C compiler is not found in the path indicated by the current user's environment variable $path, and GCC needs to be installed:

Yum install-y gcc

14. Sometimes, you forget how a compilation parameter is written, what do you do?

Answer: Check the Help documentation, readme,install,configure, etc., or use the./configure--help

15. How do I build a yum repository using CDs?

Answer: mount/dev/cdrom/mnt/

Cd/etc

Cp-r Yum.repos.d/yum.repos.d.bak to back up the configuration file folder

CD YUM.REPOS.D switch to the configuration folder

RM-RF Centos-base.repo Delete the configuration file Centos-base.repo, do not use the network Yum source

Vim Centos-media.repo Edit configuration file Centos-media.repo

Modify its contents as follows:

[Local_cdrom]

Name=cd

baseurl=file:///mnt/

Gpgcheck=0

Enabled=1

#gpgkey =file:///etc/pki/rpm-gpg/rpm-gpg-key-centos-6~

Esc:wq

The name on the right side of the Yum list becomes local_cdrom.

Yum grouplist view available packages for local Yum

lang=en Switch to English

Yum groupinstall-y "Khmer support" installs a language suite from a well-crafted local Yum source


1. Distinguish the role of RPM-QI-QF-QL-QA four different combinations of options?

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.