Cygwin - The Right Way To Use On Windows 10

Cygwin Mirror For China

Cygwin Dependencies(Most Found In Devel, Recommended Mingw64-X86_64, Some Of them Are Optional After Installation Of apt-cyg):

  • libpcre-devel
  • libpq-devel
  • libxml2-devel
  • python3-devel
  • autoconf
  • web->lynx
  • automake
  • gcc-core
  • binutil
  • gcc-g++
  • lynx
  • make
  • pcre
  • tmux
  • wget
  • ssh
  • vim
  • gd
  • sl

Install apt-cyg (Just Like Ubuntu apt-get)

$ lynx -source https://raw.githubusercontent.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
$ install apt-cyg /bin

Testing apt-cyg

$ apt-cyg update
$ apt-cyg install sl tmux wget gcc-core libpq-devel python3-devel libxml2-devel python3-pip

Build libevent

$ cd /tmp
$ wget https://nchc.dl.sourceforge.net/project/levent/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
$ tar xf libevent-2.0.22-stable.tar.gz
$ cd libevent-2.0.22-stable
$ ./configure --prefix=/usr/local
$ make all
$ make install

Build memcached

$ cd /tmp
$ wget http://www.memcached.org/files/memcached-1.4.36.tar.gz
$ tar xf memcached-1.4.36.tar.gz
$ cd memcached-1.4.36/
$ chmod 777 configure
$ ./configure

After Executing Configure Is Done, Modify Makefile File And Delete -Werror At Row 345

CFLAGS = -g -O2 -pthread -pthread -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls

Continue

$ make
$ make install
$ memcached -vv

Check LDD

$ ldd /usr/local/bin/memcached
ntdll.dll => /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffa86e30000)
KERNEL32.DLL => /cygdrive/c/WINDOWS/System32/KERNEL32.DLL (0x7ffa86d40000)
KERNELBASE.dll => /cygdrive/c/WINDOWS/System32/KERNELBASE.dll (0x7ffa83e20000)
cygevent-2-0-5.dll => /usr/local/bin/cygevent-2-0-5.dll (0x5c29c0000)
cygwin1.dll => /usr/bin/cygwin1.dll (0x180040000)

Start Up Memcached

PS .\memcached.exe –d install
PS .\memcached.exe –d start

Build Redis

$ cd /tmp
$ wget http://download.redis.io/releases/redis-stable.tar.gz
$ tar xzf redis-stable.tar.gz
$ cd redis-stable
$ make && make install

Start Up redis

PS .\redis-server.exe

Testing redis

PS .\redis-cli.exe -h localhost
localhost:6379> set say 'Hello World!'
localhost:6379> get say
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容