<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jaunty@软件测试，音乐，还有不一样的生活 &#187; linux</title>
	<atom:link href="http://jaunty.me/blog/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://jaunty.me/blog</link>
	<description>软件测试，自动化测试，QTP，Loadrunner，Java，软件开发，性能测试，开源</description>
	<lastBuildDate>Mon, 25 Jul 2011 16:43:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>mediawiki上传文件遇到错误</title>
		<link>http://jaunty.me/blog/2011/04/mediawiki%e4%b8%8a%e4%bc%a0%e6%96%87%e4%bb%b6%e9%81%87%e5%88%b0%e9%94%99%e8%af%af/</link>
		<comments>http://jaunty.me/blog/2011/04/mediawiki%e4%b8%8a%e4%bc%a0%e6%96%87%e4%bb%b6%e9%81%87%e5%88%b0%e9%94%99%e8%af%af/#comments</comments>
		<pubDate>Wed, 20 Apr 2011 10:25:26 +0000</pubDate>
		<dc:creator>jaunty</dc:creator>
				<category><![CDATA[unix系统]]></category>
		<category><![CDATA[札记]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[其他]]></category>

		<guid isPermaLink="false">http://jaunty.me/blog/?p=211</guid>
		<description><![CDATA[从mediawiki上传文件遇到错误&#8212; “上传目录（public）不存在或无写权限” 分析了一下mediawiki的结构发现所有的上传的文件是保存在mediawiki的目录image下面的。 这个错误的意思是说 image这个目录要么不存在要么没有写权限。  （回忆了一下上次换apache，所有的系统都是直接copy过去的，权限估计改变了） chmod 777 -R image 解决问题]]></description>
			<content:encoded><![CDATA[<p>从mediawiki上传文件遇到错误&#8212; “上传目录（public）不存在或无写权限”</p>
<p>分析了一下mediawiki的结构发现所有的上传的文件是保存在mediawiki的目录image下面的。</p>
<p>这个错误的意思是说 image这个目录要么不存在要么没有写权限。 </p>
<p>（回忆了一下上次换apache，所有的系统都是直接copy过去的，权限估计改变了）</p>
<p>chmod 777 -R image 解决问题</p>
]]></content:encoded>
			<wfw:commentRss>http://jaunty.me/blog/2011/04/mediawiki%e4%b8%8a%e4%bc%a0%e6%96%87%e4%bb%b6%e9%81%87%e5%88%b0%e9%94%99%e8%af%af/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Loadrunner的loadgenerator在linux上的配置和部署 &#8211; 使用非RSH连接</title>
		<link>http://jaunty.me/blog/2011/03/loadrunner%e7%9a%84loadgenerator%e5%9c%a8linux%e4%b8%8a%e7%9a%84%e9%85%8d%e7%bd%ae%e5%92%8c%e9%83%a8%e7%bd%b2-%e4%bd%bf%e7%94%a8%e9%9d%9ersh%e8%bf%9e%e6%8e%a5/</link>
		<comments>http://jaunty.me/blog/2011/03/loadrunner%e7%9a%84loadgenerator%e5%9c%a8linux%e4%b8%8a%e7%9a%84%e9%85%8d%e7%bd%ae%e5%92%8c%e9%83%a8%e7%bd%b2-%e4%bd%bf%e7%94%a8%e9%9d%9ersh%e8%bf%9e%e6%8e%a5/#comments</comments>
		<pubDate>Wed, 30 Mar 2011 04:02:28 +0000</pubDate>
		<dc:creator>jaunty</dc:creator>
				<category><![CDATA[性能测试]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Loadrunner]]></category>

		<guid isPermaLink="false">http://jaunty.me/blog/?p=209</guid>
		<description><![CDATA[1. 先以root登陆要安装load generator的unix服务器。（目前仅支持uname=linux,SunOS,AIX,HP-UX） 2. 将LR的unix插件copy到服务器上并解压。 3. 运行install.sh 的脚本调起安装的wizard。 Next-&#62;Agree-&#62;Confirm Install-&#62;Finish (安装的log写在/tmp目录下) 4. 检查目录/opt/HP/HP_LoadGenerator （这个就是loadruner的服务器端插件的主目录了） 5. 设置设置几个环境变量 LR自带的是csh下的脚本，bash的脚本自己写，然后设置好切shell的时候自动source相应的脚本执行。 CSH下的脚本： #!/bin/csh setenv PRODUCT_DIR /opt/HP/HP_LoadGenerator setenv M_LROOT $PRODUCT_DIR if ( `uname` == SunOS ) then setenv LD_LIBRARY_PATH ${M_LROOT}/bin else if ( `uname` == Linux ) then setenv LD_LIBRARY_PATH ${M_LROOT}/bin:${M_LROOT}/lib:/usr/lib else if ( `uname` == AIX ) then setenv [...]]]></description>
			<content:encoded><![CDATA[<p>1. 先以root登陆要安装load generator的unix服务器。（目前仅支持uname=linux,SunOS,AIX,HP-UX）</p>
<p>2. 将LR的unix插件copy到服务器上并解压。</p>
<p>3. 运行install.sh 的脚本调起安装的wizard。 Next-&gt;Agree-&gt;Confirm Install-&gt;Finish (安装的log写在/tmp目录下)</p>
<p>4. 检查目录/opt/HP/HP_LoadGenerator （这个就是loadruner的服务器端插件的主目录了）</p>
<p>5. 设置设置几个环境变量</p>
<p>LR自带的是csh下的脚本，bash的脚本自己写，然后设置好切shell的时候自动source相应的脚本执行。</p>
<p><strong>CSH下的脚本：</strong></p>
<pre>#!/bin/csh
setenv PRODUCT_DIR /opt/HP/HP_LoadGenerator
setenv M_LROOT $PRODUCT_DIR

if ( `uname` == SunOS ) then
setenv LD_LIBRARY_PATH ${M_LROOT}/bin
else if ( `uname` == Linux ) then
setenv LD_LIBRARY_PATH ${M_LROOT}/bin:${M_LROOT}/lib:/usr/lib
else if ( `uname` == AIX ) then
setenv LIBPATH ${M_LROOT}/bin
else if ( `uname` == HP-UX ) then
setenv SHLIB_PATH ${M_LROOT}/bin
endif

setenv DISPLAY 0.0

setenv PATH ${M_LROOT}/bin:$PATH</pre>
<p>注意：</p>
<p>1.这里Loadrunner原始的脚本给LD_LIBRARY_PATH的设置的值是${M_LROOT}/bin，实则library应该指向安装目录的/opt/HP/HP_LoadGenerator/lib下。</p>
<p>因此给LD_LIBRARY_PATH设置值为${M_LROOT}/bin:${M_LROOT}/lib:/usr/lib   （这里M_LROOT=/opt/HP/HP_LoadGenerator）</p>
<p>2.原始Loadrunner只提供了CSH的脚本，bash的自己写一份了，下面是自己写的</p>
<p><strong>BASH的脚本</strong></p>
<pre>#/bin/bash
export PRODUCT_DIR=/opt/HP/HP_LoadGenerator
export M_LROOT=$PRODUCT_DIR
export LD_LIBRARY_PATH=$M_LROOT/bin:$M_LROOT/lib:/usr/lib
export DISPLAY='0.0'
export PATH=$PATH:$M_LROOT/bin</pre>
<p>注：没按照原始文件根据uname判断来给LD_LIBRARY_PATH执行不同的值。</p>
<p>6. 在不同shell的配置里source这两个文件使得切换shell后执行  (以下方法仅适用于CENTOS-linux系统)</p>
<p><strong>CSH</strong></p>
<p><strong>给文件/etc/csh.cshrc 最后增加 </strong>source /opt/HP/HP_LoadGenerator/env.csh</p>
<p><strong>BASH</strong></p>
<p><strong>给文件/etc/profile 最后增加</strong> source /opt/HP/HP_LoadGenerator/env.sh</p>
<p>7.切换SHELL 让source的程序文件执行生效或自己手动执行</p>
<p>8.检查loadrunner配置环境</p>
<p>进入/opt/HP/HP_Loadrunner下，运行verify_generator</p>
<p>[jaunty@localhost bin]$ ./verify_generator<br />
===================================================<br />
HP<br />
Vuser Environment Verification Utility<br />
===================================================</p>
<p>Product: HP LoadRunner 9.50<br />
Version: 09.50.0000<br />
Build: 3378<br />
localhost.localdomain:</p>
<ul>
<li>提示找不到libstdc++.so.5, 就是缺libstdc++5相关包</li>
</ul>
<p>解决办法:<br />
yum -y install libstdc++.so.5<br />
/opt/HP/HP_LoadGenerator/bin/lrv/chk_thread_lmt: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory<br />
/opt/HP/HP_LoadGenerator/bin/lrv/limithost: line 134: [: : integer expression expected<br />
verify_generator&#8230;OK<br />
/opt/HP/HP_LoadGenerator/bin/lrv/chk_sems_lmt: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory<br />
/opt/HP/HP_LoadGenerator/bin/lrv/limithost: line 154: [: : integer expression expected<br />
verify_generator&#8230;OK<br />
verify_generator&#8230;OK<br />
Don&#8217;t forget to make sure that the name of the controller machine<br />
is also in .rhosts<br />
Verify $M_LROOT &#8230;Failed<br />
_____It was not possible to set the $M_LROOT from<br />
_____the shell dot files. One of several things might be happening:<br />
_____1) $M_LROOT is not set at all in the shell dot files.<br />
_____2) There is some error in the shell dot files which stops their execution<br />
_____ before it sets $M_LROOT.<br />
_____3) There is conditional code in the shell dot files (most likely related to<br />
_____ interactive and non interactive shells) and $M_LROOT is set<br />
_____ only in one of the sections.<br />
_____Aborting virtual user tests on host localhost.localdomain<br />
verify_generator&#8230;OK<br />
_______________________________________________</p>
<p>Summary:<br />
________<br />
Vuser Host localhost.localdomain: Failed</p>
<p>只要verify 都通过没有错就可以了。如果其他的没错仅有Verify $M_LROOT &#8230;Failed ，也可以继续使用。</p>
<p>9. 确认防火墙已经关闭</p>
<p>10.运行 m_daemon_setup -install 成功会获取一个 processid</p>
<p>PS -auxww| grep m_agent</p>
<p>可以看到启动起来的进程信息</p>
<p>11.然后在本地的pc测试机里打开controller，设置load generator 不用RSH ，连接后变为ready 成功.</p>
<p>12.如果本地connet不上，则先检查服务器和本地测试pc之间的网络互通性再检查两端的防火墙设置。如果还有问题则可在服务器的/tmp目录下看到很多Loadruner agent产生的log，根据时间定位，打开查看细节问题。</p>
]]></content:encoded>
			<wfw:commentRss>http://jaunty.me/blog/2011/03/loadrunner%e7%9a%84loadgenerator%e5%9c%a8linux%e4%b8%8a%e7%9a%84%e9%85%8d%e7%bd%ae%e5%92%8c%e9%83%a8%e7%bd%b2-%e4%bd%bf%e7%94%a8%e9%9d%9ersh%e8%bf%9e%e6%8e%a5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bugzilla安装配置实录- -3</title>
		<link>http://jaunty.me/blog/2011/01/bugzilla%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%ae%e5%ae%9e%e5%bd%95-3/</link>
		<comments>http://jaunty.me/blog/2011/01/bugzilla%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%ae%e5%ae%9e%e5%bd%95-3/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 09:13:42 +0000</pubDate>
		<dc:creator>jaunty</dc:creator>
				<category><![CDATA[测试管理]]></category>
		<category><![CDATA[软件测试]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[bugzilla]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://jaunty.me/blog/?p=201</guid>
		<description><![CDATA[安装及配置bugzilla 1.安装bugzilla 下载bugzilla http://www.bugzilla.org/download/ 在/usr/local下解压 Make Make test Install 2.安装perl module cd /usr/local/bugzilla ./checksetup.pl （可以检查针对bugzilla的安装的条件还缺少什么） ./install-module.pl –all （安装所有的perl module） (./install-module.pl module::name 安装指定的模块) 装完后还需要额外安装一些模块例如 DBD-mysql (v.4.00) GD(V1.20) Chart(V1.0) Template-GD(any) GDText 模块安装完成后在bugzilla的目录下会生成一个localconfig文件 * 注：有些模块可能装不成功，则就自行手动安装，安装完成后再用./checksetup来检测安装的状态。例如 Datetime：locale 模块没有。则可以用bugzilla的install-module的指定安装或者自己到下载源代码包手动编译安装 3．配置mysql数据库针对bugzilla的设置 vi /etc/my.cnf (my.cnf 有些系统安装完后不一定在这个位置。找到你的mysql启动时调用的那个配置文件，修改之) 加入下面的内容: max_allowed_packet=4M ft_min_word_len=2  4.修改bugzilla配置文件，配置bugzilla与数据的关系 进入bugzilla目录下 Vi localconfig 修改下面的内容 $webservergroup=’daemon’ （和你运行的apache webserver配置的群组相同，apache默认是daemon） $db_driver=’mysql’ (有的是用的postgresql那么就写入相应的db名称) $db_host = ‘localhost’; [...]]]></description>
			<content:encoded><![CDATA[<p><strong>安装及配置bugzilla</strong></p>
<p>1.安装bugzilla</p>
<p>下载bugzilla <a href="http://www.bugzilla.org/download/">http://www.bugzilla.org/download/</a></p>
<p>在/usr/local下解压</p>
<p>Make</p>
<p>Make test</p>
<p>Install</p>
<p>2.安装perl module</p>
<p>cd /usr/local/bugzilla</p>
<p>./checksetup.pl （可以检查针对bugzilla的安装的条件还缺少什么）</p>
<p>./install-module.pl –all （安装所有的perl module）</p>
<p>(./install-module.pl module::name 安装指定的模块)</p>
<p>装完后还需要额外安装一些模块例如</p>
<p>DBD-mysql (v.4.00)</p>
<p>GD(V1.20)</p>
<p>Chart(V1.0)</p>
<p>Template-GD(any)</p>
<p>GDText</p>
<p>模块安装完成后在bugzilla的目录下会生成一个localconfig文件</p>
<p>* 注：有些模块可能装不成功，则就自行手动安装，安装完成后再用./checksetup来检测安装的状态。例如 Datetime：locale 模块没有。则可以用bugzilla的install-module的指定安装或者自己到下载源代码包手动编译安装<span id="more-201"></span></p>
<p>3．配置mysql数据库针对bugzilla的设置</p>
<p>vi /etc/my.cnf</p>
<p>(my.cnf 有些系统安装完后不一定在这个位置。找到你的mysql启动时调用的那个配置文件，修改之)</p>
<p>加入下面的内容:</p>
<p>max_allowed_packet=4M</p>
<p>ft_min_word_len=2</p>
<p> 4.修改bugzilla配置文件，配置bugzilla与数据的关系</p>
<p>进入bugzilla目录下</p>
<p>Vi localconfig</p>
<p>修改下面的内容</p>
<p>$webservergroup=’daemon’ （和你运行的apache webserver配置的群组相同，apache默认是daemon）</p>
<p>$db_driver=’mysql’ (有的是用的postgresql那么就写入相应的db名称)</p>
<p>$db_host = ‘localhost’;</p>
<p>$db_name = ‘bugs; (你的mysql里给bugzilla建的数据库，写入相应的名字即可不一定要叫bugs)</p>
<p>$db_user = ‘bugs‘;  （给for给bugzilla的db建立的用户）</p>
<p>$db_pass = “123&#8243;;(登陆bugzilla的db的密码，个人设定);</p>
<p>$db_ports=’3306’ /指定DB的端口，mysql默认是3306</p>
<p>：q! 退出文件保存</p>
<p>5.创建数据库</p>
<p>登陆mysql</p>
<p>Mysql –umysql –p对应的密码</p>
<p>use mysql;  /使用mysql的database</p>
<p>Create database bugs; /给bugzilla建一个库</p>
<p>GRANT ALL PRIVILEGE ON bugs.* TO bugs@localhost IDENTIFIED BY ‘$db_pass’; /把bugs库下所有表都给本机的bugs用户赋予所有权限，$db_pass是在bugzilla里设置的bugzilla登陆库的用户密码。</p>
<p>SELECT * FROM information_schema.user_privileges; /查看已经赋予的权限</p>
<p>6．用bugzilla来初始化数据表</p>
<p>./checksetup</p>
<p>运行过程中注意检测的错误，逐个修复，不要中断,尤其是在初始化数据库的时候。否则还得重建清理数据库或者建库。</p>
<p>过程中会需要给bugzilla建立admin等。</p>
<p>在cmd窗口中可以看到数据库中创建相应的表结构.表结构创建完后,提示要求输入管理帐号的邮件,real name和密码,输入后,继续执行,直到提示”Now that you have installed Bugzilla&#8230;&#8230;”.安装完成。</p>
<p>7. 发布bugzilla</p>
<p>Bugzilla已经配置完成，设置apache发布整站。</p>
<p>进入apache的htdocs目录</p>
<p>&lt;1&gt;. 在下面建立一个软链接，链接到安装配置好的bugzilla的目录下。既相当于在apache的htdocs下面有一个快捷方式到bugzilla的安装目录下。</p>
<p>ln –s  源文件所在目录（源目录名称）    htdocs下的目录名称（快捷方式名称） </p>
<p>&lt;2&gt;.配置apache的主程序</p>
<p>修改apache的配置文件httpd.conf</p>
<p>AddHandler cgi-script .cgi   /配置CGI访问需要把下面这一句前面的#给去掉<br />
修改apache的缺省访问文件：在DirectoryIndex index.html index.html.var后面添加一个index.cgi</p>
<p>修改Options Indexes FollowSymLinks 为 Options Indexes FollowSymLinks ExecCGI</p>
<p>加入以下for给buzilla的webserver 配置<br />
Alias /bugzilla “/usr/local/apache2/htdocs/bugzilla”</p>
<p>&lt;Directory “/usr/local/apache2/htdocs/bugzilla”&gt;</p>
<p>    Options +ExecCGI Indexes</p>
<p>    AllowOverride Limit</p>
<p>    Order Allow,Deny</p>
<p>    Allow from all</p>
<p>&lt;/Directory&gt;</p>
<p><span style="color: #993300;">注：也可以将bugzilla的apache配置写入一个文件例如存成 bugzilla.conf ，然后在apache的主配置文件里include进来</span></p>
<p><span style="color: #993300;">例如：</span></p>
<p><span style="color: #993300;">建立单独的apache的虚拟目录</span></p>
<p><span style="color: #993300;">在bugzilla到目录下创建一个配置文件bugzilla.conf</span></p>
<p><span style="color: #993300;">输入以下内容：</span></p>
<p><span style="color: #993300;">Alias /bugzilla/ “<strong> </strong>/usr/local/apache2/htdocs/bugzilla/”</span></p>
<p><span style="color: #993300;">Alias /bugzilla “<strong> </strong>/usr/local/apache2/htdocs/bugzilla”</span></p>
<p><span style="color: #993300;"> </span></p>
<p><span style="color: #993300;">&lt;Directory “<strong> </strong>/usr/local/apache2/htdocs/bugzilla”&gt;<br />
Options +ExecCGI Indexes</span></p>
<p><span style="color: #993300;">AllowOverride Limit</span></p>
<p><span style="color: #993300;">Order Allow,Deny</span></p>
<p><span style="color: #993300;">Allow from all</span></p>
<p><span style="color: #993300;">&lt;/Directory&gt;</span></p>
<p><span style="color: #993300;">然后修改httpd.conf，在最后添加一句话：</span></p>
<p><span style="color: #993300;">Include “/usr/local/bugzilla/conf/bugzilla.conf”用于包含该配置文件。</span></p>
]]></content:encoded>
			<wfw:commentRss>http://jaunty.me/blog/2011/01/bugzilla%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%ae%e5%ae%9e%e5%bd%95-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bugzilla安装配置实录- -2</title>
		<link>http://jaunty.me/blog/2011/01/bugzilla%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%ae%e5%ae%9e%e5%bd%95-2/</link>
		<comments>http://jaunty.me/blog/2011/01/bugzilla%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%ae%e5%ae%9e%e5%bd%95-2/#comments</comments>
		<pubDate>Wed, 12 Jan 2011 08:46:04 +0000</pubDate>
		<dc:creator>jaunty</dc:creator>
				<category><![CDATA[测试管理]]></category>
		<category><![CDATA[软件测试]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[bugzilla]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://jaunty.me/blog/?p=198</guid>
		<description><![CDATA[安装apache: 1. 下载apache http://apache.etoak.com//httpd/httpd-2.2.17.tar.gz 2. copy到安装目录并解压 cp xx/httpd-2.2.17.tar.gz /usr/local/ tar -zxf httpd-2.2.17.tar.gz 3. 配置安装项及安装目录 ./configure –prefix = /usr/local/apache2 –enable-module=so (&#60;-动态模块启动) 4. 编译 make 5. 编译安装 make install 6. 启动apache /usr/local/apache2/bin/httpd-k start  (/stop/restart) 启动成功后 找一个可以访问该服务器所在ip的机器，直接访问http://ip 可以打开一个apache的测试页面。 注:apache安装启动时常见的错误 &#60;1&#62; 启动时提示无法determain qulify 的severname 原因：因为http.conf里没有指定servername 解决方法：进入http.conf中加一个servername &#60;2&#62; 启动时提示fail to enable the “httpready” accept filter 原因：这是apache22自己的一个bug,不能启动freebsd自带的一个基于http端口过滤的模块 解决方法： kldload accf_http 打开/boot/defaults/loader.conf，加入下面两行，以便下次启动自动装载模块 [...]]]></description>
			<content:encoded><![CDATA[<p><strong>安装apache:</strong></p>
<p>1. 下载apache<br />
<a href="http://apache.etoak.com/httpd/httpd-2.2.17.tar.gz">http://apache.etoak.com//httpd/httpd-2.2.17.tar.gz</a></p>
<p>2. copy到安装目录并解压</p>
<p>cp xx/httpd-2.2.17.tar.gz /usr/local/</p>
<p>tar -zxf httpd-2.2.17.tar.gz</p>
<p>3. 配置安装项及安装目录</p>
<p>./configure –prefix = /usr/local/apache2 –enable-module=so (&lt;-动态模块启动)</p>
<p>4. 编译<br />
make</p>
<p>5. 编译安装<br />
make install<span id="more-198"></span></p>
<p>6. 启动apache<br />
/usr/local/apache2/bin/httpd-k start  (/stop/restart)</p>
<p>启动成功后 找一个可以访问该服务器所在ip的机器，直接访问<a href="http://ip/">http://ip</a> 可以打开一个apache的测试页面。</p>
<p><span style="color: #993300;">注:apache安装启动时常见的错误</span></p>
<p><span style="color: #993300;">&lt;1&gt; 启动时提示无法determain qulify 的severname</span></p>
<p><span style="color: #993300;">原因：因为http.conf里没有指定servername</span></p>
<p><span style="color: #993300;">解决方法：进入http.conf中加一个servername</span></p>
<p><span style="color: #993300;">&lt;2&gt; 启动时提示fail to enable the “httpready” accept filter</span></p>
<p><span style="color: #993300;">原因：这是apache22自己的一个bug,不能启动freebsd自带的一个基于http端口过滤的模块</span></p>
<p><span style="color: #993300;">解决方法：</span></p>
<p><span style="color: #993300;">kldload accf_http</p>
<p></span></p>
<p><span style="color: #993300;">打开/boot/defaults/loader.conf，加入下面两行，以便下次启动自动装载模块</span></p>
<p><span style="color: #993300;">accf_data_load=”YES”</span></p>
<p><span style="color: #993300;">accf_http_load=”YES”</p>
<p></span></p>
<p><span style="color: #993300;">重启机器</span></p>
<p><span style="color: #993300;">（kldload是用来加载kernel的模块，列出所有的模块用kldstat，把文件从内核中卸载用kldunload）</span></p>
<p>7. 修改apache的一些配置</p>
<p>cd /usr/local/apache2/conf</p>
<p>vi httpd.conf</p>
<p>serveradmin=xxx@xxx.xx</p>
<p>documentroot “/usr/local/apache/htdocs”</p>
]]></content:encoded>
			<wfw:commentRss>http://jaunty.me/blog/2011/01/bugzilla%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%ae%e5%ae%9e%e5%bd%95-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ttserver(tokyotyrant server)安装（附带遇到的问题解决）</title>
		<link>http://jaunty.me/blog/2010/06/ttserver_installation_and_troubleshooting/</link>
		<comments>http://jaunty.me/blog/2010/06/ttserver_installation_and_troubleshooting/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 13:13:09 +0000</pubDate>
		<dc:creator>jaunty</dc:creator>
				<category><![CDATA[unix系统]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ttserver]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://jaunty.me/blog/?p=167</guid>
		<description><![CDATA[要配置测试环境需要一个代替memcache的server，于是乎配了ttserver（tokyotyrant）。不知道这是什么东东的童鞋去google一下。 以下安装全部基于FreeBSD 7.2系统。 1.安装ttserver &#60;1&#62;官网下载ttserver http://1978th.net/tokyotyrant/  &#60;2&#62;把下载下来的包用sftp拉到服务器上，放到/usr/local下 &#60;3&#62; tar -zxf tokyotyrant-版本号.tar.gz &#60;4&#62;cd 到解压的tokyotyrant目录下 &#60;5&#62; ./configure           这时候出错，提示 checking for tcutil.h&#8230; no configure: error: tcutil.h is required 发现没有装tokyoCarbinet. 2. 安装tokyoCarbinet &#60;1&#62;官网下载tokyoCarbinethttp://1978th.net/tokyocabinet/  &#60;2&#62;把下载下来的包用sftp拉到服务器上，放到/usr/local下 &#60;3&#62;tar -zxf tokyocarbinet-版本号.tar.gz &#60;4&#62;cd 到解压的tokyoCarbinet目录下 &#60;5&#62;./configure &#60;6&#62;make 这时候出错 LD_RUN_PATH=/lib:/usr/lib:/usr/local/lib:/root/lib:/usr/local/lib:/usr/local/lib:. gcc -g -O2 -std=c99 -Wall -fPIC -fsigned-char -O2 -o tcutest  -L. -L/usr/local/lib -L/root/lib -L/usr/local/lib  -ltokyocabinet -lbz2 [...]]]></description>
			<content:encoded><![CDATA[<p>要配置测试环境需要一个代替memcache的server，于是乎配了ttserver（tokyotyrant）。不知道这是什么东东的童鞋去google一下。</p>
<p>以下安装全部基于FreeBSD 7.2系统。</p>
<p>1.安装ttserver</p>
<p>&lt;1&gt;官网下载ttserver <a href="http://1978th.net/tokyotyrant/">http://1978th.net/tokyotyrant/</a> </p>
<p>&lt;2&gt;把下载下来的包用sftp拉到服务器上，放到/usr/local下</p>
<p>&lt;3&gt; tar -zxf tokyotyrant-版本号.tar.gz</p>
<p>&lt;4&gt;cd 到解压的tokyotyrant目录下</p>
<p>&lt;5&gt; ./configure<br />
          这时候出错，提示</p>
<p><span id="more-167"></span></p>
<table style="width: 225px; height: 40px;" border="0" cellspacing="0" cellpadding="0" width="225">
<colgroup span="1">
<col span="1" width="402"></col>
</colgroup>
<tbody>
<tr height="38">
<td width="402" height="38">checking for tcutil.h&#8230; no<br />
configure: error: tcutil.h is required</td>
</tr>
</tbody>
</table>
<p>发现没有装tokyoCarbinet.</p>
<p>2. 安装tokyoCarbinet</p>
<p>&lt;1&gt;官网下载tokyoCarbinet<a href="http://1978th.net/tokyocabinet/">http://1978th.net/tokyocabinet/</a> </p>
<p>&lt;2&gt;把下载下来的包用sftp拉到服务器上，放到/usr/local下</p>
<p>&lt;3&gt;tar -zxf tokyocarbinet-版本号.tar.gz</p>
<p>&lt;4&gt;cd 到解压的tokyoCarbinet目录下</p>
<p>&lt;5&gt;./configure</p>
<p>&lt;6&gt;make</p>
<p>这时候出错</p>
<table style="width: 622px; height: 157px;" border="0" cellspacing="0" cellpadding="0" width="622">
<colgroup span="1">
<col span="1" width="595"></col>
</colgroup>
<tbody>
<tr height="209">
<td width="595" height="209">LD_RUN_PATH=/lib:/usr/lib:/usr/local/lib:/root/lib:/usr/local/lib:/usr/local/lib:. gcc -g -O2 -std=c99 -Wall -fPIC -fsigned-char -O2 -o tcutest  -L. -L/usr/local/lib -L/root/lib -L/usr/local/lib  -ltokyocabinet -lbz2 -lz -lrt -lpthread -lm -lc<br />
/usr/lib/crt1.o(.text+0x8a): In function `_start&#8217;:<br />
: undefined reference to `main&#8217;<br />
*** Error code 1Stop in /usr/local/tokyocabinet-1.4.45.</td>
</tr>
</tbody>
</table>
<p> </p>
<p>&lt;5&gt;  去网上找了下tc的makefile需要gmake来编译，因为我是bsd系统，所以去下了gmake然后装上后回头运行（安装gmake中也遇到很多问题，下篇文章再介绍）<br />
gmake</p>
<p>&lt;6&gt;make install （tc安装结束）</p>
<p>下面回到ttserver的安装</p>
<p>重新运行</p>
<table border="0" cellspacing="0" cellpadding="0" width="203">
<colgroup span="1">
<col span="1" width="203"></col>
</colgroup>
<tbody>
<tr height="57">
<td width="203" height="57">./configure<br />
make<br />
make install</td>
</tr>
</tbody>
</table>
<p>install完成后 ttserver安装结束。</p>
<p>3. 启动并测试ttserver</p>
<p>&lt;1&gt;启动ttserver<br />
        进入 ttserver的目录下运行</p>
<p>ttserver -host 127.0.0.1 -port 11211 -thnum 8 -dmn -pid /ttserver/ttserver.pid -log /ttserver/ttserver.log -le -ulog /ttserver/ -ulim 128m -sid 1 -rts /ttserver/ttserver.rts /ttserver/database.tch</p>
<p>运行了上面启动server的命令后遇到错误</p>
<p>ttserver -host 127.0.0.1 -port 11211 -thnum 8 -dmn -pid /ttserver/ttserver.pid -log /ttserver/ttserver.log -le -ulog /ttserver/ -ulim 128m -sid 1 -rts /ttserver/ttserver.rts /ttserver/database.tch<br />
mtree: line 6: unknown group wheel</p>
<p>经检查是因为我之前把自己的bsd里的wheel给删除了，运行pw groupadd wheel （加了一个wheel组）后回头重新运行上面启动server的命令就好了。</p>
<p>(ttserver的每个参数具体含义 运行 ttserver &#8211;h 查看)</p>
<p>ttserver -host -port -thnum -tout [-dmn] -pid -log [-ld|-le] -ulog -ulim [-uas] -sid -mhost -mport -rts [dbname]</p>
<pre>　　-host name : 指定需要绑定的服务器域名或IP地址。默认绑定这台服务器上的所有IP地址。
　　-port num : 指定需要绑定的端口号。默认端口号为1978
　　-thnum num : 指定线程数。默认为8个线程。
　　-tout num : 指定每个会话的超时时间（单位为秒）。默认永不超时。
　　-dmn : 以守护进程方式运行。
　　-pid path : 输出进程ID到指定文件（这里指定文件名）。
　　-log path : 输出日志信息到指定文件（这里指定文件名）。
　　-ld : 在日志文件中还记录DEBUG调试信息。
　　-le : 在日志文件中仅记录错误信息。
　　-ulog path : 指定同步日志文件存放路径（这里指定目录名）。
　　-ulim num : 指定每个同步日志文件的大小（例如128m）。
　　-uas : 使用异步IO记录更新日志（使用此项会减少磁盘IO消耗，但是数据会先放在内存中，不会立即写入磁盘，如果重启服务器或ttserver进程被kill掉，将导致部分数据丢失。一般情况下不建议使用）。
　　-sid num : 指定服务器ID号（当使用主辅模式时，每台ttserver需要不同的ID号）
　　-mhost name : 指定主辅同步模式下，主服务器的域名或IP地址。
　　-mport num : 指定主辅同步模式下，主服务器的端口号。
　　-rts path : 指定用来存放同步时间戳的文件名。</pre>
<p>&lt;2&gt; 测试 ttserver是否可用</p>
<p>利用curl命令调用</p>
<p>写数据：</p>
<p> curl -X PUT <a href="http://127.0.0.1:11211/key">http://127.0.0.1:11211/key</a> -d “value”</p>
<p>读数据：</p>
<p>curl <a href="http://127.0.0.1:11211/key">http://127.0.0.1:11211/key</a><br />
（如果此时可以回显上一步写入的 value这个字符代表刚才的写入和现在的读取均成功）</p>
<p>删数据：</p>
<p>curl -X DELETE <a href="http://127.0.0.1:11211/key">http://127.0.0.1:11211/key</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jaunty.me/blog/2010/06/ttserver_installation_and_troubleshooting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

