I want to install the swoole extension in my system. The official website provides the pecl method for installation. However, after entering peclinstallswoole, the system says that the command was not found, then I haven't found out how to install pecl in linux after Baidu for a long time. What is this? how can I install it? I want to install the swoole extension in my system. The official website provides the pecl method for installation. However, after entering pecl install swoole, the system says that the command was not found, then I haven't found out how to install pecl in linux after Baidu for a long time. What is this? how can I install it?
Reply content:
I want to install the swoole extension in my system. The official website provides the pecl method for installation. However, after entering pecl install swoole, the system says that the command was not found, then I haven't found out how to install pecl in linux after Baidu for a long time. What is this? how can I install it?
PECL: PHP Extension Community Library
Official website: pecl.php.net
Generally, php is installed in the bin directory, such as/usr/local/php/bin.
So if you want to use it directly, either add the bin directory to the environment variable PATH, or soft chain it to the/usr/bin directory.
Yum install php-devel
# Ubuntu/Debian is like this (php-pear contains pecl, php5-dev contains phpize, pecl depends on phpize) apt-get install php-pear php5-devpecl install swoole # CentOS/Redhat should be like this yum install php-pear php-develpecl install swoole # if it is self-compiled PHP (assuming the installation directory is /opt/php/7.0) /opt/php/7.0/bin/phpize/opt/php/7.0/bin/pecl
PHP compilation and installation tutorial on Linux