zoukankan      html  css  js  c++  java
  • ubuntu16.04编译安装php7.2

    1,下载解压

    tar xf php-7.2.0.tar.gz
    cd php-7.2.0/

    2,安装必要的库

    sudo apt-get install libxml2-dev
    sudo apt-get install openssl
    sudo apt-get install libssl-dev
    sudo apt-get install make
    sudo apt-get install curl
    sudo apt-get install libcurl4-gnutls-dev
    sudo apt-get install libjpeg-dev
    sudo apt-get install libpng-dev
    sudo apt-get install libmcrypt-dev

    3,编译

    ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=ghostwu

    make && sudo make install

    4,写一个测试文件,测试php

    ---------------------------------------------------------------------------------------------------------------------------------------------

    以上为裸装php

    如果需要添加扩展可以重新编译,或者用扩展安装方式,记得重新编译之前要make clean或者重新删除解压

     较为基本的扩展安装

    ./configure --prefix=/usr/local/php
    --with-config-file-path=/usr/local/php/etc
    --with-apxs2=/usr/local/httpd/bin/apxs
    --with-iconv-dir=/usr/local/lib
    --enable-fpm --with-fpm-user=ghostwu
    --with-iconv-dir=/usr/local/lib
    --enable-mysqlnd
    --with-pdo-mysql=mysqlnd
    --with-openssl
    --with-zlib

  • 相关阅读:
    SCCM2012 R2实战系列之七:软件分发(exe)
    man 手册--nc
    挂载虚拟机磁盘文件
    bond模式详解
    Windows下计算md5值
    man手册--iostat
    mount---挂载文件系统
    Linux-swap分区
    sync---强制将被改变的内容立刻写入磁盘
    vmstat---有关进程、虚存、页面交换空间及 CPU信息
  • 原文地址:https://www.cnblogs.com/ghostwu/p/8016565.html
Copyright © 2011-2022 走看看