ubuntu下apt安装php7.4最全攻略

您所在的位置:网站首页 php7连接sybase_ctl ubuntu下apt安装php7.4最全攻略

ubuntu下apt安装php7.4最全攻略

2023-06-18 22:18| 来源: 网络整理| 查看: 265

php7.4于2019年底发布,而截至2020/04月国内提供apt下载7.4的源还没有。只能求于国外的源,但速度慢实在无法容忍。这里介绍下全套的安装方法

1. 安装apt常用工具包

sudo apt-get -y install

Ps:Ubuntu 16.04 LTS 后使用 apt 取代 apt-get

2. 使用apt-fast 提升下载速度的软件,安装软件时,通过增加线程使下载软件速度加快。

sudo add-apt-repository ppa:apt-fast/stable sudo apt-get install apt-fast

先添加apt-fast的安装源 然后安装。在出现的GUI画面依此选择替换apt-get, 设置最大16线程,和yes。到这一步就安装好了apt-fast

卸载系统中已有的php版本和扩展

sudo apt-get autoremove php*

添加php7.4的源

sudo add-apt-repository ppa:ondrej/php && sudo apt-get update

使用apt-fast 安装php7.4

sudo apt-fast -y install php7.4

安装php7.4必要的扩展

sudo -y apt-fast install php7.4-dev //phpize需要 sudo -y apt-fast install php-pear //pecl需要 sudo -y apt-fast install php7.4-fpm php7.4-mysql php7.4-curl php7.4-json php7.4-mbstring php7.4-xml php7.4-intl

安装可选扩展

sudo apt-fast install php7.4-gd sudo apt-fast install php7.4-soap sudo apt-fast install php7.4-gmp sudo apt-fast install php7.4-odbc sudo apt-fast install php7.4-pspell sudo apt-fast install php7.4-bcmath sudo apt-fast install php7.4-enchant sudo apt-fast install php7.4-ldap sudo apt-fast install php7.4-opcache sudo apt-fast install php7.4-readline sudo apt-fast install php7.4-sqlite3 sudo apt-fast install php7.4-xmlrpc sudo apt-fast install php7.4-bz2 sudo apt-fast install php7.4-interbase sudo apt-fast install php7.4-pgsql sudo apt-fast install php7.4-recode sudo apt-fast install php7.4-sybase sudo apt-fast install php7.4-xsl sudo apt-fast install php7.4-cgi sudo apt-fast install php7.4-dba sudo apt-fast install php7.4-phpdbg sudo apt-fast install php7.4-snmp sudo apt-fast install php7.4-tidy sudo apt-fast install php7.4-zip* ———————————————— sudo apt install php7.4-event sudo apt install php7.4-apcu sudo apt install php7.4-redis sudo apt install php7.4-posix sudo apt install php7.4-fileinfo apt-fast install php7.4-bcmath apt-fast install php7.4-xmlrpc apt-fast install php7.4-zip

到这里就安装完成! 想体验极速的php7.4预加载的伙伴,可以一试了。



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3