window10下通过docker安装swoole,运行laravel-swoole服务 (3)

deb focal-backports main restricted universe multiverse
deb-src focal-backports main restricted universe multiverse
' > /etc/apt/sources.list &&
apt-get update &&
apt-get -y install vim net-tools wget curl iputils-ping &&
apt-get -y install software-properties-common && add-apt-repository ppa:ondrej/php && apt-get update &&
apt-get -y install php7.2-dev php7.2-cli php7.2-xml php7.2-mysql php7.2-mbstring php7.2-curl php7.2-bcmath php7.2-zip &&
mkdir -p /tmp/php-extension &&
cd /tmp/php-extension &&
wget https://pecl.php.net/get/swoole-4.5.1.tgz &&
tar zxvf swoole-4.5.1.tgz &&
cd swoole-4.5.1 &&
phpize &&
./configure &&
make && make install &&
sed -i "924 i extension=swoole.so" /etc/php/7.2/cli/php.ini &&
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" &&
php composer-setup.php &&
php -r "unlink('composer-setup.php');" &&
mv composer.phar /usr/local/bin/composer &&
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/ &&
mkdir -p /data/www &&
cd /data/www &&
composer create-project --prefer-dist laravel/laravel ls-demo 5.8.* &&
cd ls-demo && composer require swooletw/laravel-swoole v2.6.67 &&
php artisan vendor:publish --tag=laravel-swoole &&
sed -i "177 i SwooleTW\\\\Http\\\LaravelServiceProvider::class," config/app.php &&
sed -i "44 a SWOOLE_HTTP_DAEMONIZE=true" .env &&
php artisan swoole:http start &&
curl 127.0.0.1:1215 &&
ps aux|grep swoole

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wpjywd.html