LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-18-2022, 03:36 AM   #1
LinuxRSA
Member
 
Registered: Apr 2015
Location: South Africa
Posts: 71

Rep: Reputation: Disabled
How to Setup a Ubuntu Repo Server


Hi All

I'm Curious about setting up a Ubuntu Repo Server for server patching.

The Aim is to have the Repo server setup to download and hold the patches and then have 2 or 3 servers reach out to the Repo Server and download the patches, What is the purpose and benefits is of such a setup ?

With such a setup can patching be automated perhaps using some GUI maybe ?

The setup will run on

Ubuntu 18.04.5 LTS
Ubuntu 20.04.2 LTS

Thanks
 
Old 01-18-2022, 03:40 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

are you talking about a mirror of official apt repositories or something else? I don't understand what you mean by "patches" in this context. It is not clear to me what you want to do or why. Can you elaborate? Is there some particular problem you are trying to solve?

Evo2.
 
Old 01-18-2022, 04:51 AM   #3
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
A livepatch on-prem server? I don't think it's possible for 18.04 LTS. And I don't think it's possible without a subscription to Ubuntu Advantage.

But if you mean a local mirror of Ubuntu apt repositories as suggested by evo2 above, see DebianRepository/Setup @Debian Wiki.
 
Old 01-18-2022, 04:51 AM   #4
LinuxRSA
Member
 
Registered: Apr 2015
Location: South Africa
Posts: 71

Original Poster
Rep: Reputation: Disabled
Hi,

It wouldn't be a Mirror, it will be its own Repo - it will only pull updates/patches from Ubuntu when we tell it to, Otherwise It can sit with the same version until we update it.

The intention is to have all servers running the exact same version and to use this as a base line for version control on all nodes to be safe and stable.

We don't want a Live update option or a auto update as certain libraries can break APP etc, we want to avoid this.

Id like to use a GUI maybe (Forman/Spacewalk) that can integrated with maybe (Ansible/Puppet) to do the Grunt work.

Last edited by LinuxRSA; 01-18-2022 at 04:53 AM.
 
Old 01-18-2022, 05:01 AM   #5
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

it sounds like you just want control over what packages are updated and when. It is trivial to disable automatic updates. Additionally, apt already lets you put packages on hold etc.

I have never heard of Forman or Spacewalk, but I can't imagine any sort of GUI is likely the best solution for managing a cluster.

Evo2.
 
Old 01-25-2022, 03:44 AM   #6
LinuxRSA
Member
 
Registered: Apr 2015
Location: South Africa
Posts: 71

Original Poster
Rep: Reputation: Disabled
Hi, Could you assist me put the Ubuntu 20.04 /etc/apt/sources.list file together ?

below are my paths on the main repo server with IP 10.0.0.4.

Code:
Path :/var/www/html/ubuntu/mirror/azure.archive.ubuntu.com/ubuntu/dists/focal$ ls 
Contents-amd64.gz InRelease Release Release.gpg main multiverse restricted universe
Code:
Path:/var/www/html/ubuntu/mirror/security.ubuntu.com/ubuntu/dists/focal-security$ ls 
Contents-amd64.gz InRelease Release Release.gpg main multiverse restricted universe
This is my ubuntu18 /etc/apt/sources.list file and its works fine downloading updates from my repo.

Code:
root@vm-ubuntu18:~# cat /etc/apt/sources.list | grep allow
deb [allow-insecure=yes] http://10.0.0.4/ubuntu/mirror/azure.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
deb [allow-insecure=yes]  http://10.0.0.4/ubuntu/mirror/azure.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
deb [allow-insecure=yes] http://10.0.0.4/ubuntu/mirror/azure.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb [allow-insecure=yes]  http://10.0.0.4/ubuntu/mirror/security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
root@vm-ubuntu18:~#
Code:
root@vm-ubuntu18:~# apt update
Hit:1 http://10.0.0.4/ubuntu/mirror/azure.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://10.0.0.4/ubuntu/mirror/azure.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://10.0.0.4/ubuntu/mirror/azure.archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:4 http://10.0.0.4/ubuntu/mirror/security.ubuntu.com/ubuntu bionic-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
root@vm-ubuntu18:~#
What would the ubuntu 20.04 /etc/apt/sources.list entry look like ?

