CentOS系统如何获取命令的源代码




CentOS系统如何获取命令的源代码

2022-07-20 21:03:28 网络知识 官方管理员

以32位CentOS6.6下,获取ls命令源代码为例,可以使用如下的方法下载源代码:

1)配置源代码的源

在CentOS中,源的配置文件为:/etc/yum.repos.d/CentOS-Base.repo,修改该文件需要root权限。

打开该文件,查看该文件的内容,在本人的机子上,该文件的内容如下:

#CentOS-Base.repo##ThemirrorsystemusestheconnectingIPaddressoftheclientandthe#updatestatusofeachmirrortopickmirrorsthatareupdatedtoand#geographicallyclosetotheclient.YoushouldusethisforCentOSupdates#unlessyouaremanuallypickingothermirrors.##Ifthemirrorlist=doesnotworkforyou,asafallbackyoucantrythe#remarkedoutbaseurl=lineinstead.##[base]name=CentOS-$releasever-Basemirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6#releasedupdates[updates]name=CentOS-$releasever-Updatesmirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6#additionalpackagesthatmaybeuseful[extras]name=CentOS-$releasever-Extrasmirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/gpgcheck=1gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6#additionalpackagesthatextendfunctionalityofexistingpackages[centosplus]name=CentOS-$releasever-Plusmirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/gpgcheck=1enabled=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6#contrib-packagesbyCentosUsers[contrib]name=CentOS-$releasever-Contribmirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/gpgcheck=1enabled=0gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

发表评论:

最近发表
网站分类
标签列表