Exercise: Repository Management Using NGINX
Serve the Debian packages using NGINX and install those packages from the repository.
We'll cover the following
Task
In this exercise, you are required to create an Aptly repository with two packages in it. You are required to publish and serve it using NGINX. You can then install and use the packages from the repository served by the web server.
Note: We have already installed
aptly
and created these two packages for you in the code editor below. We have given you root access in the code editor so you don’t have to typesudo
before each command.
In order to complete the task, you need to perform the following steps:
-
Generate a private GnuPG key.
-
Create an Aptly repository, and add the packages
hello-debian_0.1_amd64.deb
andhello-debian-data_0.1_all.deb
to it. -
Create a snapshot of the repository and publish it.
-
Serve your repository with NGINX using the following command (we have already configured the NGINX server for you in the code editor below):
$ service nginx restart
-
Fetch the information about the packages from the served repository using the
apt-get update
command. -
Create a new directory called
test
. -
Inside the
test
directory, useapt-get
to install the packageshello-debian-data
and thehello-debian
.$ apt-get install <package-name>
If your packages are installed successfully, typing
hello
will display the following message:"Hurrah! We have served and installed packages successfully".
Get hands-on with 1400+ tech skills courses.