PHP compiled installation script

Source: Internet
Author: User

#!/bin/bash

##############################################################

# File Name:c.sh

# version:v1.0

# Author:wanglong

# Organization:www.oldboyedu.com

# Created time:2017-08-29 12:01:03

# Description:

##############################################################

Yum install zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel freetype-devel libpng-devel Gd-devel Libcurl-devel Libxslt-devel libxslt-devel-y

Rpm-qa zlib-devel libxml2-devel libjpeg-devel libjpeg-turbo-devel libiconv-devel freetype-devel libpng-devel gd-devel Libcurl-devel Libxslt-devel

Yum-y Install Libmcrypt-devel Mhash mcrypt

Rpm-qa Libmcrypt-devel Mhash MCrypt

Cd/home/oldboy/tools

#这里我使用的安装包, you need to download it before you can execute the following command (note version)

Tar zxf libiconv-1.14.tar.gz

CD libiconv-1.14

./configure--prefix=/usr/local/libiconv

Make && make install

cd/home/oldboy/tools/

Tar XF php-5.5.32.tar.gz

CD php-5.5.32

./configure \

--prefix=/application/php-5.5.32 \

#not MySQL

--WITH-MYSQL=MYSQLND \

--WITH-PDO-MYSQL=MYSQLND \

--with-iconv-dir=/usr/local/libiconv \

--with-freetype-dir \

--with-jpeg-dir \

--with-png-dir \

--with-zlib \

--WITH-LIBXML-DIR=/USR \

--enable-xml \

--disable-rpath \

--enable-bcmath \

--ENABLE-SHMOP \

--enable-sysvsem \

--enable-inline-optimization \

--with-curl \

--enable-mbregex \

--ENABLE-FPM \

--enable-mbstring \

--with-mcrypt \

--WITH-GD \

--ENABLE-GD-NATIVE-TTF \

--WITH-OPENSSL \

--with-mhash \

--ENABLE-PCNTL \

--enable-sockets \

--WITH-XMLRPC \

--ENABLE-SOAP \

--enable-short-tags \

--enable-static \

--with-xsl \

--WITH-FPM-USER=WWW \

--WITH-FPM-GROUP=WWW \

--ENABLE-FTP \

--enable-opcache=no

Ln-s/application/mysql/lib/libmysqlclient.so.18/usr/lib64/

Touch Ext/phar/phar.phar

[$?-ne 0] | | echo "Error"

Make && make install

Ln-s/application/php-5.5.32//application/php

cd/home/oldboy/tools/php-5.5.32

CP Php.ini-production/application/php/lib/php.ini

cd/application/php/etc/

CP Php-fpm.conf.default php-fpm.conf

/application/php/sbin/php-fpm

Netstat-lntup|grep PHP

Ps-ef|grep PHP


This article is from the "Qinnengbuzhuo" blog, make sure to keep this source http://dalongge.blog.51cto.com/13121286/1973839

PHP compiled installation script

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.