[root@localhost swoole-src-4.0.4]# wget https://github.com/curl/curl/archive/curl-7_61_0.tar.gz --2018-08-29 19:26:56-- https://github.com/curl/curl/archive/curl-7_61_0.tar.gz [root@localhost swoole-src-4.0.4]# tar -zxvf curl-7_61_0.tar.gz [root@localhost swoole-src-4.0.4]# cd curl-curl-7_61_0/ [root@localhost curl-curl-7_61_0]#
开始 ./buildconf./configuremake && make install 【注意】./buildconf 是为了确认编译环境是否有缺失,如果差某些包,yum安装一下即可。 比如:
1 2 3 4 5 6 7 8
[root@localhost curl-curl-7_61_0]# ./buildconf buildconf: autoconf version 2.69 (ok) buildconf: autom4te version 2.69 (ok) buildconf: autoheader version 2.69 (ok) buildconf: automake version 1.13.4 (ok) buildconf: aclocal version 1.13.4 (ok) buildconf: libtoolize not found. You need GNU libtoolize 1.4.2 or newer installed.
[root@localhost swoole-src-4.0.4]# phpize --with-php-config /usr/bin/php-config Configuring for: PHP Api Version: 20160303 Zend Module Api No: 20160303 Zend Extension Api No: 320160303
执行安装
./configuremake && make install 执行编译安装过程
1 2 3 4 5 6 7 8
[root@localhost swoole-src-4.0.4]# ./configure checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for a sed that does not truncate output... /usr/bin/sed checking for cc... cc checking whether the C compiler works... yes checking for C compiler default output file name... a.out [root@localhost swoole-src-4.0.4]# make && make install
If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the `-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the `LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the `LD_RUN_PATH' environment variable during linking - use the `-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ----------------------------------------------------------------------
; If you wish to have an extension loaded automatically, use the following ; syntax: ; ; extension=modulename.extension ; ; For example, on Windows: ; ; extension=msql.dll ; ; ... or under UNIX: ; ; ; ... or with a path: ; ; extension=/path/to/extension/msql.so ; ; If you only provide the name of the extension, PHP will look for it in its ; default extension directory. extension=swoole.so
为了方便使用,编辑 /etc/redis-config 修改 daemonize no 为 daemonize yes 以守护进程的方式启动
1 2 3 4 5
################################# GENERAL #####################################
# By default Redis does not run as a daemon. Use 'yes' if you need it. # Note that Redis will write a pid file in /var/run/redis.pid when daemonized. daemonize yes
启动 redis-server 并连接测试
1 2 3 4 5 6 7 8
[root@localhost ~]# redis-server /etc/redis.conf [root@localhost ~]# redis-cli 127.0.0.1:6379> set name hello OK 127.0.0.1:6379> get name "hello" 127.0.0.1:6379> exit [root@localhost ~]#
- illuminate/support v5.4.17 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system. - illuminate/support v5.4.13 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system. - illuminate/support v5.4.0 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system. - Installation request for hanson/vbot ^2.0 -> satisfiable by hanson/vbot[2.0.1, 2.0.10, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9, v2.0].
To enable extensions, verify that they are enabled in your .ini files: - /etc/php.ini - /etc/php.d/bz2.ini - /etc/php.d/calendar.ini - /etc/php.d/ctype.ini - /etc/php.d/curl.ini - /etc/php.d/exif.ini - /etc/php.d/fileinfo.ini - /etc/php.d/ftp.ini - /etc/php.d/gettext.ini - /etc/php.d/gmp.ini - /etc/php.d/iconv.ini - /etc/php.d/json.ini - /etc/php.d/phar.ini - /etc/php.d/shmop.ini - /etc/php.d/simplexml.ini - /etc/php.d/sockets.ini - /etc/php.d/tokenizer.ini - /etc/php.d/xml.ini - /etc/php.d/zip.ini You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content.