更换Yum源(可选)
查看
yum repolist
下载
wget http://mirrors.163.com/.help/CentOS6-Base-163.repo
安装
mv CentOS-Base.repo CentOS-Base.repo.bak && mv CentOS6-Base-163.repo CentOS-Base.repo
更新
yum clean all
yum makecache
其他命令
yum whatprovides */evp.h
yum install pkg-name
yum remove pkg-name
yum list installed| grep pkg-name
添加webtatic源
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
安装EPEL
EPEL (Extra Packages for Enterprise Linux,企业版Linux的额外软件包) 是Fedora小组维护的一个软件仓库项目,为RHEL/CentOS提供他们默认不提供的软件包。这个源兼容RHEL及像CentOS和Scientific Linux这样的衍生版本。
我们可以很容易地通过yum命令从EPEL源上获取上万个在CentOS自带源上没有的软件。EPEL提供的软件包大多基于其对应的Fedora软件包,不会与企业版Linux发行版本的软件发生冲突或替换其文件。
查看版本
cat /etc/redhat-release
下载
wget https://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
安装
rpm -ivh epel-release-6-8.noarch.rpm
查看
yum repolist