安裝 swoole
- root 使用者
$ pecl install swoole
- 報錯
No releases available for package "pecl.php.net/swoole"
- 更新 pecl
$ pecl channel-update pecl.php.net
- 檢視openssl
$ php -r "print_r(openssl_get_cert_locations());" [default_cert_file] => /usr/lib/ssl/cert.pem [default_cert_file_env] => SSL_CERT_FILE [default_cert_dir] => /usr/lib/ssl/certs [default_cert_dir_env] => SSL_CERT_DIR [default_private_dir] => /usr/lib/ssl/private [default_default_cert_area] => /usr/lib/ssl [ini_cafile] => [ini_capath] =>
- 安裝證照
$ wget -c https://curl.haxx.se/ca/cacert.pem /usr/local/openssl/cert.pem --no-check-certificate
- swoole 安裝成功
Build process completed successfully Installing '/usr/include/php/20180731/ext/swoole/config.h' Installing '/usr/lib/php/20180731/swoole.so' install ok: channel://pecl.php.net/swoole-4.4.13 configuration option "php_ini" is not set to php.ini location You should add "extension=swoole.so" to php.ini
- 開啟swoole擴充套件
$ echo 'extension=swoole.so' >> /etc/php/7.3/mods-available/swoole.ini $ ln -s /etc/php/7.3/mods-available/swoole.ini /etc/php/7.3/cli/conf.d/20-swoole.ini
- 檢視是否成功開啟:
$ php -m | grep swoole swoole
laravelS 待續