亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

swoole安裝的方法

發布時間:2022-02-07 09:25:50 來源:億速云 閱讀:380 作者:iii 欄目:編程語言

這篇文章主要介紹了swoole安裝的方法的相關知識,內容詳細易懂,操作簡單快捷,具有一定借鑒價值,相信大家閱讀完這篇swoole安裝的方法文章都會有所收獲,下面我們一起來看看吧。

Ond?ej Sury 的 PHP PPA 為 Ubuntu 16.04/14.04 提供了 PHP7.2 版本,軟件源安裝的 PHP 默認以 Unix Socket 的狀態運行在 /run/php/php7.2-fpm.sock,比使用 TCP 以 localhost:9000 的方式性能更好。

1、安裝軟件源拓展工具:

apt -y install software-properties-common apt-transport-https lsb-release ca-certificates

2、添加PHP PPA 源 并更新緩存

add-apt-repository ppa:ondrej/php  & apt update

3、安裝php7.2及基礎相關拓展

apt install php7.2-fpm php7.2-mysql php7.2-curl php7.2-gd php7.2-mbstring php7.2-xml php7.2-xmlrpc php7.2-zip php7.2-opcache php7.2-dev -y

4、查看當前PPA源有哪些可供直接安裝的源

apt-cache search php7.2
php-radis - radis client library for PHP
php-http - PECL HTTP module for PHP Extended HTTP Support
php-uploadprogress - file upload progress tracking extension for PHP
php-yaml - YAML-1.1 parser and emitter for PHP
php-mongodb - MongoDB driver for PHP
php-apcu - APC User Cache for PHP
php-imagick - Provides a wrapper to the ImageMagick library
php-ssh3 - Bindings for the libssh3 library
php-redis - PHP extension for interfacing with Redis
php-memcached - memcached extension module for PHP, uses libmemcached
php-apcu-bc - APCu Backwards Compatibility Module
php-rrd - PHP bindings to rrd tool system
php-uuid - PHP UUID extension
php-memcache - memcache extension module for PHP
php-zmq - ZeroMQ messaging bindings for PHP
php-igbinary - igbinary PHP serializer
php-msgpack - PHP extension for interfacing with MessagePack
php-geoip - GeoIP module for PHP
php-tideways - Tideways PHP Profiler Extension
php-yac - YAC (Yet Another Cache) for PHP
php-mailparse - Email message manipulation for PHP
php-oauth - OAuth 1.0 consumer and provider extension
php-gnupg - PHP wrapper around the gpgme library
php-propro - propro module for PHP
php-raphf - raphf module for PHP
php-solr - PHP extension for communicating with Apache Solr server
php-stomp - Streaming Text Oriented Messaging Protocol (STOMP) client module for PHP
php-gearman - PHP wrapper to libgearman
php-phalcon - full-stack PHP framework delivered as a C-extension
php-ds - PHP extension providing efficient data structures for PHP 7
php-sass - PHP bindings to libsass - fast, native Sass parsing in PHP
php-lua - PHP Embedded lua interpreter
libapache2-mod-php7.2 - server-side, HTML-embedded scripting language (Apache 2 module)
libphp7.2-embed - HTML-embedded scripting language (Embedded SAPI library)
php7.2-bcmath - Bcmath module for PHP
php7.2-bz2 - bzip2 module for PHP
php7.2-cgi - server-side, HTML-embedded scripting language (CGI binary)
php7.2-cli - command-line interpreter for the PHP scripting language
php7.2-common - documentation, examples and common module for PHP
php7.2-curl - CURL module for PHP
php7.2-dba - DBA module for PHP
php7.2-dev - Files for PHP7.2 module development
php7.2-enchant - Enchant module for PHP
php7.2-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary)
php7.2-gd - GD module for PHP
php7.2-gmp - GMP module for PHP
php7.2-imap - IMAP module for PHP
php7.2-interbase - Interbase module for PHP
php7.2-intl - Internationalisation module for PHP
php7.2-json - JSON module for PHP
php7.2-ldap - LDAP module for PHP
php7.2-mbstring - MBSTRING module for PHP
php7.2-mysql - MySQL module for PHP
php7.2-odbc - ODBC module for PHP
php7.2-opcache - Zend OpCache module for PHP
php7.2-pgsql - PostgreSQL module for PHP
php7.2-phpdbg - server-side, HTML-embedded scripting language (PHPDBG binary)
php7.2-pspell - pspell module for PHP
php7.2-readline - readline module for PHP
php7.2-recode - recode module for PHP
php7.2-snmp - SNMP module for PHP
php7.2-soap - SOAP module for PHP
php7.2-sqlite3 - SQLite3 module for PHP
php7.2-sybase - Sybase module for PHP
php7.2-tidy - tidy module for PHP
php7.2-xml - DOM, SimpleXML, WDDX, XML, and XSL module for PHP
php7.2-xmlrpc - XMLRPC-EPI module for PHP
php7.2-zip - Zip module for PHP
php7.2-xsl - XSL module for PHP (dummy)
php7.2 - server-side, HTML-embedded scripting language (metapackage)
php7.2-sodium - libsodium module for PHP

