openSUSE – Create your own Software Repository @ 1

Last time i made a simple hello rpm. openSUSE – Build a rpm package

Now i want to create a simple repository containing this rpm such that i can install this rpm after adding this repository to the YaST in openSUSE.

Basically there are 3 types of Repositories

  • Plain Cache Sources
  • repomd/rpm md/YUM Sources
  • YaST Sources

For more details about different repository type, please refer to the following article

Create a YUM repository
1. Install the createrepo package.

  • Ubuntu user – apt-get install createrepo
  • openSUSE user – Just use the YaST Software Management

2. Create the following a repository folder and put your rpms into it

                                 \- i586/
                                            \- hello-2.1.1-1.i586.rpm
                                            \- other-1.0-1.i586.rpm
                                 \- i686/
                                            \- hello-2.1.1-1.i686.rpm
                                            \- other-1.0.i686.rpm
                                 \- noarch/
                                            \- hello-2.1.1-1.noarch.rpm
                                            \- other-1.0.noarch.rpm

3. createrepo /var/www/suse_repo/rpms


4. Your yum repository is created =)

5. Add this new yum repository in openSUSE

  • zypper addrepo -t <repository type> <path> <repository name>


  • Add as local repository: zypper addrepo -t YUM /var/www/suse_repo local_repo
  • Add as http repository: zypper addrepo -t YUM http://<host>/suse_repo local_repo

For the http repository, just copy the repository folder to the Document Root of the web server like /var/www in Apache.

6. Check whether your repository is working or not by using the zypper se <package name> command


i found that there is an problem when i tried to add the http repository under the YaST GUI of openSUSE 11.2. I always got the Connection Timeout. So i have to add the repository by the zypper command.


Done =)



4 thoughts on “openSUSE – Create your own Software Repository @ 1”

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.