shell脚本实现源码LAMP自动化安装(2)

#6.5 Install zlib
echo "Install zlib ..."
cd $EXTRACT_PATH/zlib*
if [[ $SYSTEM_BIT -eq 32 ]]; then
    ./configure >/dev/null 2>&1
else
    CFLAGS="-O3 -fPIC" ./configure >/dev/null 2>&1
fi
[ $(echo $?) -ne 0 ] && exit 1
make >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
make install >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
echo "Zlib Install Complete."
echo

#6.6 Install libpng
echo "Install libpng ..."
cd $EXTRACT_PATH/libpng*
./configure --prefix=$INSTALL_PATH/libpng >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
make >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
make install >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
echo "Libpng Install Complete."
echo

#6.7 Install jpeg
echo "Install jpegsrc ..."
mkdir $INSTALL_PATH/jpeg/{bin,lib,include,man/man1} -p
cd $EXTRACT_PATH/jpeg*
[ $(echo $?) -ne 0 ] && exit 1
./configure  --prefix=$INSTALL_PATH/jpeg/ --enable-shared --enable-static >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
make >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
make install >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
echo "Jpegsrc Install Complete."
echo

#6.8 Install freetype
echo "Install freetype ..."
cd $EXTRACT_PATH/freetype*
./configure --prefix=$INSTALL_PATH/freetype >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
make >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
make install >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
echo "Freetype Install Complete."
echo

#6.9 Install autoconf
echo "Install autoconf ..."
cd $EXTRACT_PATH/autoconf*
./configure >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
make >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
make install >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
echo "Autoconf Install Complete."
echo

#6.10 Install ncurses
#echo "Install ncurses ..."
#cd $EXTRACT_PATH/ncurses*
#./configure --prefix=$INSTALL_PATH/ncurses --with-shared >/dev/null 2>&1
#[ $(echo $?) -ne 0 ] && exit 1
#make >/dev/null 2>&1
#[ $(echo $?) -ne 0 ] && exit 1
#make install >/dev/null 2>&1
#[ $(echo $?) -ne 0 ] && exit 1
#echo "Ncurses Install Complete."
#echo

#6.11 Install gd
echo "Install GD ..."
cd $EXTRACT_PATH/gd*
sed -i 15s#png.h#$INSTALL_PATH/libpng/include/png.h# gd_png.c
[ $(echo $?) -ne 0 ] && exit 1
./configure --prefix=$INSTALL_PATH/gd --with-jpeg=$INSTALL_PATH/jpeg/ --with-png=$INSTALL_PATH/libpng/ --with-freetype=$INSTALL_PATH/freetype/ >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
make >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
make install >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
echo "GD Install Complete."
echo

#6.12 Install apr
echo "Install apr ..."
cd $EXTRACT_PATH/apr*
./configure --prefix=$INSTALL_PATH/apr >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
make >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
make install >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
echo "Apr Install Complete."
echo

#6.13 Install apr-util
echo "Install apr-util ..."
cd $EXTRACT_PATH/apr-util*
./configure --prefix=$INSTALL_PATH/apr-util --with-apr=$INSTALL_PATH/apr >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
make >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
make install >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
echo "Apr-util Install Complete."
echo

#6.14 Install pcre
echo "Install pcre ..."
cd $EXTRACT_PATH/pcre*
./configure --prefix=$INSTALL_PATH/pcre >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
make >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
make install >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
echo "Pcre Install Complete."
echo

#6.15 Install freetds
echo "Install freetds ..."
cd $EXTRACT_PATH/freetds*
./configure --prefix=$INSTALL_PATH/freetds \
--enable-shared \
--enable-static \
--with-tdsver \
--enable-msdblib >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
make >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
make install >/dev/null 2>&1
[ $(echo $?) -ne 0 ] && exit 1
echo "freetds Install Complete."
echo

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/6cd23d2e6eda1d3e6161491d4814d058.html