常用的RPM软件包命令:
- 安装软件的命令格式 rpm -ivh filename.rpm
- 升级软件的命令格式 rpm -Uvh filename.rpm
- 卸载软件的命令格式 rpm -e filename.rpm
常见的Yum命令
yum install 软件包名称 安装软件包
yum reinstall 软件包名称 重新安装软件包
yum update 软件包名称 升级软件包
yum remove 软件包名称 移除软件包
yum clean all 清除所有仓库缓存
yum makecache 是将服务器上的软件包信息在本地缓存,以提高搜索安装软件的速度
RHEL 6系统,使用service、chkconfig等命令来管理系统服务,RHEL 7系统中是使用systemctl命令来管理服务
systemctl命令(RHEL 7系统) 作用
systemctl status foo 查看服务状态
systemctl start foo 启动服务
systemctl restart foo 重启服务
systemctl stop foo 停止服务
systemctl reload foo 重新加载配置文件(不终止服务)
systemctl enable foo 开机自动启动
systemctl disable foo 开机不自动启动
systemctl is-enabled foo 查看特定服务是否为开机自启动
ps命令用于查看系统中的进程状态
cat命令用于查看纯文本文件(内容较少的)
touch命令用于创建空白文件或设置文件的时间
history查看历史使用过的命令
RHEL7系统中,firewalld防火墙取代了iptables防火墙