Membuat Repository Local Linux
1. Install repo & vsftp (very secure file
transfer protocol)
# yum install createrepo -y
# yum install vsftp -y
2. Isi repositories
a. Untuk mengisi repositories ini, ada 2 cara,yaitu:
Download dari repo web / www.kambing.ui.ac.id / www.centos.org
Wget http://kambing.ui.ac.id/centos/6.5/os/i386/
Wget http: //ftp.belnet.be/packages/dries.ulyssis.org/redhat/el4/en/i386/dries/RPMS
b. Copy dari DVD libraries
1. Mount –o loop file.iso /mnt/iso;cp –r
/mnt/iso/* /path/to/ftp/directory/
2. Bila langsung dari disk tidak perlu di mount
cukup copy semua file yang ada di disk tersebut (disk1 dan disk2)
1.
3. Setelah mengisi repositories, maka tinggal di
validate dengan cara
# createrepo /path/to/ftp/directory/
Contoh
[root@bkp iso]# createrepo
/var/ftp/pub/centos/6.4/updates/i386/
Spawning worker 0
with 4802 pkgs
Workers Finished
Gathering worker results
Saving Primary
metadata
Saving file lists
metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
[root@bkp iso]#
1.
4. Cek di ftp dengan browser , ftp://ipserver/pub/centos/6.4/updates/i386/
5. Buat file *.repo di client
# cd /etc/yum.repo
# rename akhiran semua file di folder tersebut
# buat file
costum.repo dan masukan link seperti contoh berikut ini
#==Untuk Centos 6.x==#
[customrepo]
name=Custom
Repository
baseurl=ftp://192.168.0.5/pub/centos/6.4/updates/i386/
enabled=1
gpgcheck=0
#note
: basurl di arahkan ke path ftp server yang mengandung repositories
#==Untuk Centos 5.6==##
baseurl=ftp://192.168.0.5/pub/centos/5.6/updates/i386/
enabled=1
gpgcheck=0
#note
: basurl di arahkan ke path ftp server yang mengandung repositories
·
Hubungi admin untuk keterangan
repositories nya
6.
Test update repo
# yum update
Jika berhasil
maka,tidak akan ada pesan error yang tampil
Contoh berhasil :
================================================
Install 37 Package(s)
Upgrade 496 Package(s)
Total download size:
539 M
Is this ok [y/N]:
7. Common Errors and their solutions
1)Errno 256:Metadata file does not match
checksum
Solution:
1) Edit
/etc/yum.conf and add the following line
http_caching=packages
2) Run "yum
clean metadata"
3) Retry the yum
install
2)“TypeError: rpmdb open failed” or
“TypeError: rpmdb unable to join the environment”
Solution:
# yum clean
all
#rm -f /var/lib/rpm/__db*
#rpm –rebuilddb
#yum update
#rm -f /var/lib/rpm/__db*
#rpm –rebuilddb
#yum update
3)ValueError: need more than 1 value to
unpack
Solution:
#yum clean all
#yum clean metadata
#yum clean metadata
#yum clean dbcache
and then execute
#yum
makecache
4)thread.error: can’t start new thread
Solution:
#rm
/usr/lib/yum-plugins/ threading.py
#yum update
5)[Errno -3] Error performing checksum
Solution:
#createrepo -v -s
sha1
#yum clean all
6)TypeError: unsubscriptable object
Solution:
#yum clean metadata
#yum update missing
dependency error
Solution:
#yum
clean all
#yum
update
7)Yum install GPG error
Solution:
#rpm
--import /etc/pki/rpm-gpg/RPM*
8)Error: Cannot retrieve repository metadata
(repomd.xml)
Solution:
This
is a network issue.Please check DNS,Proxy etc. settings for the same.
Comments
Post a Comment