• centos 下 php8.1安装


    安装过程和php7 没有什么两样

    就是报了一个错误:

    make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1

    解决办法也很简单, 在configure 中添加一个--disable-fileinfo

    虽然解决了,但错误原因是服务器内存不足,看来我的php版本升级可能要到此为止了。

    ./configure --prefix=/abc/server/php81 --with-config-file-path=/abc/server/php81/etc --with-config-file-scan-dir=/abc/server/php81/etc/php.d --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-sockets --enable-soap --enable-pcntl --enable-bcmath --enable-mbstring --with-gettext --enable-mysqlnd --with-mysqli --with-pdo-mysql --enable-gd --with-jpeg --with-zlib --with-freetype --with-webp=/usr/include/webp --with-curl --with-openssl=/usr/local/ssl --with-mhash --with-zip --with-bz2 --disable-fileinfo

    还是要记录一下的原因是有些配置项发生了变化,我花了一些时间查看了这些模块的安装要求,有一些配置是不需要再写上去了

    php-fpm 需要 --enable-fpm
    cli 不需要

    mbstring 需要 --enable-mbstring 另外 --disable-mbregex:禁用正则表达式函数中多字节字符的支持
    gettext 需要 --with-gettext[=DIR] DIR 默认是/usr/local
    iconv 不需要 --without-iconv 禁用 --with-iconv[=DIR] 指定 iconv 在系统里的路径

    socket 需要 --enable-sockets
    SOAP 需要 --enable-soap
    BC高精度数学函数 需要 --enable-bcmath

    XML-RPC 需要 --with-xmlrpc[=DIR] php8已经不支持,转为pecl

    libxml 不需要 --disable-libxml禁用
    Opcache 不需要 但使用需要 php.ini 中配置

    pcntl 需要 --enable-pcntl

    gd 需要 --enable-gd
    jpeg 需要 --with-jpeg
    png 不需要 但需要安装 libpng 和 zlib
    webp 需要 --with-webp
    Zlib 需要 --with-zlib[=DIR]

    xsl 需要 --with-xsl[=DIR]

    cURL 需要 --with-curl[=DIR]
    OpenSSL 需要 --with-openssl[=DIR]
    mhash 需要 --with-mhash[=DIR]
    zip 需要 --with-zip
    Bzip2 需要 --with-bz2[=DIR]

    Shmop 需要 --enable-shmop

  • 相关阅读:
    MybatisProperties注册IOC容器和初始化
    Springboot源码之application.yaml读取过程
    DataSource的注册容器和初始化
    修改ha_config配置文件
    读书笔记--Python基础教程 001
    Python实现购物车小程序
    Python3实现三级菜单
    实现用户登录并且输入错误三次后锁定该用户
    day1-python 的基础部分
    翻译:《实用的Python编程》06_02_Customizing_iteration
  • 原文地址:https://www.cnblogs.com/mitang/p/16394464.html
Copyright © 2020-2023  润新知