Last edited by LinuxRSA; 01-25-2022 at 04:27 AM.
 
Old 01-25-2022, 05:02 AM   #7
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
You mean what is the difference between 18.04 and 20.04? Just replace bionic to focal everywhere in /etc/apt/sources.list.

Last edited by shruggy; 01-25-2022 at 05:03 AM.
 
Old 01-25-2022, 06:15 AM   #8
LinuxRSA
Member
 
Registered: Apr 2015
Location: South Africa
Posts: 71

Original Poster
Rep: Reputation: Disabled
Hi Shruggy,

Thanks, i seem to get the ubuntu 20.04 server to connect to the REPO server.

This is the /etc/apt/sources.list file entires:

Quote:
root@vm-ubuntu20:~# cat /etc/apt/sources.list | grep allow
deb [allow-insecure=yes] http://10.0.0.4/ubuntu/mirror/azure....tu.com/ubuntu/ focal main restricted universe multiverse
deb [allow-insecure=yes] http://10.0.0.4/ubuntu/mirror/azure....tu.com/ubuntu/ focal-updates main restricted universe multiverse
deb [allow-insecure=yes] http://10.0.0.4/ubuntu/mirror/azure....tu.com/ubuntu/ focal-backports main restricted universe multiverse
deb [allow-insecure=yes] http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security main restricted universe multiverse
root@vm-ubuntu20:~#
When i run apt update i get the below output

Quote:
root@vm-ubuntu20:~# apt update
Hit:1 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal InRelease
Get:2 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates InRelease [114 kB]
Get:3 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-backports InRelease [108 kB]
Get:4 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security InRelease [114 kB]
Ign:5 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/main amd64 Packages
Get:6 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/main Translation-en [296 kB]
Get:7 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [14.7 kB]
Get:7 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [14.7 kB]
Get:7 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [14.7 kB]
Get:7 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [14.7 kB]
Ign:7 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata
Ign:12 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/restricted amd64 c-n-f Metadata
Ign:13 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/universe amd64 Packages
Ign:14 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/universe Translation-en
Ign:15 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata
Ign:16 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/multiverse amd64 c-n-f Metadata
Get:5 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/main amd64 Packages [1510 kB]
Ign:7 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata
Ign:12 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/restricted amd64 c-n-f Metadata
Get:13 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/universe amd64 Packages [894 kB]
Get:14 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/universe Translation-en [196 kB]
Ign:15 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata
Ign:16 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/multiverse amd64 c-n-f Metadata
Ign:7 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata
Ign:12 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/restricted amd64 c-n-f Metadata
Ign:15 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata
Ign:16 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/multiverse amd64 c-n-f Metadata
Get:7 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/main amd64 c-n-f Metadata [57.3 kB]
Err:12 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/restricted amd64 c-n-f Metadata
404 Not Found [IP: 10.0.0.4 80]
Ign:15 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/universe amd64 c-n-f Metadata
Ign:16 http://10.0.0.4/ubuntu/mirror/azure....ntu.com/ubuntu focal-updates/multiverse amd64 c-n-f Metadata
Ign:17 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/main amd64 Packages
Get:18 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/main Translation-en [210 kB]
Get:19 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [9132 B]
Get:19 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [9132 B]
Get:19 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [9132 B]
Get:19 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [9132 B]
Get:19 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [9132 B]
Ign:19 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/main amd64 c-n-f Metadata
Ign:25 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/restricted amd64 c-n-f Metadata
Ign:26 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/universe amd64 Packages
Ign:27 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata
Ign:28 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/multiverse amd64 c-n-f Metadata
Get:17 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/main amd64 Packages [1178 kB]
Ign:19 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/main amd64 c-n-f Metadata
Ign:25 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/restricted amd64 c-n-f Metadata
Get:26 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/universe amd64 Packages [677 kB]
Ign:27 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata
Ign:28 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/multiverse amd64 c-n-f Metadata
Ign:19 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/main amd64 c-n-f Metadata
Ign:25 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/restricted amd64 c-n-f Metadata
Ign:27 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata
Ign:28 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/multiverse amd64 c-n-f Metadata
Get:19 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/main amd64 c-n-f Metadata [36.2 kB]
Err:25 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/restricted amd64 c-n-f Metadata
404 Not Found [IP: 10.0.0.4 80]
Ign:27 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata
Ign:28 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/multiverse amd64 c-n-f Metadata
Fetched 4885 kB in 1s (9550 kB/s)
Reading package lists... Done
E: Failed to fetch http://10.0.0.4/ubuntu/mirror/azure....Commands-amd64 404 Not Found [IP: 10.0.0.4 80]
E: Failed to fetch http://10.0.0.4/ubuntu/mirror/securi...Commands-amd64 404 Not Found [IP: 10.0.0.4 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
root@vm-ubuntu20:~#
Main Error:

