189 8069 5689

CentOS6php5.6.0一键部署脚本-创新互联

目标:一键部署php5.6.0版本

十多年的霍山网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。网络营销推广的优势是能够根据用户设备显示端的尺寸不同,自动调整霍山建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。创新互联从事“霍山网站设计”,“霍山网站推广”以来,每个客户项目都认真落实执行。

环境: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 "需要删除${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出错..........."

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

另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


当前文章:CentOS6php5.6.0一键部署脚本-创新互联
URL链接:http://cdxtjz.com/article/dsjcie.html

其他资讯