目標(biāo):一鍵部署php5.6.0版本
創(chuàng)新互聯(lián)專注于薊州企業(yè)網(wǎng)站建設(shè),響應(yīng)式網(wǎng)站設(shè)計(jì),成都商城網(wǎng)站開發(fā)。薊州網(wǎng)站建設(shè)公司,為薊州等地區(qū)提供建站服務(wù)。全流程按需網(wǎng)站開發(fā),專業(yè)設(shè)計(jì),全程項(xiàng)目跟蹤,創(chuàng)新互聯(lián)專業(yè)和態(tài)度為您提供的服務(wù)
環(huán)境:CentOS 6 64位 桌面版本
軟件包:鏈接:http://pan.baidu.com/s/1jIyZrRS 密碼:q9uu
[root@salt-master home]# cat php.sh
#/bin/bash
#
#CentOS 6
#
. /etc/init.d/functions
dir=/root/test
del_dir() {
read -p "需要?jiǎng)h除${dir} 是否刪除[Y|y/N|n]:" del
case $del in
Y|y)
rm -rf $dir
mkdir $dir
cd $dir
;;
N|n)
echo "安裝終止"
exit 7
;;
*)
echo "請輸入正確的值"
exit 8
;;
esac
}
[ ! -d $dir ] && {
mkdir $dir
cd $dir
} || del_dir
wget http://172.2.0.68/freetype-2.3.10.tar.bz2
wget http://172.2.0.68/jpegsrc.v7.tar.gz
wget http://172.2.0.68/libpng-1.2.41.tar.bz2
wget http://172.2.0.68/libiconv-1.14.tar.gz
wget http://172.2.0.68/gd-2.0.33.tar.gz
wget http://172.2.0.68/libmcrypt-2.5.7.tar.gz
wget http://172.2.0.68/zlib-1.2.8.tar.gz
wget http://172.2.0.68/php-5.6.0.tar.gz
yum -y install libjpeg-devel libpng-devel freetype-devel libxml2-devel zlib-devel glibc-devel glib2-devel bzip2-devel ncurses ncurses-devel curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel
tar jxvf freetype-2.3.10.tar.bz2
cd freetype-2.3.10
./configure --prefix=/usr/local/freetype
make && make install
cd ..
tar -xzvf jpegsrc.v7.tar.gz
cd jpeg-7/
./configure --prefix=/usr/local/jpeg
make && make install
cd ..
tar jvxf libpng-1.2.41.tar.bz2
cd libpng-1.2.41
./configure --prefix=/usr/local/libpng
make && make install
cd ..
tar -zxvf libiconv-1.14.tar.gz
cd libiconv-1.14
./configure --prefix=/usr/local/libiconv
make && make install
cd ..
ln -s /usr/local/libpng/include/pngconf.h /usr/include
ln -s /usr/local/libpng/include/png.h /usr/include
tar -xzvf gd-2.0.33.tar.gz
cd gd-2.0.33
./configure --prefix=/usr/local/gd2 --with-freetype=/usr/local/freetype --with-png=/usr/local/libpng --with-jpeg=/usr/local/jpeg
[ $? -eq 0 ] && {
make && make install
} || {
echo "安裝gd出錯(cuò)..........."
exit 8
}
cd ..
tar -xzvf libmcrypt-2.5.7.tar.gz
cd libmcrypt-2.5.7
./configure --prefix=/usr/local/libmcrypt
make && make install
cd ..
tar -zxvf zlib-1.2.8.tar.gz
cd zlib-1.2.8
./configure --prefix=/usr/local/zlib
make && make install
cd ..
ln -s /usr/local/libmcrypt/include/mcrypt.h /usr/include/
ln -s /usr/local/libmcrypt/lib/* /usr/local/lib/
echo "/usr/local/lib" >> /etc/ld.so.conf
ldconfig
tar -zxvf php-5.6.0.tar.gz
cd php-5.6.0
./configure -prefix=/usr/local/php --with-config-file-path=/etc --with-gd --with-png-dir --with-jpeg-dir --with-freetype-dir --enable-fpm --with-mcrypt --with-zlib --enable-mbstring --disable-pdo --with-curl --disable-rpath --with-bz2 --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --with-mhash --enable-zip --with-pcre-regex --with-MySQL --disable-fileinfo
[ $? -eq 0 ] && {
make && make install
} || {
echo "編譯失敗....."
exit 8
}
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
cp php.ini-production /etc/php.ini
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
chmod 700 /etc/init.d/php-fpm
chkconfig --add php-fpm
chkconfig --level 35 php-fpm on
分享題目:CentOS6php5.6.0一鍵部署腳本
本文地址:http://jinyejixie.com/article18/ijcogp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供企業(yè)建站、自適應(yīng)網(wǎng)站、外貿(mào)網(wǎng)站建設(shè)、關(guān)鍵詞優(yōu)化、網(wǎng)站收錄、靜態(tài)網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)