常用的RPM软件包命令
命令 作用
rpm -ivh filename.rpm 安装软件
rpm -Uvh filename.rpm 升级软件
rpm -e filename.rpm 卸载软件
rpm -qpi filename.rpm 查询软件描述信息
rpm -qpl filename.rpm 列出软件文件信息
rpm -qf filename 查询文件属于哪个RPM
LINUX 6/7 yum
LINUX 8 dnf
常见的Yum命令
命令 作用
yum repolist all 列出所有仓库
yum list all 列出仓库中所有软件包
yum info 软件包名称 查看软件包信息
yum install 软件包名称 安装软件包
yum reinstall 软件包名称 重新安装软件包
yum update 软件包名称 升级软件包
yum remove 软件包名称 移除软件包
yum clean all 清除所有仓库缓存
yum check-update 检查可更新的软件包
yum grouplist 查看系统中已经安装的软件包组
yum groupinstall 软件包组 安装指定的软件包组
yum groupremove 软件包组 移除指定的软件包组
yum groupinfo 软件包组 查询指定的软件包组信息
RHEL 5/6 系统使用service
RHEL 7/8 系统使用systemctl
服务的启动、重启、停止、重载、查看状态等常用命令
老系统命令 新系统命令 作用
service foo start systemctl start httpd 启动服务
service foo restart systemctl restart httpd 重启服务
service foo stop systemctl stop httpd 停止服务
service foo reload systemctl reload httpd 重新加载配置文件(不终止服务)
service foo status systemctl status httpd 查看服务状态
RHEL 5/6 系统使用chkconfig
RHEL 7/8 系统使用systemctl
服务开机启动、不启动、看各级别下查服务启动状态等常用命令
老系统命令 新系统命令 作用
chkconfig foo on systemctl enable httpd 开机自动启动
chkconfig foo off systemctl disable httpd 开机不自动启动
chkconfig foo systemctl is-enabled httpd 查看特定服务是否为开机自启动
chkconfig --list systemctl list-unit-files --type=httpd 查看各个级别下服务的启动与禁用情况
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。