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.
You can access our article on the installation of Nexus OSS from here.
You can also access our article on creating an apt repository on Nexus OSS from here.
Let's proceed with creating the Postgresql repository on Nexus OSS.
1- Log in to the Nexus OSS interface with an authorized user
After the installation, the default admin user is available, and you can find its password by using the following command:
bash
cat /opt/sonatype/sonatype-work/nexus3/admin.password
2- Creating a Repository
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.
3- Let's configure our Postgresql Repository.
Let's enter the address of the Postgresql repository as shown below in the Remote repository field:
http://apt.postgresql.org/pub/repos/apt/
4- Let's save it.
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.
Optional
Adding the new repository to Linux client machines.
If your client machine is Ubuntu 22, you can run the following command:
bash
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.
Top comments (0)