Time out error when installing through YUM

Problem

Getting time out error while doing YUM install for asterisk dependencies or packages.

Timeout: <urlopen error timed out>

 

Solution

Step-1: Go to /etc/yum.conf

Step-2: Add below line in the main context

timeout=300

 

[main] cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
timeout=300

Open Source Asterisk Hardware