CentOS中系统命令源代码的获取方法

分类:CentOS教程 阅读:39415 次

  1. #CentOS-Base.repo
  2. #
  3. #ThemirrorsystemusestheconnectingIPaddressoftheclientandthe
  4. #updatestatusofeachmirrortopickmirrorsthatareupdatedtoand
  5. #geographicallyclosetotheclient.YoushouldusethisforCentOSupdates
  6. #unlessyouaremanuallypickingothermirrors.
  7. #
  8. #Ifthemirrorlist=doesnotworkforyou,asafallbackyoucantrythe
  9. #remarkedoutbaseurl=lineinstead.
  10. #
  11. #
  12. [base]
  13. name=CentOS-$releasever-Base
  14. mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
  15. #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
  16. gpgcheck=1
  17. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
  18. #releasedupdates
  19. [updates]
  20. name=CentOS-$releasever-Updates
  21. mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
  22. #baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
  23. gpgcheck=1
  24. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
  25. #additionalpackagesthatmaybeuseful
  26. [extras]
  27. name=CentOS-$releasever-Extras
  28. mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
  29. #baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
  30. gpgcheck=1
  31. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
  32. #additionalpackagesthatextendfunctionalityofexistingpackages
  33. [centosplus]
  34. name=CentOS-$releasever-Plus
  35. mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
  36. #baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
  37. gpgcheck=1
  38. enabled=0
  39. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
  40. #contrib-packagesbyCentosUsers
  41. [contrib]
  42. name=CentOS-$releasever-Contrib
  43. mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
  44. #baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
  45. gpgcheck=1
  46. enabled=0
  47. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
  1. [base-src]
  2. name=CentOS-$releasever-Basesrc
  3. baseurl=http://vault.centos.org/6.6/os/Source/
  4. gpgcheck=1
  5. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
  6. [updates-src]
  7. name=CentOS-$releasever-Updatessrc-centos
  8. baseurl=http://vault.centos.org/6.6/updates/Source/
  9. gpgcheck=1
  10. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
  11. [extras-src]
  12. name=CentOS-$releasever-Extrassrc-centos
  13. baseurl=http://vault.centos.org/6.6/extras/Source/
  14. gpgcheck=1
  15. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
  16. [centosplus-src]
  17. name=CentOS-$releasever-Plussrc-centos
  18. baseurl=http://vault.centos.org/6.6/centosplus/Source/
  19. gpgcheck=1
  20. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
  21. [contrib-src]
  22. name=CentOS-$releasever-Contribsrc-centos
  23. baseurl=http://vault.centos.org/6.6/contrib/Soruce/
  24. gpgcheck=1
  25. gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
3)使用rpm命令查询ls命令所属的包,如下: 至此,命令的源代码获取完成。