Redis中的README翻译!

回复 收藏
Where to find complete Redis documentation?
哪里可以找到完整的Redis文档?
-------------------------------------------
This README is just a fast "quick start" document. You can find more detailed
documentation at http://redis.io
本README仅仅是一个快速的"入门"的文档。你可以在http://redis.io官网上找到更详细的文档
--------------
Building Redis
编译Redis
----------------------------------------------------------------------
Redis can be compiled and used on Linux, OSX, OpenBSD, NetBSD, FreeBSD.
We support big endian and little endian architectures.
Redis可以被编译并在Linux,OSX,OpenBSD系统,NetBSD的,FreeBSD上,并可以使用。
我们支持big endian和little endian架构。
-----------------------------------------------------------------------
It may compile on Solaris derived systems (for instance SmartOS) but our
support for this platform is "best effort" and Redis is not guaranteed to
work as well as in Linux, OSX, and *BSD there.
它可能编译在Solaris系统导出(例如SmartOS),但我们
这个平台的支持是“尽力而为”和Redis的是不能保证
工作,以及在Linux中,OSX,以及* BSD那里。
-------------------------------------------------------------------------
It is as simple as:
它就是这么简单:
    % make
-----------------------------------------
You can run a 32 bit Redis binary using:
您可以使用运行32位二进制的Redis:
    % make 32bit
-----------------------------------------
After building Redis is a good idea to test it, using:
在编译完Redis之后,去检测一下,是个好主意,使用:
    % make test
-------------------------------------------------------------------------
Fixing build problems with dependencies or cached build options
固定的依赖关系或缓存构建问题(这句不懂)
—------------------------------------------------------------------------
Redis has some dependencies which are included into the "deps" directory.
"make" does not rebuild dependencies automatically, even if something in the
source code of dependencies is changes.
Redis有一定的依赖关系,包括在"deps"目录。
"make"不会自动重建依赖关系,即使在
源代码的依赖关系是变化了的。
--------------------------------------------------------------------------
When you update the source code with `git pull` or when code inside the
dependencies tree is modified in any other way, make sure to use the following
command in order to really clean everything and rebuild from scratch:
当你用"git pull"升级源代码时,或者代码里面
依赖树被修改以任何方式,确保使用下面的
命令为了真真正正的清扫一切(到底清扫什么啊?),重头开始重建
    make distclean
-------------------------------------------------------------------------------
This will clean: jemalloc, lua, hiredis, linenoise.
这将清理:jemalloc,lua,hiredis,linenoise。
------------------------------------------------------------------------------
Also if you force certain build options like 32bit target, no C compiler
optimizations (for debugging purposes), and other similar build time options,
those options are cached indefinitely until you issue a "make distclean"
command.
此外,如果你喜欢强制目标用32位编译,没有C编译器的某些编译选项
优化(用于调试),以及其他类似的构建时间选项,
这些选项将被无限期地缓存,直到你发出"make distclean命令"
命令。
---------------------------------------------------------------------------
Fixing problems building 32 bit binaries
32位二进制文件的安装问题
---------------------------------------------------------------------------
If after building Redis with a 32 bit target you need to rebuild it
with a 64 bit target, or the other way around, you need to perform a
"make distclean" in the root directory of the Redis distribution.
如果你在编译Redis用32位之后,你需要重新编译Redis使用64位,
或者其他方式,你需要你需要执行一个
"make distclean"命令,在Redis分配的根目录下。
---------------------------------------------------------------------------
In case of build errors when trying to build a 32 bit binary of Redis, try
the following steps:
万一在编译时发生错误,当强制编译32位的Redis,试试
以下的步骤:
* Install the packages libc6-dev-i386 (also try g++-multilib).
* 安装包libc6的-DEV-I386(也尝试G ++ - multilib的)。

* Try using the following command line instead of "make 32bit":
* 试着用以下命令行代替 "make 32bit":
    make CFLAGS="-m32 -march=native" LDFLAGS="-m32"
-----------------------------------------------------------------------------
Allocator
分配器
-----------------------------------------------------------------------------
Selecting a non-default memory allocator when building Redis is done by setting
the `MALLOC` environment variable. Redis is compiled and linked against libc
malloc by default, with the exception of jemalloc being the default on Linux
systems. This default was picked because jemalloc has proven to have fewer
fragmentation problems than libc malloc.
选择一个非默认的内存分配器在编译Redis的是通过设置完成
在"MALLOC"环境变量。 在默认情况下,Redis是编译和反对的libc链接
malloc的,与正在Linux上的默认例外jemalloc的
系统。此默认被选中,因为jemalloc已被证明具有较少
碎片化问题比libc中的malloc。(这段不懂意思)
----------------------------------------------------------------------------------
To force compiling against libc malloc, use:
要强制编译反对的libc的malloc,使用方法:
    % make MALLOC=libc
