-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall-src-001.sh
executable file
·55 lines (45 loc) · 1.04 KB
/
install-src-001.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/sh
install_path=`pwd`
echo '更新系统epel、remi源开始。。。。。。。。。。。'
#替换epeo、remi源
mv /etc/yum.repos.d /etc/yum.repos.d.disabled
if [ $? != 0 ]
then
echo 'mv /etc/yum.repos.d failed'
exit
fi
mkdir -p /etc/yum.repos.d
if [ $? != 0 ]
then
echo 'mkdir -p /etc/yum.repos.d failed'
exit
fi
cp $install_path/yum/*.repo /etc/yum.repos.d
if [ $? != 0 ]
then
echo 'copy *.repo to /etc/yum.repos.d falied'
exit
fi
mv /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6 /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6.disabled
if [ $? != 0 ]
then
echo 'mv /etc/pki/rpm-gpg/RPM* disabled falied'
exit
fi
mv /etc/pki/rpm-gpg/RPM-GPG-KEY-remi /etc/pki/rpm-gpg/RPM-GPG-KEY-remi.disabled
if [ $? != 0 ]
then
echo 'mv /etc/pki/rpm-gpg/RPM* falied'
exit
fi
cp ${install_path}/yum/RPM* /etc/pki/rpm-gpg/
if [ $? != 0 ]
then
echo 'mv /etc/pki/rpm-gpg/RPM* falied'
exit
fi
cd /etc/pki/rpm-gpg/; rpm --import *
cd $install_path
echo '更新系统epel、remi源结束。。。。。。。。。。。。。。。。。'
yum make clean
yum makecache