【问题标题】:Get and install specific php version with aptitude使用 aptitude 获取并安装特定的 php 版本
【发布时间】:2016-06-28 13:00:06
【问题描述】:

今天,当前的 PHP 版本是 Php7.0.8,我想用 aptitude 获取并安装 Php7.0.5。例如,可以使用 dotdeb 存储库吗?

如何在 Debian 8 Jessie 上获得具有 aptitude 的特定 php 版本?

【问题讨论】:

标签: php debian installation php-7 aptitude


【解决方案1】:

你可以安装php7.0.5:

  • 首先,获取安装存档:

    wget http://www.php.net/distributions/php-7.0.5.tar.xz
    
  • 接下来,解压文件:

    tar xvfJ php-7.0.5.tar.xz
    
  • 进入解压目录:

    cd php-7.0.5
    
  • 配置您的安装 (You can help with the online php documentation installation configuration option)

    ./configure --prefix=/usr        \
        --sysconfdir=/etc            \
        --localstatedir=/var         \
        --datadir=/usr/share/php     \
        --mandir=/usr/share/man      \
        --enable-fpm                 \
        --with-fpm-user=www-data     \
        --with-fpm-group=www-data    \
        --with-config-file-path=/etc \
        --enable-fastcgi             \
        --enable-ftp        
    
  • 安装:

    make
    
    make test
    
    make install                               
    
  • 安装 php.ini:

    install -v -m644 php.ini-production /etc/php.ini && mv -v /etc/php-fpm.conf{.default,} 
    

你应该得到这样的输出:

  • php -v:

PHP 7.0.5-1~dotdeb+8.1 (cli) ( NTS ) 版权所有 (c) 1997-2016 PHP 集团 Zend Engine v3.0.0,版权所有 (c) 1998-2016 Zend Technologies 使用 Zend OPcache v7.0.6-dev,版权所有 (c) 1999-2016,由 Zend Technologies 提供

  • php-fpm -v:

PHP 7.0.5-1~dotdeb+8.1 (fpm-fcgi) 版权所有 (c) 1997-2016 PHP 集团 Zend Engine v3.0.0,版权所有 (c) 1998-2016 Zend Technologies 使用 Zend OPcache v7.0.6-dev,版权所有 (c) 1999-2016,由 Zend Technologies 提供

【讨论】:

    猜你喜欢
    • 2014-07-19
    • 1970-01-01
    • 2011-04-19
    • 1970-01-01
    • 2020-03-24
    • 1970-01-01
    • 1970-01-01
    • 2016-05-11
    • 1970-01-01
    相关资源
    最近更新 更多