cygwin + swoole 安装

来源:互联网 发布:高校金融教学软件 编辑:程序博客网 时间:2024/06/06 01:56

cygwin + swoole 安装

cygwin: http://www.cygwin.com/下载:https://cygwin.com/setup-x86_64.exe网易开源镜像站: http://mirrors.163.com

select packages 选择安装包

[gcc]Devel6.4.0-3 Bin 17,831k gcc-core: GNU Compiler Collection (C, OpenMP)[php]Interpreters7.1.9-1 Bin 1465k php: PHP Hypertext Proprocessor7.1.9-1 Bin 621k php-devel: PHP Hypertext Proprocessor[pcre-deve]Libs8.40-3 Bin 28k libpcre-devel: Perl Compatible Regular Expressions library development[autoconf]Devel13-1 Bin 4k autoconf: Wrapper scripts for autoconf commands[php-json]php7.1.9-1 Bin 16k php-json: PHP json extenstion[php-pdo]php7.1.9-1 Bin 10k php-pdo_mysql: PHP pdo_mysql extenstion[php-curl]php7.1.9-1 Bin 25k php-curl: PHP pdo_mysql extenstion[httpd]Web2.4.25-3 Bin 908k httpd: Apache HTTP Server

安装apt-cyg

apt-cyg是Cygwin环境下的软件安装工具,相当于Ubuntu下的apt-get命令[wget]Web1.19.1-2 Bin 799k wget: Utility to retrieve files from the WWW via HTTP and FTP[tar]Base1.29-1 Bin 850k tar: A GNU file archiving programPHP1.4.2-1 Bin 18k php-Archive_Tar: PHP class for creating and managing tarballs[gawk]Interpreters4.2.0-1 Bin 1,100k gawk: GUN awk, a pattern scanning and processing language[bzip2]Archive1.0.6-3 Bin 35k bzip2: BZip file de/compressor1.1.13-1 Bin 37k pbzip2: Parallel BZIP2 de/compressor接下来进入 cgywin 下载apt-cyg# wget https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg -P /bin//并使其成为可执行文件chmod.exe +x /bin/apt-cyg//测试例子# apt-cyg install 项目名php配置文件php -i | grep php.iniphp扩展查看php -m

配置apache

用于静态文件服务(swoole是进程方式的,还是apache或nignx做这个好)/etc/httpd/conf/httpd.confListen 9055ServerName 192.168.1.33:9055//启动$ /usr/sbin/apachectl start//停止 $ /usr/sbin/apachectl stop//重启 $ /usr/sbin/apachectl restart

Swoole

解压:swoole-src-2.0.9#cd /home/swoole//生成编译的配置文件configure#phpize//编译安装# ./configure && make && make installphp.ini 添加扩展 extension=swoole.so