码迷,mamicode.com
首页 > Web开发 > 详细

PHP编译安装脚本

时间:2017-10-18 20:10:57      阅读:214      评论:0      收藏:0      [点我收藏+]

标签:运行脚本

#!/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

#这里我使用的安装包,需要下载后才能执行以下命令(注意版本)

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


本文出自 “勤能补拙” 博客,请务必保留此出处http://dalongge.blog.51cto.com/13121286/1973839

PHP编译安装脚本

标签:运行脚本

原文地址:http://dalongge.blog.51cto.com/13121286/1973839

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!