Home  >  Article  >  Operation and Maintenance  >  How to install software on centos

How to install software on centos

王林
王林Original
2020-03-17 17:03:555105browse

How to install software on centos

1. Installation of rpm package:

      1.安装一个包
  # rpm -ivh
  2.升级一个包
  # rpm -Uvh
  3.移走一个包
  # rpm -e
  4.安装参数
  --force 即使覆盖属于其它包的文件也强迫安装
  --nodeps 如果该RPM包的安装依赖其它包,即使其它包没装,也强迫安装。
  5.查询一个包是否被安装
  # rpm -q < rpm package name>
  6.得到被安装的包的信息
  # rpm -qi < rpm package name>
  7.列出该包中有哪些文件
  # rpm -ql < rpm package name>
  8.列出服务器上的一个文件属于哪一个RPM包
  #rpm -qf
  9.可综合好几个参数一起用
  # rpm -qil < rpm package name>
  10.列出所有被安装的rpm package
  # rpm -qa
  11.列出一个未被安装进系统的RPM包文件中包含有哪些文件?
  # rpm -qilp < rpm package name>

Recommended tutorial: centos usage tutorial

2. Uninstallation of rpm package :

rpm -qa | grep 包名
     这个命令是为了把包名相关的包都列出来     
      rpm -e 文件名
    这个命令就是你想卸载的软件,后面是包名称,最后的版本号是不用打的
   例如:
     # rpm -qa |  grep mysql
      mod_auth_mysql-2.6.1-2.2 
      php-mysql-5.3.9-3.15 
      mysql-devel-5.1.77-1.CenOS 5.2
      mysql-5.0.77-1.CenOS 5.2
      mysqlclient10-5.0.77-1.CentOS 5.2
      libdbi-dbd-mysql-0.6.5-10.CentOS 5.2
   # rpm -e mysqlclient

3. yum installation:

# yum install 包名

4. yum uninstallation:

# yum -y remove 包名

Related video tutorial recommendations: linux video tutorial

The above is the detailed content of How to install software on centos. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn