安装swoole

swoole 

swoole安装步骤

 

先安装如下依赖包

yum install wget

$ yum install -y gcc gcc-c++  make zlib zlib-devel pcre pcre-devel  libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel openssl openssl-devel openldap openldap-devel nss_ldap openldap-clients openldap-servers

 

yum install m4

yum install autoconf

 

1 下载php 7.2.2

wget https://www.php.net/distributions/php-7.2.22.tar.gz

2 进入目录 并且编译 安装

tar -zxvf php-7.2.22.tar.gz
cd php-7.2.22

./configure –prefix=/usr/local/php –with-config-file-path=/usr/local/php/etc/ –enable-mbstring –with-openssl

make && make install

3 复制php到local bin下
cp /usr/local/php/bin/php /usr/local/bin/php

4 复制phpini文件
查看php.ini目录 php — ini

cp /usr/local/src/php-7.2.22/php.ini-development /usr/local/php/etc/php.ini

5 安装swoole
cd /usr/local/src/
wget https://github.com/swoole/swoole-src/archive/v4.4.5.tar.gz
tar -zxvf v4.4.5.tar.gz
cd swoole-src-4.4.5/
/usr/local/php/bin/phpize
./configure –with-php-config=/usr/local/php/bin/php-config
make
make install

6 查看swoole是否安装成功
php -m|grep swoole

如果发现下载不了或者地址失效,请联系客服QQ: 2323178881
找资料 » 安装swoole

提供最优质的资源集合

立即查看 了解详情