首页 > 系统 > CentOS > 正文

centos 安装php7和swoole步骤

2024-06-28 16:00:13
字体:
来源:转载
供稿:网友

1. 安装必要软件

yum install libxml2-devel libmcrypt libmcrypt-devel libpng-devel openjpeg-devel libXpm-devel freetype-devel libjpeg-devel libcurl-devel gd

2. 下载php7.1

./configure --PRefix=/data/php7.1 --enable-opcache --enable-fpm --enable-mbstring --with-curl --with-mcrypt --enable-pcntl --with-pcre-regex --with-config-file-path=/data/php7.1/etc -with-pdo-MySQL --with-mysqli --enable-mysqlnd -with-gd --enable-soap --enable-sockets --enable-sysvsem --enable-sysvshm  --enable-mbregex --enable-exif --enable-bcmath --with-mhash --enable-zip --with-zlib

3. 安装php扩展

/data/php7.1/bin/pecl install redis

4. 下载并安装swoole扩展

./configure --with-php-config=/data/php7.1/bin/php-config  --enable-coroutine --enable-async-redis


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表