Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ CentOS yum configuration under local sources     - C # Future: Method Contract (Programming)

- The difference between vi and nano (Linux)

- Linux install Samba file sharing server (Server)

- CentOS / Linux install VNC Server (Linux)

- 12 Linux Process Management Commands (Linux)

- Linux C source code (Ascii HexToBinary: Converts hexadecimal string format ASCII codes) (Programming)

- Ubuntu iptables prevent IP attacks (Linux)

- Android studio multi-channel ultra-compact version of the package (Programming)

- How to disable IPv6 on Ubuntu, Linux Mint, Debian (Linux)

- Wireshark basic introduction and learning TCP three-way handshake (Linux)

- installation and configuration of the PHP environment (Apache2) under Linux (Server)

- Linux development management utility command (Linux)

- Python data types summary (Programming)

- Why you can have JavaScript string method (Programming)

- How to install and configure a VNC server on CentOS 7.0 (Server)

- CentOS 6.5 system installation Oracle11.2.0.4 basic steps (Database)

- Encounter ORA-00600: internal error code, arguments: [4194] ORA-1552 (Database)

- State and Linux nf_conntrack TCP disconnect time (Programming)

- To install minimize RHEL / CentOS 7 (Linux)

- Redhat 5 prohibit IPv6 (Linux)

 
         
  CentOS yum configuration under local sources
     
  Add Date : 2018-11-21      
         
         
         
  Off the net, and no way want to download something, then play the next yum configuration local sources. In fact, it would not, the Internet search, summed up the following two ways:

A. Install the software by CentOS DVD, CD software, which provides enough to satisfy our need for it, and the DVD version of the software is stable version, faster download speeds, learning CentOS, the DVD will CentOS yum source can be used as the default greatly improve learning efficiency.

I was CentOS
 6.4 using a virtual machine, the virtual machine to load CD method: VM -> Removable Devices -> CD / DVD-> Settings, choose a good CD.

Start down the steps:

1. [root @ localhost
 ~] # Mkdir / media / CentOS // Create a directory to mount the CD-ROM

2. [root @ localhost
 ~] #mount / Dev / cdrom / mnt / centos // mount

3. [root @ localhost
 yum.repos.d] # mv CentOS-Base.repo CentOS-Base.repo.bak // use yum network update mode, simply default choice for CentOS-Base.repo renamed CentOS-Base.repo.bak i.e. can

4. [root @ localhost
 ~] # Vim /etc/yum.repos.d/CentOS-Media.repo // Configure the local source

will
[C6-media]
name = CentOS- $ releasever - Media
baseurl = file: /// media / CentOS /
file: /// media / cdrom /
file: /// media / cdrecorder /
gpgcheck = 1
enabled = 0
change into
[C6-media]
name = CentOS- $ releasever - Media
baseurl = file: /// media / CentOS /
gpgcheck = 1
enabled = 1
Wherein baseurl modify the DVD mount directory, enabled = 1 enable local update mode
: Wq to save and exit

6. [root @ localhost
 ~] # Yum clean all // clear the existing yum information

7. [root @ localhost
 yum.repos.d] # yum list // Check the list of DVD software

So later on DVD to install the software using the default, if you want to restore the network installation mode,
 CentOS-Base.repo.bak reduction can be renamed.
PS. After each reboot the system need to manually mount the DVD to / media / CentOS /, if you can be bothered to write your own script to automatically mount.

Two. 1. [root @ localhost ~] # mkdir yumload // create folders stored rpm package

2.
 [Root @ localhost ~] # cp / media / CentOS / Packages / yumload / // copy past

3.
Then create a local repo use createrepo instruction, CentOS6 createrepo not installed by default, you need to manually install, it does not matter, in our DVD disc has integrated createrepo packet, if packets need to rely on other installation packages, and then click install.

[Root @ localhost
 Packages] # rpm -ivh createrepo-0.9.9-17.el6.noarch.rpm

error:
 Failed dependencies:
python-deltarpm is needed by createrepo-0.9.9-17.el6.noarch // This message may appear, do not worry

[Root @ localhost
 Packages] # rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.i686.rpm


error:
 Failed dependencies:
deltarpm = 3.5-0.5.20090913git.el6 is needed by python-deltarpm-3.5-0.5.20090913git.el6.i686

[Root @ localhost
 Packages] # rpm -ivh deltarpm-3.5-0.5.20090913git.el6.i686.rpm // find a step by step its dependencies

Preparing ...
                ########################################### [100%]
  1: deltarpm ########################################### [100%]

[Root @ localhost
 Packages] # rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.i686.rpm
Preparing ... ########################################### [100% ]
    1: python-deltarpm ########################################### [100 %]

[Root @ localhost
 Packages] # rpm -ivh createrepo-0.9.9-17.el6.noarch.rpm

Preparing ...
                ########################################### [100%]
    1: createrepo ########################################### [100%]

It will depend on the package complete. .

4. [root @ localhost ~] # createrepo yumload / # yum repository is created, patience

Spawning
 worker 0 with 3114 pkgs
Workers Finished
Gathering worker results


Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete

5 .. /etc/yum.repo.d/ created under a repo file, the file name can be customized, but must end with repo and add about content:


[Linuxidc.org] # warehouse name can be customized
name = This is a local repo # description
baseurl = file: /// yumload / # here to fill warehouses url, note that there are three forward slashes
enabled = 1 # if the open warehouse, 1 is on, 0 is off
gpgcheck = 0 # Check whether gpgkey, 1 is on, 0 is off

6. local yum source here has been set up is completed, the next re-initialization yum cache:
[Root @ linuxidc repodata] # yum clean all

7. Test group information is correct can add the following code, as long as the output information on that success
[Root @ linuxidc ~] # yum grouplist
     
         
         
         
  More:      
 
- The lambda expression Java8 (constructor references) (Programming)
- Adjust the size of the hard disk VirtualBox (Linux)
- C language preprocessor command (Programming)
- Tomcat session clustering and server session (Server)
- Make command tutorial (Linux)
- Use this one-time password via SSH secure login Linux (Programming)
- In addition to wget and curl, what better alternatives (Linux)
- Install Rubinius testing Ubuntu 14.04 native threads (Linux)
- To install file manager Nautilus 3.12.2 under ubuntu (Linux)
- Ubuntu amend resolv.conf restart failure problem (Linux)
- Redis 3.0.3 Cluster Setup (Database)
- Linux non-root user uses less than 1024 ports (Linux)
- Log4Net (Linux)
- Oracle SQL statement tracking (Database)
- How to Install Cantata MPD 1.3.3 for Ubuntu and Derived Version Users (Linux)
- Linux run queue process scheduling (Programming)
- Linux (RHEL6 CENTOS6 OLE6) VNC-SERVER Installation and Configuration (Server)
- Use IP address spoofing Intrusion Prevention Firewall (Linux)
- IOS distributed management using GitHub project development (Linux)
- Linux Telnet access Windows 7 configuration procedure (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.