• centos 7 lNMP 安装之php 篇


    1.准备工作

      安装依赖包

    1 yum install -y gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libpng libpng-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses curl openssl-devel gdbm-devel db4-devel libXpm-devel libX11-devel gd-devel gmp-devel readline-devel libxslt-devel expat-devel xmlrpc-c xmlrpc-c-devel

      官方下载php源码包

      点击php官网下载http://php.net/downloads.php

      选择任何一个版本(最新、current stable),建议下载 "current stable",为了体验或者学习新技能,可以下载最新版本

      wget http://cn2.php.net/distributions/php-5.6.26.tar.gz

      建议阅读相关资料

      http://php.net/manual/zh/install.general.php

      http://php.net/manual/zh/features.commandline.php

    2.php 相关包安装

      1)libmcrypt 包下载地址

        包名:libmcrypt-2.5.8.tar.gz

        http://mcrypt.sourceforge.net/ -- 貌似官方

        https://sourceforge.net/projects/mcrypt/files/Libmcrypt/2.5.8/

      2)mhash

        https://sourceforge.net/projects/mhash/?source=typ_redirect

      3)mcrypt

        在安装之前首先,

    export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

    3.

    ./configure 
    --prefix=/usr/local/php/5.6.26 
    --with-config-file-path=/usr/local/php/5.6.26/etc 
    --with-config-file-scan-dir=/usr/local/5.6.26/etc/conf.d 
    --enable-fpm 
    --with-fpm-user=web 
    --with-fpm-group=www 
    --enable-soap 
    --with-openssl 
    --with-openssl-dir 
    --with-mcrypt 
    --with-pcre-regex 
    --with-zlib 
    --with-iconv 
    --with-bz2 
    --enable-calendar 
    --with-curl 
    --with-cdb 
    --enable-dom 
    --enable-exif 
    --with-pcre-dir 
    --enable-ftp 
    --with-gd 
    --with-jpeg-dir 
    --with-png-dir 
    --with-freetype-dir 
    --with-gettext 
    --with-gmp 
    --with-mhash 
    --enable-mbstring 
    --with-libmbfl 
    --with-onig 
    --enable-pdo 
    --with-pdo-mysql 
    --with-zlib-dir 
    --with-readline 
    --enable-session 
    --enable-shmop 
    --enable-simplexml 
    --enable-sockets 
    --enable-sysvmsg 
    --enable-sysvsem 
    --enable-sysvshm 
    --enable-wddx 
    --with-libxml-dir 
    --with-xsl 
    --enable-zip 
    --enable-mysqlnd 
    --with-mysqli 
    --without-pear
    

      安装结果:

    [root@bogon php-5.6.26]# cd /usr/local/php/5.6.26/bin/
    [root@bogon bin]# ./php -version
    PHP 5.6.26 (cli) (built: Sep 25 2016 04:09:38) 
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    

      灵感来源:

      https://www.insp.top/article/make-install-php-7 (不错的blog)

  • 相关阅读:
    AWR报告-数据库概要信息(一)
    性能tips
    linux脚本随笔-01
    小和问题 和逆序对问题
    SpringMVC 学习笔记(拦截器的配置))
    删除eclipse Maven 进程 导致eclipse的workspace 启动不了
    SpringMVC 学习笔记(请求方法的返回值和参数)
    SpringMVC 学习笔记(处理器映射器的配置)
    (转)Maven 项目新建index.jsp报错问题
    MyBatis 学习总结(1)
  • 原文地址:https://www.cnblogs.com/SkyForce/p/5890776.html
Copyright © 2020-2023  润新知