简介:这是Centos yum源的详细页面,介绍了和php,有关的知识、技巧、经验,和一些php源码等。
class='pingjiaF' frameborder='0' src='http://biancheng.dnbcw.info/pingjia.php?id=327017' scrolling='no'>=====================查看CentOS版本方法
有以下命令可以查看:
# lsb_release -a
LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: CentOS
Description: CentOS release 5.4 (Final)
Release: 5.4
Codename: Final
这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。
root@MyMail ~ # uname
Linux
root@MyMail ~ # uname -r
2.6.18-164.el5
以下二种方法适用于RedHat,CentOS
root@MyMail ~ # cat /etc/redhat-release
CentOS release 5.4 (Final)
登录到linux执行rpm -q redhat-release
#rpm -q redhat-release
或CentOS
root@MyMail ~ # rpm -q centos-release
centos-release-5-4.el5.centos.1
cat /proc/version
uname -r
uname -a
yum -v
其中CentOS-Base.repo记录着网络上的yum源的地址和路径信息等
CentOS-Media.repo记录着可以从本地作为yum源的介质和路径
http://centos.ustc.edu.cn/ 推荐
-------------------------------------安装后请按照以下步骤修改CenOS-Base.repo,以后就可以方便的用yum安装软件了.
cd /etc/yum.repos.d
mv CentOS-Base.repo CentOS-Base.repo.save
wget http://centos.ustc.edu.cn/CentOS-Base.repo
修改以上文件后, 如需要安装gcc, 直接yum install gcc就可以了
为Centos5添加网易163、搜狐的yum源
cd /etc/yum.repos.d/
wget http://mirrors.163.com/.help/CentOS-Base-163.repo
wget http://mirrors.sohu.com/help/CentOS-Base-sohu.repo
yum makecache
yum update
更新现有的包命令是:
yum update
---------------------------???????????
http://centos.ustc.edu.cn/centos/5/addons/i386/repodata/repomd.xml: [Errno 4] IOError: <urlopen error (101, 'Network is unreachable')>
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again