windows和Linux上安裝php7 alpha 並安裝 yaf

來源:互聯網
上載者:User
WINDOWS和Linux上安裝php7 alpha 並安裝 yaf

windows

1.windows上安裝 php7 alpha 只需要從官網上 http://windows.php.net/qa/ 下載然後直接配置就可以,如果你不會你可以下載 PHP Manager,直接配置就可以了。這個時候需要測試,開啟命令列視窗,然後到你的 php7 目錄下,php -m 如果彈出如下的視窗

這時候因為你缺少 Visual C++ Redistributable Package for Visual Studio 2015 你可以點擊這裡下載 http://www.microsoft.com/zh-CN/download/details.aspx?id=46881,安裝後就可以了。

linux

Linux 和以前一樣安裝,但是你會發現 php7 alpha 並不和以前 dev 一樣,少了 --with-mysql 的選項,也就是不載入這個擴充了,以後就用 mysqli 和 Pdo 吧

從官方下載安裝包 https://downloads.php.net/~ab/

wget https://downloads.php.net/~ab/php-7.0.0alpha1.tar.gz#解壓tar zxf php-7.0.0alpha1.tar.gz#進入目錄cd  php-7.0.0alpha1#configure--prefix=/usr/local/php7 \--with-config-file-path=/usr/local/php7/etc \--enable-fpm \--with-fpm-user=www \--with-fpm-group=www \--with-mysqli=/usr/local/mysql/bin/mysql_config \--with-pdo-mysql=/usr/local/mysql/ \--with-iconv-dir \--with-freetype-dir \--with-jpeg-dir \--with-png-dir \--with-zlib \--with-libxml-dir \--disable-rpath \--enable-bcmath \--enable-shmop \--enable-sysvsem \--enable-inline-optimization \--with-curl \--enable-mbregex \--enable-mbstring \--with-mcrypt \--enable-ftp \--with-gd \--enable-gd-native-ttf \--with-openssl \--with-mhash \--enable-pcntl \--enable-sockets \--with-xmlrpc \--enable-zip--enable-soap \--without-pear \--with-gettext \--disable-fileinfo \--enable-maintainer-zts#編譯安裝make ZEND_EXTRA_LIBS='-liconv' && make install#配置cp sapi/fpm/init.d.php-fpm /etc/rc.d/init.d/php7-fpmcp php.ini-production      /usr/local/php7/etc/php.ini#然後在自己配置下php-fpm.conf

安裝YAF

#下載git clone https://github.com/laruence/php-yaf.gitcd php-yaf#查看所有分支,這時候你就看到了php7的分支git branch -agit checkout -b php7 origin/php7#開始編譯安裝/usr/local/php7/bin/phpize./configure --with-php-config=/usr/local/php7/bin/php-configmake && make install#配置vim /usr/local/php7/etc/php.ini #加入如下這行extension = 安裝完成顯示的目錄位址/yaf.so

OK,就介紹到這裡了。

原文轉自我的部落格:http://www.widuu.com/archives/06/1209.html

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.