wget https://github.com/nghttp2/nghttp2/releases/download/v1.30.0/nghttp2-1.30.0.tar.bz2 tar -jxvf nghttp2-1.30.0.tar.bz2 cd nghttp2-1.30.0 ./configure make wget https://github.com/redis/hiredis/archive/v0.13.3.tar.gz tar -zxvf v0.13.3.tar.gz cd hiredis-0.13.3/ make -j sudo make install sudo ldconfig
mkdir -p ~/build && \ cd ~/build && \ rm -rf ./swoole-src && \ curl -o ./tmp/swoole.tar.gz https://github.com/swoole/swoole-src/archive/master.tar.gz -L && \ tar zxvf ./tmp/swoole.tar.gz && \ mv swoole-src* swoole-src && \ cd swoole-src && \ phpize && \ ./configure \ --enable-coroutine \ --enable-openssl \ --enable-http2 \ --enable-async-redis \ --enable-sockets \ --enable-mysqlnd && \ make clean && make && sudo make install
若是ubuntu修改文件的時候一直提示:php
sudo:unable to resolve host abc
那麼就須要修改/etc/hosts文件:
若是以前爲mysql
127.0.0.1 localhost
變動爲:git
127.0.0.1 localhost 127.0.1.1 hostname