[root@zetawiki ~]# mkdir -p /var/www/html/repo/Packages
[root@zetawiki ~]# cp hello-1.0.0-1.el6.x86_64.rpm /var/www/html/repo/Packages/
[root@zetawiki ~]# createrepo -v /var/www/html/repo/
Spawning worker 0 with 1 pkgs
Worker 0: reading Packages/hello-1.0.0-1.el6.x86_64.rpm
Workers Finished
Gathering worker results
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Starting other db creation: Sun Jun 8 14:39:05 2014
Ending other db creation: Sun Jun 8 14:39:05 2014
Starting filelists db creation: Sun Jun 8 14:39:05 2014
Ending filelists db creation: Sun Jun 8 14:39:05 2014
Starting primary db creation: Sun Jun 8 14:39:05 2014
Ending primary db creation: Sun Jun 8 14:39:05 2014
Sqlite DBs complete
[root@zetawiki ~]# cp /home/builduser/RPM-GPG-KEY-builduser /var/www/html/repo/
[root@zetawiki ~]# curl http://127.0.0.1/repo/RPM-GPG-KEY-builduser
-----BEGIN PGP PUBLIC KEY BLOCK-----
... (생략)
-----END PGP PUBLIC KEY BLOCK-----
[root@CentOS63 ~]# nc -z 135.79.246.80 80
Connection to 135.79.246.80 80 port [tcp/http] succeeded!
[root@CentOS63 ~]# curl http://135.79.246.80/repo/RPM-GPG-KEY-builduser
-----BEGIN PGP PUBLIC KEY BLOCK-----
... (생략)
-----END PGP PUBLIC KEY BLOCK-----
echo '[my-first-repo]
name=My First Repo
baseurl=http://서버주소/repo
gpgkey=http://서버주소/repo/RPM-GPG-KEY-builduser
enabled=1
gpgcheck=1' > /etc/yum.repos.d/my-first-repo.repo
yum repolist
[root@CentOS63 ~]# echo '[my-first-repo]
> name=My First Repo
> baseurl=http://135.79.246.80/repo
> gpgkey=http://135.79.246.80/repo/RPM-GPG-KEY-builduser
> enabled=1
> gpgcheck=1' > /etc/yum.repos.d/my-first-repo.repo
[root@CentOS63 ~]# yum repolist
... (생략)
repo id repo name status
base CentOS-6 - Base 6,367
epel Extra Packages for Enterprise Linux 6 - x86_64 10,899
extras CentOS-6 - Extras 14
my-first-repo My First Repo 1
updates CentOS-6 - Updates 1,009
repolist: 18,290
======================================================================
Package Arch Version Repository Size
======================================================================
Installing:
hello x86_64 1.0.0-1.el6 my-first-repo 2.5 k
Transaction Summary
======================================================================
Install 1 Package(s)
Total download size: 2.5 k
Installed size: 23
Is this ok [y/N]: y
... (생략)
Installed:
hello.x86_64 0:1.0.0-1.el6
Complete!
[root@zetawiki ~]# rpm -qa hello
hello-1.0.0-1.el6.x86_64
[root@zetawiki ~]# hello
world