Add rpm package to local repository?

How to add new rpm package to local repository server?

In my network I have local repository server.

# zypper lr -d
# | Alias     | Name      | Enabled | GPG Check | Refresh | Priority | Type   | URI                                  | Service
--+-----------+-----------+---------+-----------+---------+----------+--------+--------------------------------------+--------
1 | localrepo | localrepo | Yes     | ( p) Yes  | No      |   99     | rpm-md | http://10.181.208.55:8080/localrepo/ |

I would like to add to it a new package - in this example: nmap-7.60-1.x86_64.rpm.
I simply copied it to the directory where all other packages of the local repository are kept.
Now, when I try install it with zypper command i get this output:

# zypper install nmap
Loading repository data...
Reading installed packages...
'nmap' not found in package names. Trying capabilities.
No provider of 'nmap' found.
Resolving package dependencies...

Nothing to do.

If you created a local repository manually then the steps to add one more
RPM should be identical, though you need to do them. This typically
involves running a program to extract the RPM metadata and put them into
XML files that things like zypper will then consume to quickly identify
which packages are available, what their dependencies are, etc. If you
just copy an RPM to a directory you can still install that RPM if you
specify it directly, but you cannot rely on the benefits of the metadata
directly.

How did you create your existing local repository? If you have steps you
followed then sharing those will let us help you run certain steps again
to update the repository with the new RPM’s information.

Also, I see you have 'refresh set to ‘no’, so maybe just tell zypper to
refresh first in case you have already done everything above properly:

zypper ref


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.