Page 1 of 1

script install (epel repo)

Posted: Thu Dec 27, 2012 1:47 am
by Omar
Hi, in script for install vesta (vst-install.sh) note that epel repository have i386 architecture has default:

# Install EPEL repo
if [ ! -e '/etc/yum.repos.d/epel.repo' ]; then
if [ "$release" -eq '5' ]; then
epel="5/i386/epel-release-5-4.noarch.rpm"
fi

if [ "$release" -eq '6' ]; then
epel="6/i386/epel-release-6-8.noarch.rpm"
fi

rpm -ivh http://dl.fedoraproject.org/pub/epel/$epel
if [ $? -ne 0 ]; then
echo "Error: can't install EPEL repository"
exit 1
fi
fi

Maybe this is better (for ensure architecture is right):

# Install EPEL repo
if [ ! -e '/etc/yum.repos.d/epel.repo' ]; then
if [ "$release" -eq '5' ]; then
epel="5/$arch/epel-release-5-4.noarch.rpm"
fi

if [ "$release" -eq '6' ]; then
epel="6/$arch/epel-release-6-8.noarch.rpm"
fi

rpm -ivh http://dl.fedoraproject.org/pub/epel/$epel
if [ $? -ne 0 ]; then
echo "Error: can't install EPEL repository"
exit 1
fi
fi

regards

Re: script install (epel repo)

Posted: Thu Dec 27, 2012 3:31 pm
by skid
Thank you for suggestion Omar. It works that way because epel-release-5-4.noarch.rpm package is platform independent. But I agree with you, $arch variable is much more appropriate. Here is commit.

Re: script install (epel repo)

Posted: Fri Aug 21, 2015 12:59 pm
by Konstantinus
Так как установить на 7-ом CentOS?

Re: script install (epel repo)

Posted: Fri Aug 21, 2015 2:29 pm
by skurudo
Konstantinus wrote:Так как установить на 7-ом CentOS?
НИЧОСИ ВЫ ТОПИК ОТКАПАЛИ.
Есть самодельный, не-официальный установщик:
https://github.com/nobodypb/vesta/blob/ ... ll-rhel.sh

Topic closed.