Swool5 安装

安装完php后,安装几个扩展sysvmsg,igbinary(安装redis会自动安装),mbstring

删除禁用函数:proc_open readlink symlink

wget https://pecl.php.net/get/swoole-5.1.4.tgz
tar -zvxf v5.1.4.tar.gz
cd swoole-src-5.1.4/
/www/server/php/83/bin/phpize
./configure --with-php-config=/www/server/php/83/bin/php-config --enable-openssl --enable-http2
sudo make && make install  

提示No package ‘libbrotlienc’ found错误后,执行:

sudo yum install brotli-devel
#重新编译
./configure --with-php-config=/www/server/php/83/bin/php-config --enable-openssl --enable-http2
#make
sudo make && make install 


安装composer

安装完php后执行composer self-update升级到最新版本即可,如果没有安装则镜像安装

# 推荐使用composer官方镜像(如果使用此镜像还是不行请自行更换其他源下载)
composer config -g repo.packagist composer https://repo.packagist.org

# 使用腾讯云 Composer 镜像
composer config -g repo.packagist composer https://mirrors.tencent.com/composer/

# 使用阿里云 Composer 镜像
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/

安装扩展
cd /home

composer create-project easy-swoole-php/easyswoole-skeleton="3.7.1" project_name
php easyswoole.php server start

安装MongoDb

添加sdk后执行composer update更新