SUSE11 SP3系统源码升级安装automake
1、下载源码安装包
m4-1.4.18.tar.gz
autoconf-2.69.tar.gz
automake-1.15.1.tar.gz
libtool-2.4.6.tar.gz
2、保存以下脚本到setup_suse11sp3.sh,或者手动执行install函数里面的脚本
[root@QIANZI-BASE home]# vim setup_suse11sp3.sh
#!/bin/bash
NAME=""
VERSION=""
SUFFIX="tar.gz"
SUBJECT=""
SUBNAME=""
function check() {
local check_isok="YES"
echo
echo "***************************** Config Checking *******************************"
if [ ! -f "m4-1.4.18.tar.gz" ]; then
echo "## check file 'm4-1.4.18.tar.gz' ###################### [ NO ]"
check_isok="NO"
else
echo "## check file 'm4-1.4.18.tar.gz' ###################### [ YES ]"
fi
if [ ! -f "autoconf-2.69.tar.gz" ]; then
echo "## check file 'autoconf-2.69.tar.gz' ###################### [ NO ]"
check_isok="NO"
else
echo "## check file 'autoconf-2.69.tar.gz' ###################### [ YES ]"
fi
if [ ! -f "automake-1.15.1.tar.gz" ]; then
echo "## check file 'automake-1.15.1.tar.gz' ###################### [ NO ]"
check_isok="NO"
else
echo "## check file 'automake-1.15.1.tar.gz' ###################### [ YES ]"
fi
if [ ! -f "libtool-2.4.6.tar.gz" ]; then
echo "## check file 'libtoo-2.4.6.tar.gz' ###################### [ NO ]"
check_isok="NO"
else
echo "## check file 'libtoo-2.4.6.tar.gz' ###################### [ YES ]"
fi
if [[ "${check_isok}" == "NO" ]]; then
echo "###################### Config Checked ERROR. ######################"
exit 1
fi
echo "###################### Config Checked OK. ######################"
}
function install() {
tar -zvxf m4-1.4.18.tar.gz
chmod -R 755 m4-1.4.18/
cd m4-1.4.18/
./configure --prefix=/usr/
make
make install
cd ..
tar -zvxf autoconf-2.69.tar.gz
chmod -R 755 autoconf-2.69/
cd autoconf-2.69/
./configure --prefix=/usr/
make
make install
cd ..
tar -zvxf automake-1.15.1.tar.gz
chmod -R 755 automake-1.15.1/
cd automake-1.15.1/
./configure --prefix=/usr/
make
make install
cd ..
tar -zvxf libtool-2.4.6.tar.gz
chmod -R 755 libtool-2.4.6/
cd libtool-2.4.6/
./configure --prefix=/usr/
make
make install
cd ..
rm -rf m4-1.4.18
rm -rf autoconf-2.69
rm -rf automake-1.15.1
rm -rf libtool-2.4.6
}
function config(){
ldconfig
echo "## config finished ###################### [ OK ]"
}
function test(){
which autoconf
whereis autoconf
which automake
whereis automake
autoconf --version
automake --version
}
##################################################################
# main regine
##################################################################
check
install
config
test
##################################################################
# END
##################################################################
3、改变脚本权限
[root@QIANZI-BASE home]# chmod -R 755 setup_suse11sp3.sh
4、执行脚本
[root@QIANZI-BASE home]# ./setup_suse11sp3.sh