Home > Operation and Maintenance > CentOS > How to install software under centos

How to install software under centos

王林
Release: 2020-09-05 16:31:11
Original
21141 people have browsed it

How to install software under centos

The method to install software under centos is:

centos installation software command

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>
Copy after login

(Recommended tutorial: centos 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
Copy after login

3. yum installation:

# yum install 包名
Copy after login

4. Yum uninstallation:

# yum -y remove 包名
Copy after login

Recommended related video tutorials: linux video tutorial

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template