Using Nexus OSS, you can create, manage, and publish your own repositories. Additionally, you can utilize the "apt proxy" feature to publish existing repository content from your server.
Let's proceed with creating the Postgresql repository on Nexus OSS.
After the installation, the default admin user is available, and you can find its password by using the following command:
a- Let's go to the "Repository" page under the "Settings" section.
b- After that, click on the "Repositories" tab under "Repository," and on the opened page, click the "Create Repository" button.
Let's proceed by selecting the "apt proxy" option from the opened page.
Let's enter the address of the Postgresql repository as shown below in the Remote repository field:
You can save it by clicking on the Create Repository button located at the bottom.
When we navigate to the "Repositories" page, we will see the newly added repository listed. By clicking on the "Copy" button, we can access our newly created Postgresql repository on our server.
When we visit the relevant URL, the repository will appear in front of us.
If your client machine is Ubuntu 22, you can run the following command:
echo "deb [trusted=yes] http://192.168.122.100:8081/repository/hosted-postgresql-hdd/ jammy-pgdg main" > /etc/apt/sources.list.d/nexus.list
Note: If not, you can proceed by customizing the jammy-pgdg part to match your own version.
You can check if it is working by running the apt update command.