--------------------------------------------------------------------------
To compile against jemalloc on Mac OS X systems, use:
编译反对jemalloc在Mac OS X系统,使用:
    % make MALLOC=jemalloc
----------------------------------------------------------------------------
Verbose build
冗长的编译(什么叫冗长啊??)
-------------
Redis will build with a user friendly colorized output by default.
If you want to see a more verbose output use the following:
Redis在编译时可以输出默认用户友好的彩色。
如果你想看到更详细的输出使用以下命令:
    % make V=1
---------------------------------------------------
Running Redis
运行Redis
-------------

To run Redis with the default configuration just type:
运行启动Redis可以使用默认的配置,像下面的样子
    % cd src
    % ./redis-server
-----------------------------------------------------------------------------   
If you want to provide your redis.conf, you have to run it using an additional
parameter (the path of the configuration file):
如果你想启动时带上你的Redis配置文件时,你可以运行Redis使用一个额外的
模式(带上你的配置文件的路径)
    % cd src
    % ./redis-server /path/to/redis.conf
------------------------------------------------------------------------------
It is possible to alter the Redis configuration passing parameters directly
as options using the command line. Examples:
有可能改变Redis的配置参数传递直接
使用命令行选项。例子:
    % ./redis-server --port 9999 --slaveof 127.0.0.1 6379
    % ./redis-server /etc/redis/6379.conf --loglevel debug
-------------------------------------------------------------------------------
All the options in redis.conf are also supported as options using the command
line, with exactly the same name.
在所有的redis.conf中的选项也可以在命令行中使用
具有完全相同的名称。
---------------------------------------------------------------------------
Playing with Redis
Redis的操作使用
------------------
You can use redis-cli to play with Redis. Start a redis-server instance,
then in another terminal try the following:
你可以使用redis-cli命令去打开Redis。开启一个redis-server的实例
然后在另一端进行一下步骤:
    % cd src
    % ./redis-cli
    redis> ping
    PONG
    redis> set foo bar
    OK
    redis> get foo
    "bar"
    redis> incr mycounter
    (integer) 1
    redis> incr mycounter
    (integer) 2
    redis>
----------------------------------------------------------------
You can find the list of all the available commands here:
你可以在这里找到所有可用的命令的列表:
    http://redis.io/commands
----------------------------------------------------------------
Installing Redis
Redis的安装
-----------------
In order to install Redis binaries into /usr/local/bin just use:
为了安装Redis的二进制文件到/ usr / local / bin目录只需使用
    % make install
-------------------------------------------------------------------
You can use "make PREFIX=/some/other/directory install" if you wish to use a
different destination.
如果你想安装到不同的目录下去,你可以使用"mkae PREFIX=/some/other/directory install"
------------------------------------------------------------------------------------
Make install will just install binaries in your system, but will not configure
init scripts and configuration files in the appropriate place. This is not
needed if you want just to play a bit with Redis, but if you are installing
it the proper way for a production system, we have a script doing this
for Ubuntu and Debian systems:
mkae install将只安装二进制文件在你的系统,但不会配置
init脚本和配置文件中在适当的位置。这并不是一定需要
如果你只是仅仅想玩玩Redis的话,但如果你正在安装
它的合适方式生产系统,我们有一个脚本这样做
对于Ubuntu和Debian系统:
    % cd utils
    % ./install_server.sh
------------------------------------------------------------------------------------------
The script will ask you a few questions and will setup everything you need
to run Redis properly as a background daemon that will start again on
system reboots.
该脚本会问你几个问题,并会设置你所需要的一切
使用正确的运行作为后台守护进程会重新
重新启动系统。
------------------------------------------------------------------------------------------
You'll be able to stop and start Redis using the script named
/etc/init.d/redis_, for instance /etc/init.d/redis_6379.
您将能够使用脚本名为/etc/init.d/redis_<端口号>去停止和启动的Redis
,例如/etc/init.d/redis_6379。
---------------------------------------------------------------------------------------------
Code contributions
代码贡献者们
------------------------------------------------------------------------------------------
Note: by contributing code to the Redis project in any form, including sending
a pull request via Github, a code fragment or patch via private email or
public discussion groups, you agree to release your code under the terms
of the BSD license that you can find in the COPYING file included in the Redis
source distribution.
注:在任何形式的代码贡献给Redis的项目,包括发送
通过Github上,通过私人电子邮件中的代码片段或补丁或者拉入请求
公共讨论组,您同意释放下的条款代码
的BSD许可,您可以在复制文件中找到包含在Redis的
源代码分发。
Please see the CONTRIBUTING file in this source distribution for more
information.
请参见本源代码分发的文件作出贡献更多
信息。
Enjoy!
尽情享受吧!

2015-07-23 09:45 举报
已邀请:

回复帖子,请先登录注册

退出全屏模式 全屏模式 回复
评分
可选评分理由: