o YUM용 로컬 repository 만들기
¡ yum repository는 RPM 패키지들의 저장소임
¡ 저장소로 만들 디렉토리 생성 (/data/ucloud-repo)
[root@tomcat2 ~]# mkdir /data [root@tomcat2 ~]# mkdir /data/ucloud-repo |
¡ 패키지를 저장할 폴더 생성 (/data/ucloud-repo/deps)
- 생성할 폴더 밑에 RPM이라는 디렉토리가 있으면 됨
- x86_64 (64비트 머신용 패키지), noarch(머신 independent)
[root@tomcat2 ucloud-repo]# mkdir /data/ucloud-repo/deps [root@tomcat2 ucloud-repo]# mkdir /data/ucloud-repo/deps/RPMS/ [root@tomcat2 ucloud-repo]# mkdir /data/ucloud-repo/deps/RPMS/x86_64 [root@tomcat2 ucloud-repo]# mkdir /data/ucloud-repo/deps/RPMS/noarch |
¡ 저장소에 넣을 패키지(rpm파일)들을 적당한 폴더에 복사
./RPMS ./RPMS/x86_64 ./RPMS/x86_64/python-crypto-2.0-1.2.el5.rf.x86_64.rpm ./RPMS/x86_64/PING-3.01-1.x86_64.rpm ./RPMS/x86_64/augeas-libs-0.7.1-1.el5.x86_64.rpm ./RPMS/x86_64/augeas-0.7.1-1.el5.x86_64.rpm ./RPMS/x86_64/libcgroup-devel-0.34-4.x86_64.rpm ./RPMS/x86_64/libcgroup-0.34-4.x86_64.rpm ./RPMS/x86_64/mkisofs-2.01-10.7.el5.x86_64.rpm ./RPMS/i386 ./RPMS/noarch ./RPMS/noarch/ws-commons-util-1.0.2-2.jpp5.noarch.rpm ./RPMS/noarch/jakarta-commons-daemon-1.0.1-7.jpp5.noarch.rpm ./RPMS/noarch/ecj-3.3.1.1-3.jpp5.noarch.rpm ./RPMS/noarch/python-paramiko-1.7.2-1.el5.rf.noarch.rpm ./RPMS/noarch/xml-commons-jaxp-1.3-apis-1.3.04-5.jpp5.noarch.rpm ./RPMS/noarch/jakarta-commons-dbcp-tomcat5-1.2.2-2.jpp5.noarch.rpm ./RPMS/noarch/tomcat6-lib-6.0.24-2.jpp5.noarch.rpm ./RPMS/noarch/tomcat6-servlet-2.5-api-6.0.24-2.jpp5.noarch.rpm ./RPMS/noarch/jakarta-commons-pool-tomcat5-1.3-11.jpp5.noarch.rpm ./RPMS/noarch/tomcat6-jsp-2.1-api-6.0.24-2.jpp5.noarch.rpm ./RPMS/noarch/tomcat6-6.0.24-2.jpp5.noarch.rpm ./RPMS/noarch/xml-commons-1.3.04-5.jpp5.noarch.rpm ./RPMS/noarch/ws-commons-java5-1.0.1-2.jpp5.noarch.rpm ./RPMS/noarch/tomcat6-el-1.0-api-6.0.24-2.jpp5.noarch.rpm |
¡ repository 정보 만들기 (createrepo)
- createrepo 명령어를 실행하여 repository 메타정보 생성
- yum repository에 repodata라는 폴더가 생성됨을 확인함
[root@tomcat2 ucloud-repo]# createrepo /data/ucloud-repo/ 21/21 - deps/RPMS/RPMS/noarch/tomcat6-el-1.0-api-6.0.24-2.jpp5.noarch.rpm mm Saving Primary metadata Saving file lists metadata Saving other metadata |
[root@tomcat2 ucloud-repo]# cd repodata/ [root@tomcat2 repodata]# ls filelists.xml.gz other.xml.gz primary.xml.gz repomd.xml |
- createrepo 파일이 없을 경우 createrepo 라는 패키지 설치
[root@tomcat2 ucloud-repo]# yum install createrepo |
¡ /etc/yum.repos.d/ucloud-repo.repo 파일 등록
- 이제 ucloud-repo가 사용 가능하게 됨
[root@tomcat2 ucloud-repo]# cat /etc/yum.repos.d/ucloud-repo.repo [ucloud-repo] baseurl=file:///data/ucloud-repo gpgcheck=0 enabled=1 name=KT Ucloud temporary repository
|
- /data/ucloud-repo 폴더를 웹에 개방하고
- baseurl=http://<IP addr>/data/ucloud-repo 로 하면 웹에서도 설치가능
Fedora Repo
http://dl.fedoraproject.org/pub/epel/6/x86_64/