为了账号安全,请及时绑定邮箱和手机立即绑定

php编译安装脚本

标签:
PHP


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

点击查看更多内容
TA 点赞

若觉得本文不错,就分享一下吧!

评论

作者其他优质文章

正在加载中
  • 推荐
  • 评论
  • 收藏
  • 共同学习,写下你的评论
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦
今天注册有机会得

100积分直接送

付费专栏免费学

大额优惠券免费领

立即参与 放弃机会
意见反馈 帮助中心 APP下载
官方微信

举报

0/150
提交
取消