Offline environment construction CentOS edition

To offline environment construction table of contents

CentOS

BaseOS/AppStream

How to install BaseOS / AppStream packages.

mount

Mount the installation media.

$ sudo mount CentOS-8.2.2004-x86_64-dvd1.iso /media
$ sudo ls -l /media/
$ sudo cp -v /media/media.repo /etc/yum.repos.d/centos8.repo
$ sudo chmod 644 /etc/yum.repos.d/centos8.repo
$ sudo ls -l /etc/yum.repos.d/centos8.repo

Repository settings

Set the repository in /etc/yum.repos.d/centos8.repo.

Change before

[InstallMedia]
name=CentOS Linux 8
mediaid=None
metadata_expire=-1
gpgcheck=0
cost=500

** After change **

[Local-BaseOS]
name=CentOS-8 - Local - BaseOS
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///media/BaseOS/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

[Local-AppStream]
name=CentOS-8 - Local - AppStream
metadata_expire=-1
gpgcheck=1
enabled=1
baseurl=file:///media/AppStream/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

Verification

$ sudo dnf clean all
$ sudo dnf repolist
Failed to set locale, defaulting to C
CentOS-8 - AppStream                                                                                                                      0.0  B/s |   0  B     00:01    
CentOS-8 - Base                                                                                                                           0.0  B/s |   0  B     00:01    
CentOS-8 - Extras                                                                                                                         0.0  B/s |   0  B     00:01    
CentOS Linux 8 - AppStream                                                                                                                 34 MB/s | 5.7 MB     00:00    
CentOS Linux 8 - BaseOS                                                                                                                    60 MB/s | 2.2 MB     00:00    
Failed to synchronize cache for repo 'AppStream', ignoring this repo.
Failed to synchronize cache for repo 'BaseOS', ignoring this repo.
Failed to synchronize cache for repo 'extras', ignoring this repo.
Last metadata expiration check: 0:00:01 ago on Mon Sep 14 14:48:23 2020.
repo id                                                                         repo name                                                                           status
InstallMedia-AppStream                                                          CentOS Linux 8 - AppStream                                                          4901
InstallMedia-BaseOS                                                             CentOS Linux 8 - BaseOS                                                             1672

EPEL

How to install the EPEL package.

download

Execute the following commands for the number of threads you want to download.

wget -c -r -N --no-parent https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/

If you have CentOS in your online environment, reposync is easier than wget.

The data capacity will be about 20GB.

Repository settings

Set the repository in /etc/yum.repos.d/epel8.repo.

[Local-EPEL]
name=CentOS-8 - Local - EPEL
metadata_expire=-1
gpgcheck=0
enabled=1
baseurl=file:///mnt/host/epel/dl.fedoraproject.org/pub/epel/8/Everything/x86_64
# gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

Verification

$ sudo dnf clean all
$ sudo dnf repolist

Recommended Posts

Offline environment construction CentOS edition
EC-CUBE4 environment construction (local edition)
CentOS8 + Anaconda 4.9.2 + jupyterhub environment construction procedure
CentOS8 + Anaconda + Django development environment construction procedure
[Java] Environment construction
Java environment construction
[Spring] Environment construction
Docker environment construction
CentOS8.2 (x86_64) + ruby2.5 + Rails5.2 + MariaDB (10.3.17) environment construction
Penronse environment construction [Windows]
[Environment construction] Eclipse installation
[Flutter] Ubuntu 20.04 environment construction
Rails Docker environment construction
java development environment construction
Rails6 development environment construction [Mac]
Rails engineer environment construction ruby2.7.1
I tried node-jt400 (Environment construction)
Rails environment construction Rails5.2.1 ruby2.5.1 Catalina
MySQL 5.7 (Docker) environment construction memo
Prepare Python3 environment with CentOS7
JavaFX environment construction in Java 13
Redmine (Docker) environment construction memo
[Docker] Rails 5.2 environment construction with docker
AtCoder Challenge Environment Construction (Java 8)
Docker × Spring Boot environment construction
[Super easy] Ruby environment construction
[Rails / MySQL] Mac environment construction
[Docker] postgres, pgadmin4 environment construction
Laravel environment construction (Ubuntu 18.04 LTS)
React environment construction with Docker
Introduce R v3.4.1 and various packages to CentOS 6.4 in offline environment
Rails + MySQL environment construction with Docker
[Windows] WSL2 + Ubuntu + Node.js environment construction
Node.js environment construction with Docker Compose
◆ Spring Boot + gradle environment construction memo
Environment construction with Docker for beginners
Laravel + Docker Laradock usage environment construction
[Unity] Android development environment construction procedure
Install CentOS Stream 8 in Hyper-V environment
Make a language! (JavaCC environment construction)
Ruby on Rails 6.0 environment construction memo
[Environment construction with Docker] Rails 6 & MySQL 8
[Java & SpringBoot] Environment Construction for Mac
Troublesome Rails environment construction flow [Windows 10]
[Environment construction] Uninstall rails from local
[Rails] AWS EC2 instance environment construction