5、選擇安裝 redis igbinary pear擴展

php7后每個擴展都是一個獨立的ini文件
本次安裝的php擴展都在/etc/php/7.2/mods-available下
apt install php-redis php-igbinary php-pear
ls /etc/php/7.2/mods-available
calendar.ini  fileinfo.ini  igbinary.ini  opcache.ini    readline.ini          
 sysvmsg.ini    xml.ini        zip.ini   ctype.ini     ftp.ini      
 json.ini      pdo.ini        redis.ini      
 sysvsem.ini    xmlreader.ini
 curl.ini      gd.ini        mbstring.ini  pdo_mysql.ini  shmop.ini      
 sysvshm.ini    xmlrpc.ini
 dom.ini       gettext.ini   mysqli.ini    phar.ini       simplexml.ini  
 tokenizer.ini  xmlwriter.ini
 exif.ini      iconv.ini     mysqlnd.ini   posix.ini      sockets.ini    
 wddx.ini       xsl.ini

6、安裝nghttp2庫

apt install nghttp2 libnghttp2-dev

7、安裝redis官方異步拓展hiredis,如報錯需要增加系統gcc支持

git clone https://github.com/redis/hire...
 cd hiredis
make -j
 如果報錯 嘗試安裝gcc
 apt install gcc
 重新編譯
 make -j
 make install
 ldconfig

8、swoole拓展編譯安裝,不推薦使用pecl install swoole

pecl的安裝方式沒有編譯http2與hiredis支持
gcc-4.4 或更高版本
make
autoconf
pcre (centos系統可以執行命令:yum install pcre-devel)
git clone https://gitee.com/swoole/swoo...
 cd swoole
 phpize
 ./configure  --enable-http2 --enable-async-redis
 make && make install

9、添加swoole擴展到php環境中

echo 'extension=swoole.so' >> /etc/php/7.2/mods-available/swoole.ini
cd /etc/php/7.2/cli/conf.d/ && ln -s ../../mods-available/swoole.ini 20-swoole.ini
cd /etc/php/7.2/fpm/conf.d/ && ln -s ../../mods-available/swoole.ini 20-swoole.ini

10、查看是否引用成功

php --ri swoole
swoole support => enabled
Version => 2.1.2-alpha
Author => tianfeng.han[email: mikan.tenny@gmail.com]
coroutine => enabled
epoll => enabled
eventfd => enabled
timerfd => enabled
signalfd => enabled
cpu affinity => enabled
spinlock => enabled
rwlock => enabled
async redis client => enabled
async http/websocket client => enabled
openssl => enabled
http2 => enabled
Linux Native AIO => enabled
pcre => enabled
mutex_timedlock => enabled
pthread_barrier => enabled
futex => enabled

Directive => Local Value => Master Value
swoole.aio_thread_num => 2 => 2
swoole.display_errors => On => On
swoole.use_namespace => On => On
swoole.use_shortname => On => On
swoole.fast_serialize => Off => Off
swoole.unixsock_buffer_size => 8388608 => 8388608

至此完整全部完成

關于“swoole安裝的方法”這篇文章的內容就介紹到這里,感謝各位的閱讀!相信大家對“swoole安裝的方法”知識都有一定的了解,大家如果還想學習更多知識,歡迎關注億速云行業資訊頻道。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

武宣县| 铅山县| 高州市| 大田县| 平邑县| 石台县| 商洛市| 平原县| 香港| 汉中市| 平昌县| 新干县| 兴业县| 南皮县| 辽源市| 灵山县| 斗六市| 定兴县| 孝义市| 嘉荫县| 集安市| 通榆县| 平度市| 九江市| 舒兰市| 琼中| 泽普县| 垫江县| 常宁市| 宜城市| 泗水县| 柏乡县| 阿瓦提县| 龙川县| 江西省| 腾冲县| 新乡市| 尼玛县| 赣州市| 礼泉县| 兴安盟|