windows 子系統 Ubuntu18.04 安裝 swoole

來源:互聯網
上載者:User

標籤:data-   pre   packagist   ubunt   repo   load   perl   code   upgrade   

首先安裝composer並改為國內鏡像

1.sudo apt-get install composer

composer config -g repo.packagist composer https://packagist.phpcomposer.com

安裝環境

1. sudo apt-get install nginx-light

2. sudo apt-get install php7.0 php7.0-curl php7.0-gd php7.0-gmp php7.0-json php7.0-mysql php7.0-opcache php7.0-readline 

3.sudo apt install php-pear

4.sudo pecl install swoole

5.echo ‘extension=swoole.so‘ >> /etc/php/7.0/mods-available/swoole.ini

cd /etc/php/7.0/cli/conf.d/ && ln -s ../../mods-available/swoole.ini 20-swoole.inicd /etc/php/7.0/fpm/conf.d/ && ln -s ../../mods-available/swoole.ini 20-swoole.ini

sudo composer create-project easyswoole/app easyswoole

php easyswoole start
  • BashOnWindows 環境下必須關閉 daemonize 選項
  • 需要修改 config.h 關閉 HAVE_SIGNALFD
 

一些問題:

  如果出現 sh: phpize: command not found

  可以嘗試 sudo apt-get install php-dev

  如果出現

  No releases available for package "pecl.php.net/swoole"
  install failed

  嘗試:pear clear-cache  pear update-channels  pear upgrade

如果:Failed to download nikic/fast-route from dist: The zip extension and unzip command are both missing, skipping.
sudo apt-get install php-zip

windows 子系統 Ubuntu18.04 安裝 swoole

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.