Pages

Showing posts with label yum. Show all posts
Showing posts with label yum. Show all posts

Monday, August 4, 2014

Yum error :[Errno 14] Peer cert cannot be verified or peer cert invalid

In my case the above certificate error was because of worng time in the server . Once  I installed ntp and updated the time it started working fine.

yum -y install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

yum -y install http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm Loaded plugins: fastestmirror
Determining fastest mirrors
* base: mirror.net.cen.ct.gov
* extras: mirror.fdcservers.net
* updates: mirror.solarvps.com
base | 3.7 kB 00:00
base/primary_db | 4.4 MB 00:01
extras | 3.4 kB 00:00
extras/primary_db | 19 kB 00:00
foreman | 2.9 kB 00:00
foreman/primary_db | 77 kB 00:00
foreman-plugins | 2.9 kB 00:00
foreman-plugins/primary_db | 26 kB 00:00
http://repos.fedorapeople.org/repos/openstack/openstack-icehouse/epel-6/repodata/repomd.xml: [Errno 14] Peer cert cannot be verified or peer cert invalid
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: openstack-icehouse. Please verify its path and try again

Saturday, December 3, 2011

yum-downloadonly

with this plugin we can save the packages for future install without internet

1.>>>>>>>>>yum install yum-downloadonly

2.>>>>>>>>>yum update httpd -y --downloadonly --downloaddir=/opt

here update can be changed to install…….httpd with needed package name…..opt with needed directory

later we can install downloaded rpm with

3.>>>>>>>>>rpm -ivUh *.rpm


Friday, December 2, 2011

Enable Install Software Package from Fedora DVD/CD

List the file inside yum repo configuration directory... you can use the ll command as show on example below or replace the ll command with ls -l command.if needed first try "yum install repo"
 1.>>>>>>>>>ll /etc/yum.repos.d/

To make Fedora DVD as installation source... we need to create DVD repo file and edit this file to make the Fedora DVD as the installation source.  To make life little bit easier,  just copy the existing yum configuration file fedora.repo and name the copied file as fedora-dvd.repo
2.>>>>>>>>>cp -pr /etc/yum.repos.d/fedora.repo /etc/yum.repos.d/fedora-dvd.repo

3.>>>>>>>>>ll /etc/yum.repos.d/

Execute command below to open and edit the fedora-dvd.repo configuration file using gedit editor... edit the configuration file.. rename the repo as "[fedora-dvd]", and "name=Fedora-dvd" add PATH to the Fedora 11 DVD "baseurl=file:///media/Fedora%2011%20i386%20DVD/" and enable the Fedora DVD repo file "enabled=1 "see... working example below... and then remove unwanted line from the fedora-dvd.repo configuration file.
4.>>>>>>>>>gedit /etc/yum.repos.d/fedora-dvd.repo &

[fedora-dvd]

name=Fedora-dvd $releasever - $basearch

failovermethod=priority

baseurl=file:///media/Fedora%2011%20i386%20DVD/

enabled=1

metadata_expire=7d

gpgcheck=1

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$basearch

....Save and exit the editor

**change the baseurl as per the dvd version u use**
5.>>>>>>>>>yum clean all

To start to use Fedora installation DVD as installation source, execute yum command and temporary disable all other repo except Fedora DVD repo using the command that show on example below.  Change the gcc part to the software that you want to install in your box
 6.>>>>>>>>yum --disablerepo=\* --enablerepo=fedora-dvd install gcc*

 

 

CREATE LOCAL YUM REPOSITORY

1) Copy all the RPMS from the DVD to a particular folder lets say /root/os/RPMS

2) Install createrepo RPM from /root/os/RPMS directory using rpm command

3) Now, we will have to create repo of the directory in which we have coied the RPMS. Following is the command to create the repo
.........>createrepo /root/os/RPMS

Once the above command gets completed you will find repodata directory in /root/os/RPMS folder

4) configuing YUM to work with local repository. Create a new file in /etc/yum.repo.d/ or open /etc/yum.conf and paste following
[local repo]
 name = OS $release - MyLocalRepo
baseurl = file:///root/os/RPMS/
enabled=1
gpgcheck=0

Now Try to install any package using YU