redis download
https://codeload.github.com/redis/redis/zip/6.2-rc1
wget http://download.redis.io/releases/redis-6.2-rc1.tar.gz
version
redis-server --version redis-server -v
tar zxvf redis-6.2-rc1.tar.gz
cd redis-6.2-rc1
make && make install
1\先安裝Cygwin64環境 D:\cygwin64
在windows系統中把Redis源碼解壓放到
D:\cygwin64\home\redis-6.2-rc1
Cygwin模擬系統 進入 /home/redis-6.2-rc1 下,使用ls命令就會看到剛才放入的文件夾;
cd /home/redis-6.2-rc1
進入 redis-6.0.7 文件夾,可以進行一次git提交,這樣在編譯成功后可以清楚的看到增加了哪些文件,
% make
如果是TLS版本:
To build with TLS support, you'll need OpenSSL development libraries (e.g. libssl-dev on Debian/Ubuntu) and run:
$ make BUILD_TLS=yes
To build with systemd support, you'll need systemd development libraries (such as libsystemd-dev on Debian/Ubuntu or systemd-devel on CentOS) and run:
% make USE_SYSTEMD=yes
To append a suffix to Redis program names, use:
% make PROG_SUFFIX="-alt"
在windows系統中新建一個文件夾redis-v6 ,把 ./redis-6 /src下的.exe文件全部拷貝過來;
再到./cygwin64/bin下,找到cygwin1.dell拷貝到新建的文件夾中
再把項目根目錄的 redis.conf 文件,拷貝過來
查看幫助信息,進入redis目錄,命令:redis-server.exe -h
Redis-v6.0.7>redis-server.exe -h
Usage: ./redis-server [/path/to/redis.conf] [options]
./redis-server - (read config from stdin)
./redis-server -v or --version
./redis-server -h or --help
./redis-server --test-memory <megabytes>
啟動redis,命令:redis-server.exe 或 redis-server.exe redis.conf
常見報錯:
1、
cc: 錯誤:../deps/linenoise/linenoise.o:No such file or directory
解決辦法:進入/home/admin/redis-6.0.7/src/deps/linenoise/ 目錄,編譯
2、
cc: 錯誤:../deps/hiredis/libhiredis.a:No such file or directory
解決辦法:進入/home/admin/redis-6.0.7/src/deps/hiredis/ 目錄,編譯
3、
You need tcl 8.5 or newer in order to run the Redis test
解決辦法:
安裝或更新 GNU Cygwin 中的 tcl 版本大於 8.5即可
其實還有其它報錯,但是沒記下那么多,理解意思就行,大致的意思,一是編譯環境依賴版本的問題,二是需要預編譯包內自帶的所需的工具。
make distclean