by Devin Yang
(This article was automatically translated.)

Published - 2 years ago ( Updated - 2 years ago )

There may still be some old programs in some places, which can only run the old system.
But want to be able to execute and install some desired packages,
You may try this trick

Please note that if this system is important to you, please evaluate it yourself. It is recommended that you are in a Docker environment and have a backup image before trying it.

Open file

content_copyvi /etc/yum.repos.d/CentOS-Base.repo

Replace the three contents below

content_copy[base]
[updates]
[extras]

The content is as follows:

content_copy[base]
name=CentOS-$releasever-Base
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
# baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=https://vault.centos.org/6.10/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

# released updates
[updates]
name=CentOS-$releasever-Updates
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
# baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
baseurl=https://vault.centos.org/6.10/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

# additional packages that may be useful
[extras]
name=CentOS-$releasever-Extras
# mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
# baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
baseurl=https://vault.centos.org/6.10/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

Clear

content_copyyum clean all

update

content_copyyum update
livewire/content-tags Tags: linux system config Devin Yang Feel free to ask me, if you don't get it.:) Follow livewire/comments No Comment Post your comment Login is required to leave comments
close livewire/similar-stories Similar Stories linux Multiple ssh configuration files for public key authentication When we use ssh public key authentication, we usually add relevant settings in ~/.ssh/config. If some are used by the company or at home, can multiple configs be used? In fact, it is possible. We can use git to load the company-shared, version-controlled config through Include. linux haproxy 1.8.9 compilation record Record the process of compiling haproxy 1.8.9 under Ubuntu. linux, mac, terminal, tips How to clear the input of the current command line on the terminal of Linux or Mac? How to clear the current command line in Linux or Mac terminal? For example, if you typed a bunch of instructions wrongly, and you want to clear them, Be sure to do the same as I used to, use the reverse key to kill slowly, we can use... About Me Disclaimer Privacy Licenses © 2025, made with favorite by Devin Yang for a better web. livewire/content-search backspace × livewire/block-content-lists Run OpenSpeedTest with phpenv format_align_left Read Article About the operation of --env in Laravel's artisan This article uses Laravel 9.40.1 for operation. I believe many people know...more format_align_left Read Article Use HAProxy to remove the /mail path of the Sysnolgy Mail Station This article explains the version of DSM7. The Package Center of Synology...more format_align_left Read Article HAProxy and fastapi HAProxy can use the definition of acl to determine which backend the request should direct to. This ...more format_align_left Read Article How do I create a fastapi runtime environment with phpenv phpenv php laravel runs HAProxy, and automatically applies for and updates...more format_align_left Read Article livewire/content-pages ‹‹ 1 2 3 4 5 6 ... 50 51 ›› window.livewire = new Livewire();window.Livewire = window.livewire;window.livewire_app_url = '';window.livewire_token = 'i3m5bkNcu3ywDL80OruUFrtQfKiUDmnxrHjRcovE';window.deferLoadingAlpine = function (callback) {window.addEventListener('livewire:load', function () {callback();});};let started = false;window.addEventListener('alpine:initializing', function () {if (! started) {window.livewire.start();started = true;}});document.addEventListener("DOMContentLoaded", function () {if (! started) {window.livewire.start();started = true;}}); /* var usertz = moment.tz.guess(); */ var searchStyle = function() { if ($(window).scrollTop() >= 100) { $("#search").parent().removeClass("has-white").addClass("has-rose"); $("#search").css({ 'color': 'gray' }); } else { $("#search").parent().removeClass("has-rose").addClass("has-white"); $("#search").css({ 'color': 'white' }); } if (window.width < 992) { $("#search").parent().removeClass("has-white").addClass("has-rose"); $("#search").css({ 'color': 'gray' }); } } $(window).resize(function() { if (document.body.clientWidth <= 992) { /* $("#search").parent().removeClass("has-white").addClass("has-rose"); $("#search").css({'color':'gray'}); */ //console.log(document.body.clientWidth); } }); var cleanSearch = function(e) { if (e.which == 21) { Livewire.emitTo('content-search', 'clean'); $("#search").focus(); } } document.getElementById("search").addEventListener("keyup", function(e) { cleanSearch(e); }); //searchStyle(); window.addEventListener('search-updated', event => { $("#search").focus(); }) $(document).on("keydown", function(e) { var code = e.keyCode; }); $(document).on("keypress", function(e) { if (!$("#search").is(":focus")) { console.log("B"); e.preventDefault(); } var code = e.keyCode; console.log(code); if (code == 47) { location.href = "/"; //$('#searchModal').modal('show'); } cleanSearch(e); }); var touchSearch = function(event) { $("#contentModal").modal("hide"); $(event.target).focus(); } $('#searchModal').on('shown.bs.modal', function() { $("#btnSearchModal").parent().fadeOut(); $('#search').trigger('focus'); }) $('#searchModal').on('hidden.bs.modal', function() { $("#btnSearchModal").parent().fadeIn(); $(document).trigger('focus'); }) var modalClose = function(modalId) { console.log("close modalId" + modalId); $("#" + modalId).modal("hide"); } $("#contentModal").on("shown.bs.modal", function(event) { var modal = $(this); modal.find("pre:has('code')").prepend('<span class="material-icons copy_code_to_text" onClick="copy_code_to_text(event,true)">content_copy</span>'); $("#contentModalCloseButton").show(); }); $('#contentModal').on('hidden.bs.modal', function() { var page = Livewire.emitTo('block-content-lists', 'getPage'); window.history.pushState('page', '3C Tech Center', "/?page=" + page); $("#contentModalCloseButton").hide(); }); Livewire.hook('element.initialized', (el, component) => { $("code").each(function(i, elm) { //Prism.highlightAll(elm); }); }) window.addEventListener('set-content-url', event => { var url = event.detail.url; var title = event.detail.title; var elm = $("div.modal-body").html(); $("#searchModal").modal("hide"); Prism.highlightAll(elm); FB.XFBML.parse(); try { window.history.pushState('page', title, url); document.title = title; } catch (e) { console.log(e); } $("#contentModal").modal("show"); }) //localStorage.clear(); var go_privacy = function() { localStorage.setItem("notify_cookie", "1"); location.href = "/privacy"; } var switch_lang = function(event,lang){ event.preventDefault(); const regex = /(^https:\/\/)\w+(\..+)/gm; var url = location.href.replace(regex,"\$1"+lang+"\$2"); location.href = url; } var cookie_notify = function() { toastr.options = { "closeButton": true, "debug": false, "newestOnTop": true, "progressBar": false, "positionClass": "toast-bottom-full-width", "preventDuplicates": false, "onclick": null, "showEasing": "swing", "hideEasing": "linear", "timeOut": 6000000, "extendedTimeOut": 6000000, "iconClasses": {"warning":"dark"} } if (localStorage.getItem("notify_cookie") == undefined) { toastr.warning( `In order to provide you with better services, this website uses cookies. By continuing to browse the web, you agree to our cookies policy. To understanding <button class='btn btn-danger btn-sm' onClick="go_privacy()" type="button" class='text-primary'><b>PRIVACY</b></button> ` ); } } cookie_notify(); if (window.history && history.pushState) { // check for history api support this.addEventListener('popstate', function(event, state) { modalClose('contentModal'); }); } var copy_code_to_text = function(event, is_modal=false) { toastr.remove() toastr.options = { "closeButton": false, "debug": false, "newestOnTop": false, "progressBar": true, "positionClass": "toast-top-right", "preventDuplicates": false, "onclick": null, "showDuration": "300", "hideDuration": "1000", "timeOut": "3000", "extendedTimeOut": "1000", "showEasing": "swing", "hideEasing": "linear", "showMethod": "fadeIn", "hideMethod": "fadeOut" } event.preventDefault(); var x = document.createElement("textarea"); if(is_modal){ var code = $(event.target).next(); console.log(code.text()); x.value = code.text(); $(event.target).append(x); x.select(); document.execCommand("copy"); x.remove(); }else{ x.value = $(event.target).parent().find("code").text(); document.body.appendChild(x); x.select(); document.execCommand("copy"); x.remove(); } toastr.info("已拷贝!") } $("pre:has('code')").prepend('<span class="material-icons copy_code_to_text" onClick="copy_code_to_text(event)">content_copy</span>');
In order to provide you with better services, this website uses cookies. By continuing to browse the web, you agree to our cookies policy. To understanding