﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-快乐的天空-随笔分类-开发笔记</title><link>http://www.cppblog.com/HappySky2046/category/19040.html</link><description>时间来得快，去得也快</description><language>zh-cn</language><lastBuildDate>Mon, 17 Aug 2015 03:28:32 GMT</lastBuildDate><pubDate>Mon, 17 Aug 2015 03:28:32 GMT</pubDate><ttl>60</ttl><item><title>bjam 编译boost</title><link>http://www.cppblog.com/HappySky2046/archive/2015/08/16/211575.html</link><dc:creator>探路者</dc:creator><author>探路者</author><pubDate>Sun, 16 Aug 2015 15:26:00 GMT</pubDate><guid>http://www.cppblog.com/HappySky2046/archive/2015/08/16/211575.html</guid><wfw:comment>http://www.cppblog.com/HappySky2046/comments/211575.html</wfw:comment><comments>http://www.cppblog.com/HappySky2046/archive/2015/08/16/211575.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://www.cppblog.com/HappySky2046/comments/commentRss/211575.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/HappySky2046/services/trackbacks/211575.html</trackback:ping><description><![CDATA[&nbsp;<div><br />link=static variant=debug,release threading=multi runtime-link=static --layout=versioned --toolset=msvc-9.0&nbsp; --build-type=complete&nbsp; stage <br />--build-dir=&lt;builddir&gt; &nbsp;编译的临时文件会放在builddir里(这样比较好管理，编译完就可以把它删除了)<br />--stagedir=&lt;stagedir&gt; &nbsp;存放编译后库文件的路径，默认是stage<br />--build-type=complete &nbsp;编译所有版本，不然只会编译一小部分版本（确切地说是相当于:variant=release, threading=multi;link=shared|static;runtime-link=shared）<br />variant=debug|release &nbsp;决定编译什么版本(Debug or Release?)<br />link=static|shared &nbsp;决定使用静态库还是动态库。<br />threading=single|multi &nbsp;决定使用单线程还是多线程库。<br />runtime-link=static|shared &nbsp;决定是静态还是动态链接C/C++标准库。<br />--with-&lt;library&gt; &nbsp;只编译指定的库，如输入--with-regex就只编译regex库了。<br />--show-libraries &nbsp;显示需要编译的库名称</div><div></div><div><br />boost库的命名约定：</div><div></div><div>[lib]&lt;boost模块名&gt;-&lt;toolset编译器&gt;[-mt][-sgdyp]&lt;-boost版本&gt;.&lt;扩展名&gt;</div><div></div><div>&nbsp;&nbsp;&nbsp; [lib]：所有模块均采用lib为前缀，除了windows+msvc环境。在windows+msvc环境下，只有静态库(.lib)才有lib前缀，动态库(.dll)没有lib前缀。windows+mingw环境也使用lib前缀。<br />&nbsp;&nbsp;&nbsp; &lt;boost模块名&gt;：所有模块均以boost_开头，比如boost_date_time, boost_python等等<br />&nbsp;&nbsp;&nbsp; &lt;toolset编译器&gt;：比如mgw45, vc90<br />&nbsp;&nbsp;&nbsp; [-mt]：多线程支持，不指定则默认为仅支持单线程<br />&nbsp;&nbsp;&nbsp; [-sgdyp]：ABI的详细情况<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s 静态链接到C++标准库和运行库<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; g 使用debug版的标准库和运行库<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; d 编译debug版<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; y python相关的debug<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; p 使用STLPort作为C++标准库而不是编译器默认提供的<br />&nbsp;&nbsp;&nbsp; &lt;-boost版本&gt;：比如-1_45<br />&nbsp;&nbsp;&nbsp; &lt;扩展名&gt;：<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; windows+mingw：dll(动态库)，dll.a(动态库的导入库)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; windows+msvc：dll(动态库)，lib(无lib前缀的是动态库的导入库)，lib(有lib前缀的是静态库)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unix/linux：a(静态库)，so(动态库)</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 使用boost</div><div></div><div>&nbsp;&nbsp;&nbsp; windows+msvc编译出来的boost库默认会打开auto-link功能，即在包含boost头文件的时候自动寻找并链接依赖库。这实际上是通过msvc特有的预处理指令#pragma comment(lib, "xxx.lib")来实现的，默认的实现为链接静态库。<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 如果想要链接动态库，则需要使用预定义宏 -DBOOST_ALL_DYN_LINK<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 如果想要完全手动控制链接方式，则需要使用预定义宏 -DBOOST_ALL_NO_LIB。<br />&nbsp;&nbsp;&nbsp; windows+mingw编译出来的boost库不支持auto-link，因为gcc没有类似msvc的#pragma comment预处理指令，所以必须手动控制链接方式。<br />&nbsp;&nbsp;&nbsp; asio：依赖Boost.system模块，并且如果用到特定功能还可能依赖Boost.regex, Boost.openssl, Boost.thread, Boost.date_time, Boost.serialization等等，可以使用预定义宏 -DBOOST_DATE_TIME_NO_LIB 以及 -DBOOST_REGEX_NO_LIB 关闭相应模块的自动链接。windows下asio最终使用的是windows系统的socket库:ws2_32.lib，Mswsock.lib.同理，msvc可以通过auto-link自动完成链接，mingw需要手动设置。</div><div></div><div>&nbsp;&nbsp;&nbsp; 使用msvc编译真是有些玄妙：</div><div></div><div>使用预定义宏BOOST_ALL_DYN_LINK，动态链接：则编译时需要动态链接库导入库system,date_time,regex,执行时需要system,date_time。</div><div></div><div>使用预定义宏BOOST_ALL_NO_LIB，动态链接：则编译时需要动态链接库导入库system,执行时也只需要system。</div><div></div><div>使用预定义宏BOOST_ALL_NO_LIB，静态链接：则编译时需要静态库system,执行时不需要system。</div><div></div><div>&nbsp;</div><div></div><div>使用mingw编译，一切正常：</div><div></div><div>注意上述几个预定义宏只对msvc有用而对mingw是不起作用的</div><div></div><div>动态链接：则编译时需要动态链接库导入库system,执行时也只需要system</div><div></div><div>静态链接：则编译时需要静态库system,执行时不需要system</div><div></div><div>当然ws2_32, Mswsock总是要指定链接的。</div><div></div><div>Usage:</div><div></div><div>Bjam&nbsp; [options]&nbsp; [properties]&nbsp; [install|stage]</div><div></div><div>&nbsp;</div><div></div><div>&nbsp;</div><div></div><div>install&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Install&nbsp; headers and compiled library files to the</div><div></div><div>=======&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; configured locations (below).</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 在&#8220;--prefix=&#8221;指定的目录下生成所有头文件</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; （boost源代码下boost文件夹下所有文件）和指定库文件</div><div></div><div>&nbsp;</div><div></div><div>--prefix=&lt;PREFIX&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Install architecture independent files here.</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Default; C:\Boost on Win32</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Default; /usr/local on Unix. Linux, etc.</div><div></div><div>&nbsp;</div><div></div><div>--exec-prefix=&lt;EPREFIX&gt;&nbsp; Install architecture dependent files here.</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Default; &lt;PREFIX&gt;</div><div></div><div>&nbsp;</div><div></div><div>--libdir=&lt;DIR&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Install library files here.</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Default; &lt;EPREFIX&gt;/lib</div><div></div><div>&nbsp;</div><div></div><div>--includedir=&lt;HDRDIR&gt;&nbsp;&nbsp; Install header files here.</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Default; &lt;PREFIX&gt;/include</div><div></div><div>&nbsp;</div><div></div><div>stage&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Build and install only compiled library files</div><div></div><div>======&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to the stage directory.</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 在&#8220;--stagedir=&#8221;指定的目录下生成指定库文件</div><div></div><div>&nbsp;</div><div></div><div>&nbsp;</div><div></div><div>--stagedir=&lt;STAGEDIR&gt;&nbsp;&nbsp; Install library files here</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Default; ./stage</div><div></div><div>&nbsp;</div><div></div><div>&nbsp;</div><div></div><div>【Other Options】:</div><div></div><div>--build-type=&lt;type&gt;&nbsp;&nbsp;&nbsp;&nbsp; Build the specified pre-defined set of variations</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; of the libraries. Note, that which variants get</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; built depends on what each library supports.</div><div></div><div>&nbsp;</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; minimal (default) - Builds the single</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "release" version of the libraries. This</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; release corresponds to specifying:</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "release&nbsp; &lt;threading&gt;multi&nbsp; &lt;link&gt;shared</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;link&gt;static&nbsp; &lt;runtime-link&gt;shared" as the</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Build variant to build.</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; complete - Attempts to build all possible</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; variations.</div><div></div><div>&nbsp;</div><div></div><div>--build-dir=DIR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Build in this location instead of building</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; within the distribution tree. Recommended!</div><div></div><div>&nbsp;</div><div></div><div>--show-libraries&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Displays the list of Boost libraries that require</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; build and installation steps, then exit.</div><div></div><div>&nbsp;</div><div></div><div>--layout=&lt;layout&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Determines whether to choose library names</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and header locations such that multiple</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; versions of Boost or multiple compilers can</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; be used on the same system.</div><div></div><div>&nbsp;</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; versioned (default) - Names of boost</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; binaries include the Boost version</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; number and the name and version of the</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; compiler. Boost headers are installed</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in a subdirectory of &lt;HDRDIR&gt; whose</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name contains the Boost version number.</div><div></div><div>&nbsp;</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; system - Binaries names do not include</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the Boost version number or the name</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and version number of the compiler.</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Boost headers are installed directly</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; into &lt;HDRDIR&gt;. This option is</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; intended for system integrators who</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; are building distribution packages.</div><div></div><div>&nbsp;</div><div></div><div>--buildid=ID&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Adds the specified ID to the name of built</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libraries. The default is to not add anything.</div><div></div><div>&nbsp;</div><div></div><div>--help&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This message.</div><div></div><div>&nbsp;</div><div></div><div>--with-&lt;library&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Build and install the specified &lt;library&gt;</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If this option is used, only libraries</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; specified using this option will be built.</div><div></div><div>&nbsp;</div><div></div><div>--without-&lt;library&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Do not build, stage, or install the specified</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;library&gt;. By default, all libraries are built.</div><div></div><div>&nbsp;</div><div></div><div>&nbsp;</div><div></div><div>【Properties】:</div><div></div><div>toolset=toolset&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Indicates the toolset to build with.</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; msvc-6.0 :&nbsp; VC6.0</div><div></div><div>msvc-7.0:&nbsp; VS2003</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; msvc-8.0:&nbsp; VS2005</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; msvc-9.0:&nbsp; VS2008</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; msvc-10.0:&nbsp; VS2010</div><div></div><div>&nbsp;</div><div></div><div>variant=debug|release&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Select the build variant</div><div></div><div>&nbsp;</div><div></div><div>link=static|shared&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Whether to build static or shared libraries</div><div></div><div>&nbsp;</div><div></div><div>threading=single|multi&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Whether to build single or multithreaded binaries</div><div></div><div>&nbsp;</div><div></div><div>runtime-link=static|shared&nbsp;&nbsp; Whether to link to static or shared C and C++ runtime.</div><div></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 决定是静态还是动态链接C/C++标准库<br /><br /><br /><div><div>compile gce dependence lib</div><strong></strong><br />b2 --toolset=msvc-14.0&nbsp; link=static variant=debug,release threading=multi runtime-link=static&nbsp; asmflags=\safeseh --stagedir=../.. --with-thread --with-atomic&nbsp; --with-coroutine --with-context --with-system --with-regex --with-date_time --with-chrono<br /><div>[context] msvc /SAFESEH</div><strong></strong><br /><div>http://comments.gmane.org/gmane.comp.lib.boost.devel/244402</div></div></div><img src ="http://www.cppblog.com/HappySky2046/aggbug/211575.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/HappySky2046/" target="_blank">探路者</a> 2015-08-16 23:26 <a href="http://www.cppblog.com/HappySky2046/archive/2015/08/16/211575.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>redis 参数配置</title><link>http://www.cppblog.com/HappySky2046/archive/2014/06/18/207323.html</link><dc:creator>探路者</dc:creator><author>探路者</author><pubDate>Wed, 18 Jun 2014 04:57:00 GMT</pubDate><guid>http://www.cppblog.com/HappySky2046/archive/2014/06/18/207323.html</guid><wfw:comment>http://www.cppblog.com/HappySky2046/comments/207323.html</wfw:comment><comments>http://www.cppblog.com/HappySky2046/archive/2014/06/18/207323.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/HappySky2046/comments/commentRss/207323.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/HappySky2046/services/trackbacks/207323.html</trackback:ping><description><![CDATA[<div><p>1. Redis默认不是以守护进程的方式运行，可以通过该配置项修改，使用yes启用守护进程</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">daemonize no</span></strong></p> <p>2. 当Redis以守护进程方式运行时，Redis默认会把pid写入/var/run/redis.pid文件，可以通过pidfile指定</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">pidfile /var/run/redis.pid</span></strong></p> <p>3. 指定Redis监听端口，默认端口为6379，作者在自己的一篇博文中解释了为什么选用6379作为默认端口，因为6379在手机按键上MERZ对应的号码，而MERZ取自意大利歌女Alessia Merz的名字</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;"> port 6379</span></strong></p> <p>4. 绑定的主机地址</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">bind 127.0.0.1</span></strong></p> <p>5.当 客户端闲置多长时间后关闭连接，如果指定为0，表示关闭该功能</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">timeout 300</span></strong></p> <p>6. 指定日志记录级别，Redis总共支持四个级别：debug、verbose、notice、warning，默认为verbose</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">loglevel verbose</span></strong></p> <p>7. 日志记录方式，默认为标准输出，如果配置Redis为守护进程方式运行，而这里又配置为日志记录方式为标准输出，则日志将会发送给/dev/null</p> <p><span style="color: #ff0000;">&nbsp;&nbsp;&nbsp; </span><strong style="color: #ff0000;">logfile stdout</strong></p> <p>8. 设置数据库的数量，默认数据库为0，可以使用SELECT &lt;dbid&gt;命令在连接上指定数据库id</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">databases 16</span></strong></p> <p>9. 指定在多长时间内，有多少次更新操作，就将数据同步到数据文件，可以多个条件配合</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">save &lt;seconds&gt; &lt;changes&gt;</span></strong></p> <p>&nbsp;&nbsp;&nbsp; Redis默认配置文件中提供了三个条件：</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">save 900 1</span></strong></p> <p><strong>&nbsp;&nbsp;&nbsp; <span style="color: #ff0000;">save 300 10</span></strong></p> <p><strong>&nbsp;&nbsp;&nbsp; <span style="color: #ff0000;">save 60 10000</span></strong></p> <p>&nbsp;&nbsp;&nbsp; 分别表示900秒（15分钟）内有1个更改，300秒（5分钟）内有10个更改以及60秒内有10000个更改。</p> <p>&nbsp;</p> <p>10. 指定存储至本地数据库时是否压缩数据，默认为yes，Redis采用LZF压缩，如果为了节省CPU时间，可以关闭该选项，但会导致数据库文件变的巨大</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">rdbcompression yes</span></strong></p> <p>11. 指定本地数据库文件名，默认值为dump.rdb</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">dbfilename dump.rdb</span></strong></p> <p>12. 指定本地数据库存放目录</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">dir ./</span></strong></p> <p>13. 设置当本机为slav服务时，设置master服务的IP地址及端口，在Redis启动时，它会自动从master进行数据同步</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">slaveof &lt;masterip&gt; &lt;masterport&gt;</span></strong></p> <p>14. 当master服务设置了密码保护时，slav服务连接master的密码</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">masterauth &lt;master-password&gt;</span></strong></p> <p>15. 设置Redis连接密码，如果配置了连接密码，客户端在连接Redis时需要通过AUTH &lt;password&gt;命令提供密码，默认关闭</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">requirepass foobared</span></strong></p> <p>16.  设置同一时间最大客户端连接数，默认无限制，Redis可以同时打开的客户端连接数为Redis进程可以打开的最大文件描述符数，如果设置   maxclients 0，表示不作限制。当客户端连接数到达限制时，Redis会关闭新的连接并向客户端返回max number of   clients reached错误信息</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">maxclients 128</span></strong></p> <p>17.    指定Redis最大内存限制，Redis在启动时会把数据加载到内存中，达到最大内存后，Redis会先尝试清除已到期或即将到期的Key，当此方法处理     后，仍然到达最大内存设置，将无法再进行写入操作，但仍然可以进行读取操作。Redis新的vm机制，会把Key存放内存，Value会存放在swap区</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">maxmemory &lt;bytes&gt;</span></strong></p> <p>18.   指定是否在每次更新操作后进行日志记录，Redis在默认情况下是异步的把数据写入磁盘，如果不开启，可能会在断电时导致一段时间内的数据丢失。因为   redis本身同步数据文件是按上面save条件来同步的，所以有的数据会在一段时间内只存在于内存中。默认为no</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">appendonly no</span></strong></p> <p>19. 指定更新日志文件名，默认为appendonly.aof</p> <p>&nbsp;&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">appendfilename appendonly.aof</span></strong></p> <p>20. 指定更新日志条件，共有3个可选值： <br /> &nbsp; &nbsp; <strong><span style="color: #ff0000;">no</span></strong>：表示等操作系统进行数据缓存同步到磁盘（快） <br /> &nbsp; &nbsp; <strong><span style="color: #ff0000;">always</span></strong>：表示每次更新操作后手动调用fsync()将数据写到磁盘（慢，安全） <br /> &nbsp; &nbsp; <strong><span style="color: #ff0000;">everysec</span></strong>：表示每秒同步一次（折衷，默认值）</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">appendfsync everysec</span></strong></p> <p>&nbsp;</p> <p>21. 指定是否启用虚拟内存机制，默认值为no，简单的介绍一下，VM机制将数据分页存放，由Redis将访问量较少的页即冷数据swap到磁盘上，访问多的页面由磁盘自动换出到内存中（在后面的文章我会仔细分析Redis的VM机制）</p> <p>&nbsp;&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">vm-enabled no</span></strong></p> <p>22. 虚拟内存文件路径，默认值为/tmp/redis.swap，不可多个Redis实例共享</p> <p>&nbsp;&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">vm-swap-file /tmp/redis.swap</span></strong></p> <p>23.    将所有大于vm-max-memory的数据存入虚拟内存,无论vm-max-memory设置多小,所有索引数据都是内存存储的(Redis的索引数据   就是keys),也就是说,当vm-max-memory设置为0的时候,其实是所有value都存在于磁盘。默认值为0</p> <p>&nbsp;&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">vm-max-memory 0</span></strong></p> <p>24.  Redis   swap文件分成了很多的page，一个对象可以保存在多个page上面，但一个page上不能被多个对象共享，vm-page-size是要根据存储的     数据大小来设定的，作者建议如果存储很多小对象，page大小最好设置为32或者64bytes；如果存储很大大对象，则可以使用更大的page，如果不   确定，就使用默认值</p> <p>&nbsp;&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">vm-page-size 32</span></strong></p> <p>25. 设置swap文件中的page数量，由于页表（一种表示页面空闲或使用的bitmap）是在放在内存中的，，在磁盘上每8个pages将消耗1byte的内存。</p> <p>&nbsp;&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">vm-pages 134217728</span></strong></p> <p>26. 设置访问swap文件的线程数,最好不要超过机器的核数,如果设置为0,那么所有对swap文件的操作都是串行的，可能会造成比较长时间的延迟。默认值为4</p> <p>&nbsp;&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">vm-max-threads 4</span></strong></p> <p>27. 设置在向客户端应答时，是否把较小的包合并为一个包发送，默认为开启</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">glueoutputbuf yes</span></strong></p> <p>28. 指定在超过一定的数量或者最大的元素超过某一临界值时，采用一种特殊的哈希算法</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">hash-max-zipmap-entries 64</span></strong></p> <p><strong>&nbsp;&nbsp;&nbsp; <span style="color: #ff0000;">hash-max-zipmap-value 512</span></strong></p> <p>29. 指定是否激活重置哈希，默认为开启（后面在介绍Redis的哈希算法时具体介绍）</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">activerehashing yes</span></strong></p> <p>30. 指定包含其它的配置文件，可以在同一主机上多个Redis实例之间使用同一份配置文件，而同时各个实例又拥有自己的特定配置文件</p> <p>&nbsp;&nbsp;&nbsp; <strong><span style="color: #ff0000;">include /path/to/local.conf</span></strong></p><p><br /></p><p><br /><strong><span style="color: #ff0000;"></span></strong></p><p><strong><span style="color: #ff0000;"></span></strong></p><div><div><strong><span># By default Redis does not run as a daemon. Use 'yes' if you need it.</span></strong></div><strong> <div><span># Note that Redis will write a pid file in /var/run/redis.pid when daemonized.</span></div> <div><span>#Redis默认不是以守护进程的方式运行，可以通过该配置项修改，使用yes启用守护进程</span></div> <div><strong>daemonize no</strong></div> <div></div> <div><span># When running daemonized, Redis writes a pid file in /var/run/redis.pid by</span></div> <div><span># default. You can specify a custom pid file location here.</span></div> <div><span>#当 Redis 以守护进程的方式运行的时候，Redis 默认会把 pid 文件放在/var/run/redis.pid</span></div> <div><span>#可配置到其他地址，当运行多个 redis 服务时，需要指定不同的 pid 文件和端口</span></div> <div><strong>pidfile /var/run/redis.pid</strong></div> <div></div> <div><span># Accept connections on the specified port, default is 6379.</span></div> <div><span># If port 0 is specified Redis will not listen on a TCP socket.</span></div> <div><span>#端口</span></div> <div><strong>port 6379</strong></div> <div></div> <div><span># If you want you can bind a single interface, if the bind option is not</span></div> <div><span># specified all the interfaces will listen for incoming connections.</span></div> <div><span>#指定Redis可接收请求的IP地址,不设置将处理所有请求,建议生产环境中设置</span></div> <div><strong># bind 127.0.0.1</strong></div> <div></div> <div><span># Close the connection after a client is idle for N seconds (0 to disable)</span></div> <div><span>#客户端连接的超时时间,单位为秒,超时后会关闭连接</span></div> <div><strong>timeout 0</strong></div> <div></div> <div> <div><span># Set server verbosity to 'debug'</span></div> <div><span># it can be one of:</span></div> <div><span># debug (a lot of information, useful for development/testing)</span></div> <div><span># verbose (many rarely useful info, but not a mess like the debug level)</span></div> <div><span># notice (moderately verbose, what you want in production probably)</span></div> <div><span># warning (only very important / critical messages are logged)</span></div> <div><span>#</span><span style="background-color: #ffffff; font-family: verdana,Arial,Helvetica,sans-serif; line-height: 25px;">日志记录等级，4个可选值</span></div> <div><strong>loglevel notice</strong></div> </div> <div></div> <div><span># Specify the log file name. Also 'stdout' can be used to force</span></div> <div><span># Redis to log on the standard output. Note that if you use standard</span></div> <div><span># output for logging but daemonize, logs will be sent to /dev/null</span></div> <div><span>#配置 log 文件地址,默认打印在命令行终端的窗口上，也可设为/dev/null屏蔽日志、</span></div> <div><strong>logfile stdout</strong></div> <div></div> <div><span># Set the number of databases. The default database is DB 0, you can select</span></div> <div><span># a different one on a per-connection basis using SELECT where</span></div> <div><span># dbid is a number between 0 and 'databases'-1</span></div> <div><span>#设置数据库的个数,可以使用 SELECT 命令来切换数据库。</span></div> <div><strong>databases 16</strong></div> <div></div> <div><span>#</span></div> <div><span># Save the DB on disk:</span></div> <div><span>#</span></div> <div><span># &nbsp;</span><wbr><span> save</span></div> <div><span>#</span></div> <div><span># &nbsp;</span><wbr><span> Will save the DB if both the given number of seconds and the given</span></div> <div><span># &nbsp;</span><wbr><span> number of write operations against the DB occurred.</span></div> <div><span>#</span></div> <div><span># &nbsp;</span><wbr><span> In the example below the behaviour will be to save:</span></div> <div><span># &nbsp;</span><wbr><span> after 900 sec (15 min) if at least 1 key changed</span></div> <div><span># &nbsp;</span><wbr><span> after 300 sec (5 min) if at least 10 keys changed</span></div> <div><span># &nbsp;</span><wbr><span> after 60 sec if at least 10000 keys changed</span></div> <div><span>#</span></div> <div><span># &nbsp;</span><wbr><span> Note: you can disable saving at all commenting all the "save" lines.</span></div> <div><span>#设置 Redis 进行数据库镜像的频率。</span><span style="background-color: #ffffff; font-family: verdana,Arial,Helvetica,sans-serif; line-height: 25px;">保存数据到disk的策略</span></div> <div><span>#900秒之内有1个keys发生变化时</span></div> <div><span>#30秒之内有10个keys发生变化时</span></div> <div><span>#60秒之内有10000个keys发生变化时</span></div> <div><strong>save 900 1</strong></div> <div><strong>save 300 10</strong></div> <div><strong>save 60 10000</strong></div> <div></div> <div><span># Compress string objects using LZF when dump .rdb databases?</span></div> <div><span># For default that's set to 'yes' as it's almost always a win.</span></div> <div><span># If you want to save some CPU in the saving child set it to 'no' but</span></div> <div><span># the dataset will likely be bigger if you have compressible values or keys.</span></div> <div><span>#在进行镜像备份时,是否进行压缩</span></div> <div><strong>rdbcompression yes</strong></div> <div></div> <div><span># The filename where to dump the DB</span></div> <div><span>#镜像备份文件的文件名</span></div> <div><strong>dbfilename dump.rdb</strong></div> <div></div> <div><span># The working directory.</span></div> <div><span>#</span></div> <div><span># The DB will be written inside this directory, with the filename specified</span></div> <div><span># above using the 'dbfilename' configuration directive.</span></div> <div><span>#&nbsp;</span><wbr></div> <div><span># Also the Append Only File will be created inside this directory.</span></div> <div><span>#&nbsp;</span><wbr></div> <div><span># Note that you must specify a directory here, not a file name.</span></div> <div><span>#数据库镜像备份的文件放置的路径</span></div> <div><span>#路径跟文件名分开配置是因为 Redis 备份时，先会将当前数据库的状态写入到一个临时文件</span></div> <div><span>#等备份完成时，再把该临时文件替换为上面所指定的文件</span></div> <div><span>#而临时文件和上面所配置的备份文件都会放在这个指定的路径当中</span></div> <div><span>#默认值为 ./</span></div> <div><strong>dir&nbsp;<wbr>/var/lib/redis/</strong></div> <div></div> <div><span># Master-Slave replication. Use slaveof to make a Redis instance a copy of</span></div> <div><span># another Redis server. Note that the configuration is local to the slave</span></div> <div><span># so for example it is possible to configure the slave to save the DB with a</span></div> <div><span># different interval, or to listen to another port, and so on.</span></div> <div><span>#设置该数据库为其他数据库的从数据库</span></div> <div><span>#slaveof &lt;masterip&gt; &lt;masterport&gt; 当本机为从服务时，设置主服务的IP及端口</span></div> <div><strong># slaveof</strong></div> <div></div> <div><span># If the master is password protected (using the "requirepass" configuration</span></div> <div><span># directive below) it is possible to tell the slave to authenticate before</span></div> <div><span># starting the replication synchronization process, otherwise the master will</span></div> <div><span># refuse the slave request.</span></div> <div><span>#指定与主数据库连接时需要的密码验证</span></div> <div><span>#masterauth &lt;master-password&gt; 当本机为从服务时，设置主服务的连接密码</span></div> <div><strong># masterauth</strong></div> <div></div> <div> <div><span># When a slave lost the connection with the master, or when the replication</span></div> <div><span># is still in progress, the slave can act in two different ways:</span></div> <div><span>#</span></div> <div><span># 1) if slave-serve-stale-data is set to 'yes' (the default) the slave will</span></div> <div><span># &nbsp;</span><wbr> &nbsp;<wbr><span>still reply to client requests, possibly with out of data data, or the</span></div> <div><span># &nbsp;</span><wbr> &nbsp;<wbr><span>data set may just be empty if this is the first synchronization.</span></div> <div><span>#</span></div> <div><span># 2) if slave-serve-stale data is set to 'no' the slave will reply with</span></div> <div><span># &nbsp;</span><wbr> &nbsp;<wbr><span>an error "SYNC with master in progress" to all the kind of commands</span></div> <div><span># &nbsp;</span><wbr> &nbsp;<wbr><span>but to INFO and SLAVEOF.</span></div> <div><span> #当slave丢失与master的连接时，或slave仍然在于master进行数据同步时（未与master保持一致）</span></div> <div><span>#slave可有两种方式来响应客户端请求：</span></div> <div><span>#1)如果 slave-serve-stale-data 设置成 'yes'(默认)，slave仍</span><span style="line-height: 21px;">会</span><span>响应客户端请求,此时可能会有问题</span></div> <div><span>#2)如果 slave-serve-stale-data 设置成 'no'，slave会返回"SYNC with master in progress"错误信息，但 INFO 和SLAVEOF命令除外。</span></div> <div><span>slave-serve-stale-data yes</span></div> </div> <div></div> <div><span># Require clients to issue AUTH before processing any other</span></div> <div><span># commands. &nbsp;</span><wbr><span>This might be useful in environments in which you do not trust</span></div> <div><span># others with access to the host running redis-server.</span></div> <div><span>#</span></div> <div><span># This should stay commented out for backward compatibility and because most</span></div> <div><span># people do not need auth (e.g. they run their own servers).</span></div> <div><span>#&nbsp;</span><wbr></div> <div><span># Warning: since Redis is pretty fast an outside user can try up to</span></div> <div><span># 150k passwords per second against a good box. This means that you should</span></div> <div><span># use a very strong password otherwise it will be very easy to break.</span></div> <div><span>#设置客户端连接后进行任何其他指定前需要使用的密码</span></div> <div><span>#redis速度相当快，一个外部用户在一秒钟进行150K次密码尝试，需指定强大的密码来防止暴力破解</span></div> <div><strong># requirepass foobared</strong></div> <div></div> <div><span># Set the max number of connected clients at the same time. By default there</span></div> <div><span># is no limit, and it's up to the number of file descriptors the Redis process</span></div> <div><span># is able to open. The special value '0' means no limits.</span></div> <div><span># Once the limit is reached Redis will close all the new connections sending</span></div> <div><span># an error 'max number of clients reached'.</span></div> <div><span>#限制同时连接的客户数量。</span></div> <div><span>#当连接数超过这个值时，redis 将不再接收其他连接请求，客户端尝试连接时将收到 error 信息</span></div> <div><strong># maxclients 128</strong></div> <div></div> <div><span># Don't use more memory than the specified amount of bytes.</span></div> <div><span># When the memory limit is reached Redis will try to remove keys</span></div> <div><span># accordingly to the eviction policy selected (see maxmemmory-policy).</span></div> <div><span>#</span></div> <div><span># If Redis can't remove keys according to the policy, or if the policy is</span></div> <div><span># set to 'noeviction', Redis will start to reply with errors to commands</span></div> <div><span># that would use more memory, like SET, LPUSH, and so on, and will continue</span></div> <div><span># to reply to read-only commands like GET.</span></div> <div><span>#</span></div> <div><span># This option is usually useful when using Redis as an LRU cache, or to set</span></div> <div><span># an hard memory limit for an instance (using the 'noeviction' policy).</span></div> <div><span>#</span></div> <div><span># WARNING: If you have slaves attached to an instance with maxmemory on,</span></div> <div><span># the size of the output buffers needed to feed the slaves are subtracted</span></div> <div><span># from the used memory count, so that network problems / resyncs will</span></div> <div><span># not trigger a loop where keys are evicted, and in turn the output</span></div> <div><span># buffer of slaves is full with DELs of keys evicted triggering the deletion</span></div> <div><span># of more keys, and so forth until the database is completely emptied.</span></div> <div><span>#</span></div> <div><span># In short... if you have slaves attached it is suggested that you set a lower</span></div> <div><span># limit for maxmemory so that there is some free RAM on the system for slave</span></div> <div><span># output buffers (but this is not needed if the policy is 'noeviction').</span></div> <div><span>#设置redis能够使用的最大内存。</span></div> <div><span>#达到最大内存设置后，Redis会先尝试清除已到期或即将到期的Key（</span><span style="line-height: 21px;">设置过expire信息的key</span><span>）</span></div> <div><span>#在删除时,按照过期时间进行删除，最早将要被过期的key将最先被删除</span></div> <div><span>#如果</span><span style="line-height: 21px;">已到期或即将到期</span><span>的key删光，仍进行set操作，那么将返回错误</span></div> <div><span>#此时redis将不再接收写请求,只接收get请求。</span></div> <div><span>#maxmemory的设置比较适合于把redis当作于类似memcached 的缓存来使用</span></div> <div><strong># maxmemory&nbsp;<wbr>&lt;bytes&gt;</strong></div> <div></div> <div><span># By default Redis asynchronously dumps the dataset on disk. If you can live</span></div> <div><span># with the idea that the latest records will be lost if something like a crash</span></div> <div><span># happens this is the preferred way to run Redis. If instead you care a lot</span></div> <div><span># about your data and don't want to that a single record can get lost you should</span></div> <div><span># enable the append only mode: when this mode is enabled Redis will append</span></div> <div><span># every write operation received in the file appendonly.aof. This file will</span></div> <div><span># be read on startup in order to rebuild the full dataset in memory.</span></div> <div><span>#</span></div> <div><span># Note that you can have both the async dumps and the append only file if you</span></div> <div><span># like (you have to comment the "save" statements above to disable the dumps).</span></div> <div><span># Still if append only mode is enabled Redis will load the data from the</span></div> <div><span># log file at startup ignoring the dump.rdb file.</span></div> <div><span>#</span></div> <div><span># IMPORTANT: Check the BGREWRITEAOF to check how to rewrite the append</span></div> <div><span># log file in background when it gets too big.</span></div> <div><span>#redis&nbsp;</span><wbr><span style="line-height: 21px;">默认</span><span>每次更新操作后会在后台异步的把数据库镜像备份到磁盘，但该备份非常耗时，且备份不宜太频繁</span></div> <div><span>#redis 同步数据文件是按上面save条件来同步的</span></div> <div><span>#如果发生诸如拉闸限电、拔插头等状况,那么将造成比较大范围的数据丢失</span></div> <div><span>#所以redis提供了另外一种更加高效的数据库备份及灾难恢复方式</span></div> <div><span>#开启append only 模式后,redis 将每一次写操作请求都追加到appendonly.aof 文件中</span></div> <div><span>#redis重新启动时,会从该文件恢复出之前的状态。</span></div> <div><span>#但可能会造成 appendonly.aof 文件过大，所以redis支持BGREWRITEAOF 指令，对appendonly.aof重新整理</span></div> <div><strong>appendonly no</strong></div> <div></div> <div> <div><span># The name of the append only file (default: "appendonly.aof")</span></div> <div><span>##更新日志文件名，默认值为appendonly.aof</span></div> <div><strong># appendfilename appendonly.aof</strong></div> </div> <div></div> <div><span># The fsync() call tells the Operating System to actually write data on disk</span></div> <div><span># instead to wait for more data in the output buffer. Some OS will really flush&nbsp;</span><wbr></div> <div><span># data on disk, some other OS will just try to do it ASAP.</span></div> <div><span>#</span></div> <div><span># Redis supports three different modes:</span></div> <div><span>#</span></div> <div><span># no: don't fsync, just let the OS flush the data when it wants. Faster.</span></div> <div><span># always: fsync after every write to the append only log . Slow, Safest.</span></div> <div><span># everysec: fsync only if one second passed since the last fsync. Compromise.</span></div> <div><span>#</span></div> <div><span># The default is "everysec" that's usually the right compromise between</span></div> <div><span># speed and data safety. It's up to you to understand if you can relax this to</span></div> <div><span># "no" that will will let the operating system flush the output buffer when</span></div> <div><span># it wants, for better performances (but if you can live with the idea of</span></div> <div><span># some data loss consider the default persistence mode that's snapshotting),</span></div> <div><span># or on the contrary, use "always" that's very slow but a bit safer than</span></div> <div><span># everysec.</span></div> <div><span>#</span></div> <div><span># If unsure, use "everysec".</span></div> <div><span>#设置对 appendonly.aof 文件进行同步的频率</span></div> <div><span>#always 表示每次有写操作都进行同步,everysec 表示对写操作进行累积,每秒同步一次。</span></div> <div><span>#no表示等操作系统进行数据缓存同步到磁盘，</span><span style="line-height: 21px;">都进行同步,everysec 表示对写操作进行累积,每秒同步一次</span></div> <div><strong># appendfsync always</strong></div> <div><strong>appendfsync everysec</strong></div> <div><strong># appendfsync no</strong></div> <div></div> <div><span># Virtual Memory allows Redis to work with datasets bigger than the actual</span></div> <div><span># amount of RAM needed to hold the whole dataset in memory.</span></div> <div><span># In order to do so very used keys are taken in memory while the other keys</span></div> <div><span># are swapped into a swap file, similarly to what operating systems do</span></div> <div><span># with memory pages.</span></div> <div><span>#</span></div> <div><span># To enable VM just set 'vm-enabled' to yes, and set the following three</span></div> <div><span># VM parameters accordingly to your needs.</span></div> <div><span>#是否开启虚拟内存支持。</span></div> <div><span>#redis 是一个内存数据库，当内存满时,无法接收新的写请求,所以在redis2.0后,提供了虚拟内存的支持</span></div> <div><span>#但需要注意的，redis 所有的key都会放在内存中，在内存不够时,只把value 值放入交换区</span></div> <div><span>#虽使用虚拟内存，但性能基本不受影响，需要注意的是要把vm-max-memory设置到足够来放下所有的key</span></div> <div><strong>vm-enabled no</strong></div> <div><strong># vm-enabled yes</strong></div> <div></div> <div><span># This is the path of the Redis swap file. As you can guess, swap files</span></div> <div><span># can't be shared by different Redis instances, so make sure to use a swap</span></div> <div><span># file for every redis process you are running. Redis will complain if the</span></div> <div><span># swap file is already in use.</span></div> <div><span>#</span></div> <div><span># The best kind of storage for the Redis swap file (that's accessed at random)&nbsp;</span><wbr></div> <div><span># is a Solid State Disk (SSD).</span></div> <div><span>#</span></div> <div><span># *** WARNING *** if you are using a shared hosting the default of putting</span></div> <div><span># the swap file under /tmp is not secure. Create a dir with access granted</span></div> <div><span># only to Redis user and configure Redis to create the swap file there.</span></div> <div><span>#设置虚拟内存的交换文件路径，不可多个Redis实例共享</span></div> <div><strong>vm-swap-file /tmp/redis.swap</strong></div> <div></div> <div><span># vm-max-memory configures the VM to use at max the specified amount of</span></div> <div><span># RAM. Everything that deos not fit will be swapped on disk *if* possible, that</span></div> <div><span># is, if there is still enough contiguous space in the swap file.</span></div> <div><span>#</span></div> <div><span># With vm-max-memory 0 the system will swap everything it can. Not a good</span></div> <div><span># default, just specify the max amount of RAM you can in bytes, but it's</span></div> <div><span># better to leave some margin. For instance specify an amount of RAM</span></div> <div><span># that's more or less between 60 and 80% of your free RAM.</span></div> <div><span>#设置开启虚拟内存后,redis将使用的最大物理内存大小。</span></div> <div><span>#默认为0，redis将把他所有能放到交换文件的都放到交换文件中，以尽量少的使用物理内存</span></div> <div><span>#即当vm-max-memory设置为0的时候,其实是所有value都存在于磁盘</span></div> <div><span>#在生产环境下,需要根据实际情况设置该值,最好不要使用默认的 0</span></div> <div><strong>vm-max-memory 0</strong></div> <div></div> <div><span># Redis swap files is split into pages. An object can be saved using multiple</span></div> <div><span># contiguous pages, but pages can't be shared between different objects.</span></div> <div><span># So if your page is too big, small objects swapped out on disk will waste</span></div> <div><span># a lot of space. If you page is too small, there is less space in the swap</span></div> <div><span># file (assuming you configured the same number of total swap file pages).</span></div> <div><span>#</span></div> <div><span># If you use a lot of small objects, use a page size of 64 or 32 bytes.</span></div> <div><span># If you use a lot of big objects, use a bigger page size.</span></div> <div><span># If unsure, use the default :)</span></div> <div><span>#设置虚拟内存的页大小</span></div> <div><span>如果 value 值比较大,如要在 value 中放置博客、新闻之类的所有文章内容，就设大一点</span></div> <div><strong>vm-page-size 32</strong></div> <div></div> <div><span># Number of total memory pages in the swap file.</span></div> <div><span># Given that the page table (a bitmap of free/used pages) is taken in memory,</span></div> <div><span># every 8 pages on disk will consume 1 byte of RAM.</span></div> <div><span>#</span></div> <div><span># The total swap size is vm-page-size * vm-pages</span></div> <div><span>#</span></div> <div><span># With the default of 32-bytes memory pages and 134217728 pages Redis will</span></div> <div><span># use a 4 GB swap file, that will use 16 MB of RAM for the page table.</span></div> <div><span>#</span></div> <div><span># It's better to use the smallest acceptable value for your application,</span></div> <div><span># but the default is large in order to work in most conditions.</span></div> <div><span>#设置交换文件的总的 page 数量</span></div> <div><span>#注意page table信息是放在物理内存中，每8个page 就会占据RAM中的 1 个 byte</span></div> <div><span>#总的虚拟内存大小 = vm-page-size * vm-pages</span></div> <div><strong>vm-pages 134217728</strong></div> <div></div> <div><span># Max number of VM I/O threads running at the same time.</span></div> <div><span># This threads are used to read/write data from/to swap file, since they</span></div> <div><span># also encode and decode objects from disk to memory or the reverse, a bigger</span></div> <div><span># number of threads can help with big objects even if they can't help with</span></div> <div><span># I/O itself as the physical device may not be able to couple with many</span></div> <div><span># reads/writes operations at the same time.</span></div> <div><span>#</span></div> <div><span># The special value of 0 turn off threaded I/O and enables the blocking</span></div> <div><span># Virtual Memory implementation.</span></div> <div><span>#设置 VM IO 同时使用的线程数量。</span></div> <div><strong>vm-max-threads 4</strong></div> <div></div> <div><span># Hashes are encoded in a special way (much more memory efficient) when they</span></div> <div><span># have at max a given numer of elements, and the biggest element does not</span></div> <div><span># exceed a given threshold. You can configure this limits with the following</span></div> <div><span># configuration directives.</span></div> <div><span>#redis 2.0后引入了 hash 数据结构。&nbsp;</span><wbr></div> <div><span>#hash 中包含超过指定元素个数并且最大的元素当没有超过临界时，hash 将以zipmap</span><span style="line-height: 21px;">来存储</span></div> <div><span>#</span><span style="line-height: 21px;">zipmap</span><span>又称为 small hash，可大大减少内存的使用</span></div> <div><strong>hash-max-zipmap-entries 512</strong></div> <div><strong>hash-max-zipmap-value 64</strong></div> <div></div> <div><span># Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in</span></div> <div><span># order to help rehashing the main Redis hash table (the one mapping top-level</span></div> <div><span># keys to values). The hash table implementation redis uses (see dict.c)</span></div> <div><span># performs a lazy rehashing: the more operation you run into an hash table</span></div> <div><span># that is rhashing, the more rehashing "steps" are performed, so if the</span></div> <div><span># server is idle the rehashing is never complete and some more memory is used</span></div> <div><span># by the hash table.</span></div> <div><span>#&nbsp;</span><wbr></div> <div><span># The default is to use this millisecond 10 times every second in order to</span></div> <div><span># active rehashing the main dictionaries, freeing memory when possible.</span></div> <div><span>#</span></div> <div><span># If unsure:</span></div> <div><span># use "activerehashing no" if you have hard latency requirements and it is</span></div> <div><span># not a good thing in your environment that Redis can reply form time to time</span></div> <div><span># to queries with 2 milliseconds delay.</span></div> <div><span>#</span></div> <div><span># use "activerehashing yes" if you don't have such hard requirements but</span></div> <div><span># want to free memory asap when possible.</span></div> <div><span>#是否重置Hash表</span></div> <div><span> #设置成yes后redis将每100毫秒使用1毫秒CPU时间来对redis的hash表重新hash，可降低内存的使用</span></div> <div><span>#当使用场景有较为严格的实时性需求,不能接受Redis时不时的对请求有2毫秒的延迟的话，把这项配置为no。</span></div> <div><span>#如果没有这么严格的实时性要求,可以设置为 yes,以便能够尽可能快的释放内存</span></div> <div><strong>activerehashing yes</strong></div> <div><strong><br /></strong></div> <div> <div><strong>Redis官方文档对VM的使用提出了一些建议:</strong></div> <div> <ul><li><span>当key很小而value很大时,使用VM的效果会比较好.因为这样节约的内存比较大</span></li><li><span> 当key不小时,可以考虑使用一些非常方法将很大的key变成很大的value,如可将key,value组合成一个新的value</span></li><li><span>最好使用linux ext3 等对稀疏文件支持比较好的文件系统保存你的swap文件</span></li><li><span> vm-max-threads参数可设置访问swap文件的线程数，最好不要超过机器的核数；设置为0则所有对swap文件的操作都是串行的，可能会造成比较长时间的延迟,但是对数据完整性有很好的保证</span></li></ul> </div> </div> <div> <div><strong>redis数据存储</strong></div> <div><span>redis的存储分为内存存储、磁盘存储和log文件三部分，配置文件中有三个参数对其进行配置。</span></div> <div> <ul><li><span>save seconds updates，save配置，指出在多长时间内，有多少次更新操作，就将数据同步到数据文件。可多个条件配合，默认配置了三个条件。</span></li><li><span>appendonly yes/no ，appendonly配置，指出是否在每次更新操作后进行日志记录，如果不开启，可能会在断电时导致一段时间内的数据丢失。因为redis本身同步数据文件是按上面的save条件来同步的，所以有的数据会在一段时间内只存在于内存中。</span></li><li><span>appendfsync no/always/everysec ，appendfsync配置，no表示等操作系统进行数据缓存同步到磁盘，always表示每次更新操作后手动调用fsync()将数据写到磁盘，everysec表示每秒同步一次。</span></li></ul> </div> </div></strong></div><strong><br /></strong><p>&nbsp;</p></div><img src ="http://www.cppblog.com/HappySky2046/aggbug/207323.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/HappySky2046/" target="_blank">探路者</a> 2014-06-18 12:57 <a href="http://www.cppblog.com/HappySky2046/archive/2014/06/18/207323.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>error C2471</title><link>http://www.cppblog.com/HappySky2046/archive/2013/12/22/C2471.html</link><dc:creator>探路者</dc:creator><author>探路者</author><pubDate>Sun, 22 Dec 2013 10:25:00 GMT</pubDate><guid>http://www.cppblog.com/HappySky2046/archive/2013/12/22/C2471.html</guid><wfw:comment>http://www.cppblog.com/HappySky2046/comments/204947.html</wfw:comment><comments>http://www.cppblog.com/HappySky2046/archive/2013/12/22/C2471.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/HappySky2046/comments/commentRss/204947.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/HappySky2046/services/trackbacks/204947.html</trackback:ping><description><![CDATA[<p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">error C2471: 无法更新程序数据库&#8220;d:/Work/ Project/FBReader/debug/vc90.pdb&#8221;</p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">&nbsp;&nbsp; fatal error C1083: 无法打开程序数据库文件:&#8220;d:/Work/ Project/FBReader/debug/vc90.pdb&#8221;: No such file or directory ..</p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">解决方案：修改项目属性 右击项目 --&gt; "属性&#8221;</p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">1. &#8220;C/C++&#8221; --&gt; "常规&#8221; --&gt;&#8221;调试信息格式&#8221; 设置为 &#8220;C7 兼容(/Z7)&#8221;</p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">2. &#8220;C/C++&#8221; --&gt; "代码生成&#8221; --&gt;&#8221;启用字符串池&#8221; 设置为 &#8220;是(/GF)&#8221;</p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">3. &#8220;链接器&#8221; --&gt; "调试&#8221; --&gt;&#8221;生成调试信息&#8221; 设置为 &#8220;是(/DEBUG)&#8221;</p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;">如图：</p><p style="color: #333333; font-family: Arial; line-height: 26px; background-color: #ffffff;"><a href="http://hi.csdn.net/attachment/201105/23/0_1306134498S5Kl.gif" style="color: #220000; text-decoration: none;"><img title="0_1272007922DxD0" src="http://hi.csdn.net/attachment/201105/23/0_1306134499V7SS.gif" border="0" alt="0_1272007922DxD0" width="644" height="473" style="border: 0px none; display: inline;" /></a></p><img src ="http://www.cppblog.com/HappySky2046/aggbug/204947.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/HappySky2046/" target="_blank">探路者</a> 2013-12-22 18:25 <a href="http://www.cppblog.com/HappySky2046/archive/2013/12/22/C2471.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>不要为每一天而后悔</title><link>http://www.cppblog.com/HappySky2046/archive/2012/08/05/186340.html</link><dc:creator>探路者</dc:creator><author>探路者</author><pubDate>Sun, 05 Aug 2012 05:27:00 GMT</pubDate><guid>http://www.cppblog.com/HappySky2046/archive/2012/08/05/186340.html</guid><wfw:comment>http://www.cppblog.com/HappySky2046/comments/186340.html</wfw:comment><comments>http://www.cppblog.com/HappySky2046/archive/2012/08/05/186340.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/HappySky2046/comments/commentRss/186340.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/HappySky2046/services/trackbacks/186340.html</trackback:ping><description><![CDATA[<span style="color: #464646; font-family: 宋体; font-size: 16px; line-height: 24px; text-align: left; text-indent: 32px; background-color: #bcd3e5; ">&nbsp; 事效率绝对非常高，与之</span><span style="color: #464646; font-family: 宋体; font-size: 16px; line-height: 24px; text-align: left; text-indent: 32px; background-color: #bcd3e5; ">前</span><span style="color: #464646; font-family: 宋体; font-size: 16px; line-height: 24px; text-align: left; text-indent: 32px; background-color: #bcd3e5; ">在</span><span style="color: #464646; font-family: 宋体; font-size: 16px; line-height: 24px; text-align: left; text-indent: 32px; background-color: #bcd3e5; ">其它公司的实习经历， 以及自己在实验室的研究经历相比，更像是把好几天的事情压缩在一天完成。每个人都在同时处理多个不同的项目，对个人时间管理、项目管理、与他人协作的要求 格外高。第一件亟待学习的事情就是制订和执行计划，安排现有任务的轻重缓急。也因此在每天结束时，回</span><span style="color: #464646; font-family: 宋体; font-size: 16px; line-height: 24px; text-align: left; text-indent: 32px; background-color: #bcd3e5; ">顾一天工作，会格外有成就感。在实习结束时</span><span style="color: #464646; font-family: 宋体; font-size: 16px; line-height: 24px; text-align: left; text-indent: 32px; background-color: #bcd3e5; ">，可以自豪 的说，没有为任何一天而后悔。</span>&nbsp;<br /><span style="color: #464646; font-family: 宋体; font-size: 16px; line-height: 24px; text-align: left; text-indent: 32px; background-color: #bcd3e5; ">&nbsp; 几乎每天都在学习新东西、认识新人的新鲜感和兴奋感。</span><span style="color: #464646; font-family: 宋体; font-size: 16px; line-height: 24px; text-align: left; text-indent: 32px; background-color: #bcd3e5; ">项目和产品所涉及的，往往也包括当前业内最优秀最炙手可热的技术，加上不断变化的金融领域需求，和日趋复杂的项目管理，每天也都要不断的通过询 问其他同事、网上学校、内部培训等等渠道尽可能的学习。有些</span><span xml:lang="EN-US" style="word-wrap: normal; word-break: normal; line-height: 24px; color: #464646; font-family: 宋体; font-size: 16px; text-align: left; text-indent: 32px; background-color: #bcd3e5; ">team</span><span style="color: #464646; font-family: 宋体; font-size: 16px; line-height: 24px; text-align: left; text-indent: 32px; background-color: #bcd3e5; ">专注于某项技术，深度发掘；有些</span><span xml:lang="EN-US" style="word-wrap: normal; word-break: normal; line-height: 24px; color: #464646; font-family: 宋体; font-size: 16px; text-align: left; text-indent: 32px; background-color: #bcd3e5; ">team</span><span style="color: #464646; font-family: 宋体; font-size: 16px; line-height: 24px; text-align: left; text-indent: 32px; background-color: #bcd3e5; ">需要用到的技术比较广泛，要在短时间内了解多种流程，多个系统之间相互关系；有些</span><span xml:lang="EN-US" style="word-wrap: normal; word-break: normal; line-height: 24px; color: #464646; font-family: 宋体; font-size: 16px; text-align: left; text-indent: 32px; background-color: #bcd3e5; ">team</span><span style="color: #464646; font-family: 宋体; font-size: 16px; line-height: 24px; text-align: left; text-indent: 32px; background-color: #bcd3e5; ">则更需要熟悉了解业务层的知识。但无论怎样，都需要快速学习能力和协作能力。每天都被鼓励要积极提问，积极思考，最大化利用一切可能的资源，加速学习过程。</span>&nbsp;<img src ="http://www.cppblog.com/HappySky2046/aggbug/186340.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/HappySky2046/" target="_blank">探路者</a> 2012-08-05 13:27 <a href="http://www.cppblog.com/HappySky2046/archive/2012/08/05/186340.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>