>  기사  >  운영 및 유지보수  >  Ubuntu에 Swoole 확장을 기본적으로 설치하는 방법을 설명하는 기사

Ubuntu에 Swoole 확장을 기본적으로 설치하는 방법을 설명하는 기사

藏色散人
藏色散人앞으로
2021-10-29 14:57:492597검색

다음 튜토리얼 칼럼인 centos에서는 Swoole 확장 프로그램을 Ubuntu에 기본적으로 설치하는 방법을 소개합니다. 필요한 친구들에게 도움이 되길 바랍니다!

Ubuntu는 기본적으로 Swoole 확장을 설치합니다.

공식 컴파일 및 설치 튜토리얼을 클릭하세요(https://wiki.swoole.com/#/environment)

Swoole의 Github 버전 목록을 입력하고 최신 버전을 선택하세요. 압축된 패키지 다운로드

swoole 버전 목록 (https://github.com/swoole/swoole-src/releases)

$ wget https://github.com/swoole/swoole-src/archive/refs/tags/v4.8.0.zip

다운로드가 완료된 후 진행하세요

# 如果没有unzip 的话
$ apt-get unzip
#之后解压下载的压缩包
$ unzip v4.8.0.zip
# 进入目录
$ cd v4.8.0.zip
# 编译
$ phpize
# ubuntu 没有安装 phpize 可执行命令下面的这个来安装 phpize
$ sudo apt-get install php-dev 
# 编译配置检测
$ ./configure --enable-openssl --enable-http2 --enable-swoole-curl --enable-swoole-json
# 编译
$ make
# 安装
$ make install
#查看扩展
$ php --ri swoole

다음 코드가 올바르게 표시되면

Swoole => enabled
Author => Swoole Team <team@swoole.com>
Version => 4.8.0
Built => Oct 15 2021 09:34:32
coroutine => enabled with boost asm context
epoll => enabled
eventfd => enabled
signalfd => enabled
cpu_affinity => enabled
spinlock => enabled
rwlock => enabled
openssl => OpenSSL 1.1.1f  31 Mar 2020
dtls => enabled
http2 => enabled
json => enabled
curl-native => enabled
zlib => 1.2.11
mutex_timedlock => enabled
pthread_barrier => enabled
futex => enabled
async_redis => enabled
Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => Off => Off
swoole.unixsock_buffer_size => 8388608 => 8388608

권장 학습: "centos 튜토리얼"

위 내용은 Ubuntu에 Swoole 확장을 기본적으로 설치하는 방법을 설명하는 기사의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

성명:
이 기사는 learnku.com에서 복제됩니다. 침해가 있는 경우 admin@php.cn으로 문의하시기 바랍니다. 삭제