Your location:Tech News>News>Script>yum centos system set up local server method

Latest News

yum centos system set up local server method

Author:fsadmin

Views:

  Foreword

  First, of special note is, YUM only to solve the problem of RPM dependencies, rather than a mode other software installation.Although the source may be directly used in yum in centos, but there are isolated from the external network status, it is necessary to build a local source yum, let''s look at the method in detail.

  System: centos 6.5

  1, the disc mount to / mnt below

  # Mount / dev / cdrom / mnt

  2, delete the repo file system comes

  # Cd / etc / yum.repos.d /

  # Mkdir bak

  # Mv *.repo bak

  3, mounting createrepo (In fact, if the installation can createrepo i.e., but needs to rely on other packages, they have so fitted together)

  # Cd / mnt / Packages /

  # Rpm -ivh libxml2-python-2.7.6-14.el6.x86_64.rpm

  # Rpm -ivh deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm

  # Rpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpm

  # Rpm -ivh createrepo-0.9.9-18.el6.noarch.rpm

  4, createrepo command to create yum repository, creating an index of information

  Note: Here we yum warehouse built / doiido / local

  # Mkdir / doiido / local

  # Cp -rv / mnt / Packages / * / doiido / local

  # Cd / doiido / local

  # Createrepo -v / doiido / local

  5, if desired packet information

  # Cp / mnt / repodata / b4e0b9342ef85d3059ff095fa7f140f654c2cb492837de689a58c581207d9632-c6-x86_64-comps.xml / doiido / local / comps.xml

  # Createrepo -g / doiido / local / comps.xml / doiido / local

  6, edit your repo file

  # Vi / etc / yum.repos.d / local.repo

  # Library name

  [Local_server]

  # Name Description

  name = Thisis a local repo

  #yum source directory

  baseurl = file: /// doiido / local

  # Yum whether to enable the source, 0 to disable

  enabled = 1

  # Check GPG-KEY (0 is not checked, as a check)

  gpgcheck = 0

  7, yum cache load

  # Yum clean all

  # Yum makecache

  8, test download

  # Yum -y install php

  Here you can see php can be installed directly, without going through the Internet to download.

  to sum up

  The above method is to build local yum centos server in the system, we hope that the contents of this paper to learn or work can bring some help, if in doubt you can leave a message exchange.

  You may also be interested in the article: Step centos6 use yum install php mysql gd of CentOS 5.5 with yum yum to installation on LAMP (php Runtime Environment) method CentOS 5 CentOS 5.4 yum server configuration installed Apache + php + MysqlCentos thoroughly remove Mysql (rpm, yum case mounted) mounted mongodb CentOS yum and php extension centos6.Method 4 163 yum source arranged CentOS 6.5 mounted at yum MySQL-5.5 whole process graphic tutorials CentOS 6.5 used in the system installed MongoDB 2 yum.6 Tutorial CentOS 6.LAMP 2 and installed with yum Detailed phpMyadmin

Recommend article

Relate article