cygwin + swoole 安装
cygwin: http://www.cygwin.com/ 下载:https://cygwin.com/setup-x86_64.exe 网易开源镜像站: https://mirrors.163.com/cygwin/
select packages 选择安装包
[gcc] Devel 6.4.0-3 Bin 17,831k gcc-core: GNU Compiler Collection (C, OpenMP)
[make] 4.3-1
[autoconf] Devel 13-1 Bin 4k autoconf: Wrapper scripts for autoconf commands
[zlib] 1.2.11
[php <SRC>] Interpreters 7.3.7-2 Bin 1465k php: PHP Hypertext Proprocessor 7.1.9-1 Bin 621k php-devel: PHP Hypertext Proprocessor
[php-devel] 7.3.7-2
[pcre-devel] Libs 8.40-3 Bin 28k libpcre-devel: Perl Compatible Regular Expressions library development
[php-json] php 7.3.7-2 Bin 16k php-json: PHP json extenstion
[php-pdo] php 7.3.7-2 Bin 10k php-pdo_mysql: PHP pdo_mysql extenstion
[php-curl] php 7.3.7-2 Bin 25k php-curl: PHP pdo_mysql extenstion
[php-xmlwriter] php 7.3.7-2 Bin 10k php-xmlwrite: PHP xmlwrite extenstion
[php-gd]
[php-gettext]
[php-iconv]
[php-mbstring]
[php-zip]
[php-zlib]
[php-phar]
[imageMagick <SRC>] 7.0.10.27 安装SRC, PHP编码so需要
[Jpeg] 2.1.2
[libpng 16] 1.6.37
[freetype6] 2.11.0
[httpd] Web 2.4.25-3 Bin 908k httpd: Apache HTTP Server
安装apt-cyg
apt-cyg是Cygwin环境下的软件安装工具,相当于Ubuntu下的apt-get命令
[wget] Web 1.19.1-2 Bin 799k wget: Utility to retrieve files from the WWW via HTTP and FTP
[tar] Base 1.29-1 Bin 850k tar: A GNU file archiving program PHP 1.4.2-1 Bin 18k php-Archive_Tar: PHP class for creating and managing tarballs
[gawk] Interpreters 4.2.0-1 Bin 1,100k gawk: GUN awk, a pattern scanning and processing language
[bzip2] Archive 1.0.6-3 Bin 35k bzip2: BZip file de/compressor 1.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.ini
php扩展查看 php -m
启用异步信号处理
pcntl.async_signals = 1 //
配置apache
用于静态文件服务(swoole是进程方式的,还是apache或nignx做这个好)
/etc/httpd/conf/httpd.conf Listen 90
ServerName files.qgsmvc.com:90
$ /usr/sbin/apachectl start //启动
$ /usr/sbin/apachectl stop //停止
$ /usr/sbin/apachectl restart //重启
Swoole
下载 swoole-src 解压:swoole-v4.8.6.zip
$cd /home/soft/swoole-v4.8.6
$phpize //生成编译的配置文件configure
$./configure && make && make install //编译安装
php.ini 添加扩展 extension=swoole.so
或者
pecl install swoole
pecl install -D 'enable-sockets="no" enable-openssl="yes" enable-http2="yes" enable-mysqlnd="yes" enable-swoole-json="no" enable-swoole-curl="yes" enable-cares="yes"' swoole
cygwin 卸载
找到安装文件双击,此时我们需要选择 install from Local Directory
就是安装时我们选择的存放安装文件的路径,因为选择的是 163 的安装源因此会在路径里创建一个163的目录,类似于:D:\Downloads\http%3a%2f%2fmirrors.163.com%2fcygwin%2f
接下来将 View 切换到 Category
,把 New 那一列的值修改为 Uninstall