Quote:
Err:25 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/restricted amd64 c-n-f Metadata
404 Not Found [IP: 10.0.0.4 80]
Ign:27 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/universe amd64 c-n-f Metadata
Ign:28 http://10.0.0.4/ubuntu/mirror/securi...ntu.com/ubuntu focal-security/multiverse amd64 c-n-f Metadata
Fetched 4885 kB in 1s (9550 kB/s)
Reading package lists... Done
E: Failed to fetch http://10.0.0.4/ubuntu/mirror/azure....Commands-amd64 404 Not Found [IP: 10.0.0.4 80]
E: Failed to fetch http://10.0.0.4/ubuntu/mirror/securi...Commands-amd64 404 Not Found [IP: 10.0.0.4 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.
root@vm-ubuntu20:~#

Last edited by LinuxRSA; 01-25-2022 at 06:17 AM.
 
Old 01-25-2022, 06:21 AM   #9
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
Have you mirrored the restricted section of Ubuntu repository?

Last edited by shruggy; 01-25-2022 at 06:25 AM.
 
Old 01-25-2022, 06:36 AM   #10
LinuxRSA
Member
 
Registered: Apr 2015
Location: South Africa
Posts: 71

Original Poster
Rep: Reputation: Disabled
Hi Shruggy

Yes, see main Repo server paths / files below.

Code:
root@vm-repo-server:/var/www/html/ubuntu/mirror/azure.archive.ubuntu.com/ubuntu/dists/focal-updates/restricted/cnf# ls
Commands-amd64
root@vm-repo-server:
Code:
root@vm-repo-server:/var/www/html/ubuntu/mirror/security.ubuntu.com/ubuntu/dists/focal-security/restricted/cnf# ls
]Commands-amd64
root@vm-repo-server:
 
Old 01-31-2022, 09:15 PM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Re GUIs; I suspect Forman is typo for Foreman https://www.theforeman.org/.
Spacewalk https://spacewalkproject.github.io/ is the upstream Pkg for RHEL's Satellite https://www.redhat.com/en/technologi...ment/satellite .
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Trying to split a large SVN repo into one git repo. Ian John Locke II Linux - Software 1 01-30-2012 08:19 AM
Best way to automate copying of Git repo to subversion repo? jceipek Linux - Server 0 03-15-2011 02:42 AM
how to use syanptic in fc 5 and how to add repo and which repo to be added.. vikas04522 Fedora 1 08-26-2006 12:41 PM
how to use syanptic in fc 5 and how to add repo in it and which repo is to be added.. vikas04522 Linux - Software 1 08-26-2006 12:29 PM
adding mirror to yum.repo.d/<any-repo> ashwin_cse Fedora 1 03-10-2005 03:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration