How to install swoole extension in kanglephp under centos

藏色散人
Release: 2021-03-30 19:31:55
forward
2578 people have browsed it

The following tutorial column from centos will introduce to you how to install the swoole extension in kanglephp under centos. I hope it will be helpful to friends in need!

How to install the swoole extension in kanglephp under centos

First, test the environment centos6 64-bit and centos7, easypanel2.6.26, kangle3.5.14 php7.3.0

If it is centos7, please ignore the gcc installation. First upgrade the gcc library to 4.8.

curl -Lks http://yum.osyum.com/linux/gcc/hop5.repo > /etc/yum.repos.d/hop5.repoyum install gcc gcc-g++ -y
Copy after login

You can ignore the next installation of nghttp

wget http://yum.osyum.com/linux/nghttp/nghttp2-1.35.0.tar.gztar -zxvf nghttp2-1.35.0.tar.gzcd nghttp2-1.35.0./configuremakemake install
Copy after login

Next we download the swoole extension, https:/ /github.com/swoole/swoole-src, we use php7.3 to install the swoole extension. The installation of other versions is the same. Note that the PHP directory must be correct.

wget --no-check-certificate https://codeload.github.com/swoole/swoole-src/zip/master -O swoole-src-master.zipunzip swoole-src-master.zipcd swoole-src-master/vhs/kangle/ext/php73/bin/phpize./configure --with-php-config=/vhs/kangle/ext/php73/bin/php-configmakemake install
Copy after login

![[centos]kanglephp under centos install swoole extension](https://waterbear.pw/ueditor/... "[centos]kanglephp under centos install swoole extension")

The appearance of this proves that half of the success is achieved, then let php support swoole, and then we will make the extension of php73 to support swoole

mv /root/php-7.3.0/php.ini-development  /vhs/kangle/ext/php73/etc/php.d/php.ini
Copy after login

Edit vi /vhs/kangle/ext/php73/etc/php.d/php. ini
Add

extension = "/vhs/kangle/ext/php73/lib/php/extensions/no-debug-non-zts-20180731/swoole.so"
Copy after login

at the end to save and exit. If you compile other modules, you can also add
to check whether the swoole module is supported

/vhs/kangle/ext/php73/bin/php -m
Copy after login

The presence of swoole in the list proves complete success

![[centos]Install the swoole extension with kanglephp under centos](https://waterbear.pw/ueditor/... "[centos]Install the swoole extension with kanglephp under centos ")

Note that after restarting, kangle's php7.3 may use /vhs/kangle/ext/php73/etc/php.d/php.ini as the new php.ini, so you still need to Make security processing in php.ini

Add after disable_functions=

eval,passthru,exec,system,chroot,scandir,chgrp,chown,shell_exec,proc_open,proc_get_status,ini_alter,ini_restore,dl,pfsockopen,openlog,syslog,readlink,symlink,popepassthru,stream_socket_server,disk_total_space,disk_free_space,error_log,putenv,popen,ini_set,chmod,assert,pcntl_exec,phpfunc;
Copy after login

Save and exit.

The above is the detailed content of How to install swoole extension in kanglephp under centos. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template