User Tools

Site Tools


how_to_set_the_centos-base.repo

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
how_to_set_the_centos-base.repo [2017/11/20 20:43] walkeradminhow_to_set_the_centos-base.repo [2023/11/01 23:50] (current) walkeradmin
Line 24: Line 24:
 \\  \\ 
 \\  \\ 
 +N<color #ed1c24>OTE:</color> If there is a file called <color #ed1c24>local.repo</color> then you may need to rem out the lines in this file, or all external links will be ignored.
 +\\ 
 +\\ 
 +<file>
 +#[local-Server-centos]
 +#name=local-Server-centos
 +#baseurl=file:/mnt/MEDIA/repo/centos
 +#failovermethod=priority
 +#gpgcheck=0
 +#enabled=1
 +
 +#[local-Server-epel]
 +#name=local-Server-epel
 +#baseurl=file:/mnt/MEDIA/repo/epel
 +#failovermethod=priority
 +#gpgcheck=0
 +#enabled=1
 +
 +</file>
 +Create a new file called <color #ed1c24>CentOS-Base.repo</color> copy the following text in to it and save. <color #ed1c24>Note: This is for CentOS 7 only.</color>
 +\\ 
 +\\ 
 +If the <color #ed1c24>mirrorlist=</color> does not work for you, as a fall back you can try the
 +marked out <color #ed1c24>baseurl=</color> line instead.
 +\\ 
 +\\ 
 +<file>
 +# CentOS-Base.repo
 +#
 +# The mirror system uses the connecting IP address of the client and the
 +# update status of each mirror to pick mirrors that are updated to and
 +# geographically close to the client.  You should use this for CentOS updates
 +# unless you are manually picking other mirrors.
 +#
 +# If the mirrorlist= does not work for you, as a fall back you can try the
 +# remarked out baseurl= line instead.
 +#
 +
 +[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/
 +gpgcheck=1
 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
 +#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/
 +gpgcheck=1
 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 
 +
 +#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/
 +gpgcheck=1
 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 
 +
 +#additional packages that extend functionality of existing packages
 +[centosplus]
 +name=CentOS-$releasever - Plus
 +mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
 +#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
 +gpgcheck=1
 +enabled=0
 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
 +</file>
 +\\ 
 +To activate the repos you need to do run the following command:
 +\\ 
 +\\ 
 +    Yum Update
 +\\ 
 +\\ 
 +You should now be able to install default repository tools like <color #ed1c24>tcpdump</color>
 +\\ 
 +\\ 
 +Below is an example output after doing this on a new unit.
 +\\ 
 +\\ 
 +<file>
 +====== How to set the CentOS-Base.repo ======
 +<color darkorange>Apr 2017</color>\\ 
 +<color darkorange>Updated Nov 2017</color>
 +\\ 
 +\\ 
 +
 +----
 +
 +Because the minimal install of CentOS is generally what we use, the base repos are not present, this is not an issue until you need certain features (normally when fault finding) like:
 +\\ 
 +    htop
 +    nload
 +    tcpdump
 +\\ 
 +To install these you need to setup the base (and possibly EPEL) repositories, or when trying to use <color #ed1c24>Yum Install</color> you will get errors.
 +\\ 
 +\\ 
 +To get the base repositories added, you need to navigate to the following location (this is for CentOS, other distributions may differ).
 +\\ 
 +\\ 
 +    /etc/yum.repos.d
 +\\ 
 +If this folder is empty then you have no repositories set, you might see other repositories (like epel) but not the base ones.
 +\\ 
 +\\ 
 +N<color #ed1c24>OTE:</color> If there is a file called <color #ed1c24>local.repo</color> then you may need to rem out the lines in this file, or all external links will be ignored.
 +\\ 
 +\\ 
 +<file>
 +#[local-Server-centos]
 +#name=local-Server-centos
 +#baseurl=file:/mnt/MEDIA/repo/centos
 +#failovermethod=priority
 +#gpgcheck=0
 +#enabled=1
 +
 +#[local-Server-epel]
 +#name=local-Server-epel
 +#baseurl=file:/mnt/MEDIA/repo/epel
 +#failovermethod=priority
 +#gpgcheck=0
 +#enabled=1
 +
 +</file>
 +Create a new file called <color #ed1c24>CentOS-Base.repo</color> copy the following text in to it and save. <color #ed1c24>Note: This is for CentOS 7 only.</color>
 +\\ 
 +\\ 
 +If the <color #ed1c24>mirrorlist=</color> does not work for you, as a fall back you can try the
 +marked out <color #ed1c24>baseurl=</color> line instead.
 +\\ 
 +\\ 
 +<file>
 +# CentOS-Base.repo
 +#
 +# The mirror system uses the connecting IP address of the client and the
 +# update status of each mirror to pick mirrors that are updated to and
 +# geographically close to the client.  You should use this for CentOS updates
 +# unless you are manually picking other mirrors.
 +#
 +# If the mirrorlist= does not work for you, as a fall back you can try the
 +# remarked out baseurl= line instead.
 +#
 +
 +[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/
 +gpgcheck=1
 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
 +#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/
 +gpgcheck=1
 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 
 +
 +#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/
 +gpgcheck=1
 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 
 +
 +#additional packages that extend functionality of existing packages
 +[centosplus]
 +name=CentOS-$releasever - Plus
 +mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
 +#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
 +gpgcheck=1
 +enabled=0
 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
 +</file>
 +\\ 
 +To activate the repos you need to do run the following command:
 +\\ 
 +\\ 
 +    Yum Update
 +\\ 
 +\\ 
 +You should now be able to install default repository tools like <color #ed1c24>tcpdump</color>
 +\\ 
 +\\ 
 +Below is an example output after doing this on a new unit.
 +\\ 
 +\\ 
 +<file>
 +====== How to set the CentOS-Base.repo ======
 +<color darkorange>Apr 2017</color>\\ 
 +<color darkorange>Updated Nov 2017</color>
 +\\ 
 +\\ 
 +
 +----
 +
 +Because the minimal install of CentOS is generally what we use, the base repos are not present, this is not an issue until you need certain features (normally when fault finding) like:
 +\\ 
 +    htop
 +    nload
 +    tcpdump
 +\\ 
 +To install these you need to setup the base (and possibly EPEL) repositories, or when trying to use <color #ed1c24>Yum Install</color> you will get errors.
 +\\ 
 +\\ 
 +To get the base repositories added, you need to navigate to the following location (this is for CentOS, other distributions may differ).
 +\\ 
 +\\ 
 +    /etc/yum.repos.d
 +\\ 
 +If this folder is empty then you have no repositories set, you might see other repositories (like epel) but not the base ones.
 +\\ 
 +\\ 
 +N<color #ed1c24>OTE:</color> If there is a file called <color #ed1c24>local.repo</color> then you may need to rem out the lines in this file, or all external links will be ignored.
 +\\ 
 +\\ 
 +<file>
 +#[local-Server-centos]
 +#name=local-Server-centos
 +#baseurl=file:/mnt/MEDIA/repo/centos
 +#failovermethod=priority
 +#gpgcheck=0
 +#enabled=1
 +
 +#[local-Server-epel]
 +#name=local-Server-epel
 +#baseurl=file:/mnt/MEDIA/repo/epel
 +#failovermethod=priority
 +#gpgcheck=0
 +#enabled=1
 +
 +</file>
 Create a new file called <color #ed1c24>CentOS-Base.repo</color> copy the following text in to it and save. <color #ed1c24>Note: This is for CentOS 7 only.</color> Create a new file called <color #ed1c24>CentOS-Base.repo</color> copy the following text in to it and save. <color #ed1c24>Note: This is for CentOS 7 only.</color>
 \\  \\ 
Line 31: Line 268:
 \\  \\ 
 \\  \\ 
-<sxh [text][; options for SyntaxHighlighter]>+<file>
 # CentOS-Base.repo # CentOS-Base.repo
 # #
Line 74: Line 311:
 enabled=0 enabled=0
 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
-</sxh>+</file>
 \\  \\ 
 To activate the repos you need to do run the following command: To activate the repos you need to do run the following command:
Line 88: Line 325:
 \\  \\ 
 \\  \\ 
-<sxh [text]>+<file>
 yum update yum update
 Loaded plugins: fastestmirror Loaded plugins: fastestmirror
Line 2403: Line 2640:
 Complete! Complete!
  
-</sxh>+</file>
  
how_to_set_the_centos-base.repo.1511210585.txt.gz · Last modified: 2023/03/09 22:35 (external edit)