php5.6.x独立编译安装
来源:互联网 发布:胎儿b超数据 编辑:程序博客网 时间:2024/06/06 11:36
安装依赖
yum -y install gcc gcc-c++ autoconf automake bison cmake curl curl-devel libzip libXpm libcurl-devel zlib-devel libcom_err-devel libpng-devel libjpeg* libsepol-devel libselinux-devel openssl openssl-devel pcre-devel php-common php-gd wget zlib ncurses-devel libxml2 libxml2-devel gd-devel flex bzip2 libmcrypt yasm nasm readline-devel libvpx-devel t1lib*
安装libmcrypt(php扩展)
wget -c https://jaist.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gztar zxvf libmcrypt-2.5.8.tar.gzcd libmcrypt-2.5.8./configure && make && make install
编译安装PHP 5.6.31
wget -c http://mirrors.sohu.com/php/php-5.6.31.tar.gztar -zxvf php-5.6.31.tar.gzcd php-5.6.31
./configure --prefix=/usr/local/php \--with-config-file-path=/usr/local/php/etc \--with-mysql=mysqlnd --with-mysqli=mysqlnd \--with-pdo-mysql=mysqlnd \--with-png-dir=/usr \--with-jpeg-dir=/usr \--with-freetype-dir=/usr \--with-vpx-dir=/usr \--with-t1lib=/usr \--with-libxml-dir=/usr/include/libxml2/libxml \--with-openssl-dir=/usr \--with-openssl \--without-pear \--with-gettext \--with-readline \--with-mhash \--with-mcrypt \--with-xmlrpc \--with-iconv \--with-curl \--with-zlib \--with-bz2 \--with-gd \--enable-inline-optimization \--enable-gd-native-ttf \--enable-mbstring \--enable-session \--enable-sockets \--enable-sysvsem \--enable-sysvmsg \--enable-sysvshm \--enable-opcache \--enable-mbregex \--enable-libxml \--enable-bcmath \--enable-shmop \--enable-pcntl \--enable-ctype \--enable-soap \--enable-fpm \--enable-ftp \--enable-zip \--enable-cli \--enable-xml
make #进入漫长的编译过程中...
make install # 安装
文件配置
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.confln -sb /usr/local/php/etc/php-fpm.conf /etc/php-fpm.conf
编辑配置文件
vi /etc/php-fpm.conf
pid = run/php-fpm.pid #取消前面的分号
vi /etc/php.ini
date.timezone = Asia/Shanghaiexpose_php = Off #禁止显示php版本的信息extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20131226/"
测试php-fpm配置
/usr/local/php/sbin/php-fpm -t
[26-Aug-2017 10:28:37] NOTICE: configuration file /usr/local/php/etc/php-fpm.conf test is successful
ln -sb /usr/local/php/bin/php /usr/bin/php -v
PHP 5.6.31 (cli) (built: Aug 26 2017 10:00:00) Copyright (c) 1997-2016 The PHP GroupZend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
设置 php-fpm开机启动
cp /root/php-5.6.3/sapi/fpm/init.d.php-fpm /etc/rc.d/init.d/php-fpmchmod 755 /etc/rc.d/init.d/php-fpmchkconfig php-fpm on
阅读全文
0 0
- php5.6.x独立编译安装
- linux下用源代码编译安装apache2.x + php5.x
- 编译安装php5.2.17
- 编译安装php5.6.30
- CentOS 6.X yum安装PHP5.6.X
- Centos 7.x yum安装php5.6.X(最新版)
- linux下编译安装nginx 1.x,php5.x,phpmyadmin 以及多版本php共存
- php5.2.x安装xdebug
- CentOS6编译安装LAMP:编译安装 PHP5
- PHP5.5编译安装问题
- CentOS下编译安装PHP5
- 安装编译源码php5.6.11
- [Centos]编译安装PHP5.6.13
- CentOS 编译安装php5.6
- 源码编译安装php5.6
- Linux编译安装PHP5.6.31
- php5.2.x php5.3.x php5.4.x php5.5.x php5.6.x 对比详解
- CentOS 5.x,6.0编译安装Nginx1.2.3+MySQL5.5.15+PHP5.3.6
- Linux下C/C++头文件以及库的搜索路径
- 2017年8月前端开发者超实用干货大合集
- 《Effective C++读书笔记》--条款04:确定对象被使用前已先被初始化
- mybatis sql in 查询总结
- SQL Server 2014 登陆遇到的问题
- php5.6.x独立编译安装
- CCF 201703-2 学生排队(模拟)
- Nginx+Tomcat+Memcached负载均衡集群服务搭建
- 机器学习-正则
- js最新手机号码、电话号码正则表达式
- 《Android开发艺术探索》笔记——Bitmap的加载和Cache(一)
- 网上资源汇总深度学习和机器学习实战例子
- POJ 2777 Count Color(线段树)
- 面试题3