去重后需要安装的yum安装包如下:
autoconf bison bison-devel bzip2 bzip2-devel ca-certificates cairo-devel c-ares c-ares-devel cmake crontabs curl curl-devel diffutils
e2fsprogs e2fsprogs-devel expat-devel file flex freetype freetype-devel gcc gcc-c++ gcc-g77 gd gd-devel gettext gettext-devel git-core glib2 gl
ib2-devel glibc.i686 gmp-devel icu kernel-devel krb5 krb5-devel libaio-devel libcap libc-client-devel libcurl libcurl-devel libevent libevent-d
evel libicu-devel libidn libidn-devel libjpeg libjpeg-devel libpng libpng10 libpng10-devel libpng-devel libstdc++.so.6 libtool libtool-libs lib
webp libwebp-devel libxml2 libxml2-dev libxml2-devel libXpm-devel libxslt libxslt* libxslt-devel lsof make ncurses ncurses-devel net-tools open
ssl openssl-devel patch pcre pcre-devel perl perl-Data-Dumper perl-devel psmisc pspell-devel python-devel python-imaging readline-devel tar unz
ip vim-minimal vixie-cron wget zip zlib zlib-devel
shell源码
cat yumci.sh
#!/bin/bash
#writen by Aiker
myum() {
if ! rpm -qa|grep -q "^$1"
then
yum install -y $1
check_ok
else
echo $1 already installed.
fi
}
check_ok() {
if [ $? != 0 ]
then
echo "Error, Check the error log."
fi
}
for p in autoconf bison bison-devel bzip2 bzip2-devel ca-certificates cairo-devel c-ares c-ares-devel cmake crontabs curl curl-devel diffutils
e2fsprogs e2fsprogs-devel expat-devel file flex freetype freetype-devel gcc gcc-c++ gcc-g77 gd gd-devel gettext gettext-devel git-core glib2 gl
ib2-devel glibc.i686 gmp-devel icu kernel-devel krb5 krb5-devel libaio-devel libcap libc-client-devel libcurl libcurl-devel libevent libevent-d
evel libicu-devel libidn libidn-devel libjpeg libjpeg-devel libpng libpng10 libpng10-devel libpng-devel libstdc++.so.6 libtool libtool-libs lib
webp libwebp-devel libxml2 libxml2-dev libxml2-devel libXpm-devel libxslt libxslt* libxslt-devel lsof make ncurses ncurses-devel net-tools open
ssl openssl-devel patch pcre pcre-devel perl perl-Data-Dumper perl-devel psmisc pspell-devel python-devel python-imaging readline-devel tar unz
ip vim-minimal vixie-cron wget zip zlib zlib-devel;do myum $p;done
输出实例如下:
```[root@aaa ~]# sh ci.sh
autoconf already installed.
bison already installed.
bison-devel already installed.
bzip2 already installed.
bzip2-devel already installed.
ca-certificates already installed.
cairo-devel already installed.
c-ares already installed.
c-ares-devel already installed.
cmake already installed.
crontabs already installed.
curl already installed.
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
原文地址:http://blog.51cto.com/m51cto/2085339