目录
一、RPM包管理 概念
观察YUM和新配置目录
1-1 YUM源目录
<pre>[root@localhost ~]# ls /etc/yum.repos.d/
CentOS-Base.repo CentOS-fasttrack.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-Media.repo CentOS-x86_64-kernel.repo
CentOS-Debuginfo.repo CentOS-Sources.repo
</pre>
1-2 删除官方YUM库
yum -y remove httpd //安装
已加载插件:fastestmirror, langpacks
正在解决依赖关系
# cd /etc/yum.repos.d
[root@localhost yum.repos.d]# ll
总用量 0
-rw-r--r--. 1 root 0 0 3月 29 20:52 CentOS-Base.repo
rm -f CentOS-Base.repo
1-3 编写YUM文件配置
1-4挂载安装光盘
1-4-1 创建挂载点
mkdir /mnt/cdrom
1-4-2 挂载点写入文件中
vim /root/.bashrc
1-4-3 挂载
mount /dev/cdrom /mnt/cdrom
vim /root/.bashrc 系统启动写入挂载 ,防止重启后挂载消失
vim /root/.bashrc
[root@localhost ~]# cat /root/.bashrc
mount /dev/cdrom /mnt/cdrom
# .bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
1-4-4 检查挂载成功与否:ls /mnt/cdrom 有没有以下文件