CentOS 6 php5.6.0 One-click Deployment script

Source: Internet
Author: User
Tags mcrypt

Target: One-click Deployment php5.6.0 version

Environment: CentOS 6 64-bit desktop version

Package: Link: Http://pan.baidu.com/s/1jIyZrRS Password: q9uu


[email protected] home]# cat php.sh

#/bin/bash

#

#CentOS 6

#

. /etc/init.d/functions

Dir=/root/test

Del_dir () {

Read-p "need to delete ${dir} delete [y|y/n|n]:" Del

Case $del in

Y|y)

RM-RF $dir

mkdir $dir

CD $dir

;;

N|n)

echo "Installation Termination"

Exit 7

;;

*)

echo "Please enter the correct value"

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 ncu RSes 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 "Installing GD error ..."..

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 "Compilation failed ..."

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 php-fpm on


This article is from "think one or two" blog, please be sure to keep this source http://250919938.blog.51cto.com/962010/1925010

CentOS 6 php5.6.0 One-click Deployment script

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.