首页 技术 正文
技术 2022年11月18日
0 收藏 773 点赞 2,616 浏览 1583 个字

1.使用yum安装和卸载软件

主要功能是更方便的添加/删除/更新RPM包.它能自动解决包的倚赖性问题.它能便于管理大量系统的更新问题一、yum list|more               列出所有包文件,可搭配grep查询软件包,如yum list |grep kernel二、yum info xxx                 显示包xxx详细信息,即使xxx没有安装三、yum update kernel       用yum升级内核四、yum update                 全面升级系统五、yum list available         列出升级源上所有可以安装的包(List all packages in the yum repositories available to be installed.)六、yum list updates           列出升级源上所有可以更新的包(List all packages with updates available in the yum repositories.)七、yum list installed          列出已经安装的包八、yum install xxx              安装xxx包九、yum update xxx            升级xxx包十、yum remove xxx            删除xxx包

 2.使用systemctl启动关闭后台服务

任务 旧指令 新指令
使某服务自动启动 chkconfig –level 3 httpd on systemctl enable httpd.service
使某服务不自动启动 chkconfig –level 3 httpd off systemctl disable httpd.service
检查服务状态 service httpd status systemctl status httpd.service (服务详细信息) systemctl is-active httpd.service (仅显示是否 Active)
显示所有已启动的服务 chkconfig –list systemctl list-units –type=service
启动某服务 service httpd start systemctl start httpd.service
停止某服务 service httpd stop systemctl stop httpd.service
重启某服务 service httpd restart

systemctl restart httpd.service

  3.RPM软件包(yum不好使的时候用)

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>

 4.

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,083
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,558
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,407
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,180
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,817
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,900