<?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>PHP Stone &#187; webmin</title>
	<atom:link href="http://phpstone.com/tag/webmin/feed/" rel="self" type="application/rss+xml" />
	<link>http://phpstone.com</link>
	<description>——从石头向宝石进化</description>
	<lastBuildDate>Thu, 05 Aug 2010 14:04:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>安装用于测试MySQL的Perl模块</title>
		<link>http://phpstone.com/install-perl-module-for-test-mysql/</link>
		<comments>http://phpstone.com/install-perl-module-for-test-mysql/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 02:55:08 +0000</pubDate>
		<dc:creator>frePerl</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Perl]]></category>
		<category><![CDATA[webmin]]></category>

		<guid isPermaLink="false">http://phpstone.com/?p=359</guid>
		<description><![CDATA[在我使用Webmin(version 1.480)管理FreeBSD主机上的MySQL数据库服务器时出现：
“警告：您的系统未安装Perl 模块 DBI 和 DBD::mysql，Webmin将无法可靠地访问您的MySQL数据库。点击此处 立刻安装该它们。”
而“点击此处”安装时浏览器无法打开此链接，访问到MySQL手册上的相关资料在其它类Unix系统中安装MySQL，提示“如果安装了DBI和DBD::mysql  Perl模块，可以使用bin/mysql_setpermission脚本增加新账户。”
再查找“Perl安装注意事项”获取到相关的信息是：
“MySQL分发版不包含Perl支持。可以从http://search.cpan.org获得Unix需要的模块，或在Windows中使用ActiveState ppm程序。
如果你想要运行MySQL基准脚本，必须安装Perl支持。
如果你想要安装Perl支持，需要的文件能从http://search.cpan.org的CPAN (Comprehensive Perl Archive Network)获得。”
CPAN是个巨大的Perl软件收藏库，其收集大量有用的Perl模块及其相关文档。
在Unix中安装Perl模块最简单的方法是使用CPAN模块。
shell&#62; perl -MCPAN -e shell
cpan&#62; install DBI
cpan&#62; install DBD::mysql
DBD：：mysql安装运行许多测试。测试中使用默认用户名和密码尝试连接本地MySQL服务器。(默认用户名是Unix中的登录名和Windows中的ODBC。默认密码“没有密码。”) 如果你不能通过这些值连接服务器 (例如，如果你的账户有密码)，测试失败。可以使用force install DBD::mysql忽略失败的测试。
按要求操作，安装DBI时提示：
“Warning (usually harmless): &#8216;YAML&#8217; not installed, will not store persistent state”
YAML是以数据为中央的标记语言，其使用ASCII码（如连字符、问号、冒号、逗号等）构造数据块（标量值或哈希码）。和XML相同，YAML也是一种机器可识别语言，并能和多种脚本语言相结合，其中一种便是Perl。
考虑到YAML也可以当做是一个Perl模块，因此我尝试运行：
cpan&#62; install YAML
成功安装后，刷新Webmin页面，只提示 DBD::mysql 没有安装了，此时 Webmin 已经可以执行DBD::mysql模块的安装了：
正在下载 http://www.cpan.org/modules/02packages.details.txt.gz (794409 字节) ..
收到 1024 字节 (0 %)
收到 79872 字节 (10 %)
收到 159744 [...]]]></description>
			<content:encoded><![CDATA[<p>在我使用Webmin(version 1.480)管理FreeBSD主机上的MySQL数据库服务器时出现：</p>
<p>“警告：您的系统未安装Perl 模块 DBI 和 DBD::mysql，Webmin将无法可靠地访问您的MySQL数据库。点击此处 立刻安装该它们。”</p>
<p>而“点击此处”安装时浏览器无法打开此链接，访问到MySQL手册上的相关资料<a href="http://dev.mysql.com/doc/refman/5.1/zh/installing.html#installing-binary">在其它类Unix系统中安装MySQL</a>，提示“如果安装了DBI和DBD::mysql  Perl模块，可以使用bin/mysql_setpermission脚本增加新账户。”<span id="more-359"></span></p>
<p>再查找<a href="http://dev.mysql.com/doc/refman/5.1/zh/installing.html#perl-support">“Perl安装注意事项”</a>获取到相关的信息是：<br />
“MySQL分发版不包含Perl支持。可以从http://search.cpan.org获得Unix需要的模块，或在Windows中使用ActiveState ppm程序。<br />
如果你想要运行MySQL基准脚本，必须安装Perl支持。<br />
如果你想要安装Perl支持，需要的文件能从<a href="http://search.cpan.org">http://search.cpan.org</a>的CPAN (Comprehensive Perl Archive Network)获得。”</p>
<p>CPAN是个巨大的Perl软件收藏库，其收集大量有用的Perl模块及其相关文档。<br />
在Unix中安装Perl模块最简单的方法是使用CPAN模块。</p>
<p>shell&gt; perl -MCPAN -e shell<br />
cpan&gt; install DBI<br />
cpan&gt; install DBD::mysql</p>
<p>DBD：：mysql安装运行许多测试。测试中使用默认用户名和密码尝试连接本地MySQL服务器。(默认用户名是Unix中的登录名和Windows中的ODBC。默认密码“没有密码。”) 如果你不能通过这些值连接服务器 (例如，如果你的账户有密码)，测试失败。可以使用force install DBD::mysql忽略失败的测试。</p>
<p>按要求操作，安装DBI时提示：<br />
“Warning (usually harmless): &#8216;YAML&#8217; not installed, will not store persistent state”</p>
<p>YAML是以数据为中央的标记语言，其使用ASCII码（如连字符、问号、冒号、逗号等）构造数据块（标量值或哈希码）。和XML相同，YAML也是一种机器可识别语言，并能和多种脚本语言相结合，其中一种便是Perl。</p>
<p>考虑到YAML也可以当做是一个Perl模块，因此我尝试运行：<br />
cpan&gt; install YAML<br />
成功安装后，刷新Webmin页面，只提示 DBD::mysql 没有安装了，此时 Webmin 已经可以执行DBD::mysql模块的安装了：</p>
<blockquote><p>正在下载 http://www.cpan.org/modules/02packages.details.txt.gz (794409 字节) ..<br />
收到 1024 字节 (0 %)<br />
收到 79872 字节 (10 %)<br />
收到 159744 字节 (20 %)<br />
收到 238592 字节 (30 %)<br />
&#8230;</p></blockquote>
<p>但我还是采用手册上提供的方式安装 DBD::mysql</p>
<p>接着安装DBD::mysql时出现错误提示：</p>
<blockquote><p>Running make install</p>
<p>make test had returned bad status, won&#8217;t install without force<br />
Failed during this command:<br />
CAPTTOFU/DBD-mysql-4.012.tar.gz              : make_test NO<br />
&#8230;</p></blockquote>
<p>于是按要求执行：<br />
cpan&gt; force install DBD::mysql<br />
成功完成安装</p>
<p>补记：<a href="http://dev.mysql.com/doc/refman/5.1/zh/optimization.html#mysql-benchmarks">MySQL基准套件</a></p>
<p>通过基准用户可以了解一个给定的SQL实现在哪方面执行得很好或很糟糕。这个基准是单线程的，它可以测量操作执行的最小时间。</p>
<p>要使用基准套件，必须满足下面的要求：</p>
<p>基准套件随MySQL源码分发提供。可以从http://dev.mysql.com/downloads/下载分发，或者使用当前的开发源码树</p>
<p>基准脚本用Perl编写而成，使用Perl DBI模块访问数据库服务器，因此必须安装DBI。还需要为每个待测试的服务器提供服务器专用DBD驱动程序。例如，要测试MySQL、PostgreSQL和DB2，必须安装DBD::mysql、DBD::Pg和DBD::DB2模块。</p>
]]></content:encoded>
			<wfw:commentRss>http://phpstone.com/install-perl-module-for-test-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD平台上安装Webmin</title>
		<link>http://phpstone.com/install-webmin-on-freebsd/</link>
		<comments>http://phpstone.com/install-webmin-on-freebsd/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 07:24:40 +0000</pubDate>
		<dc:creator>frePerl</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[webmin]]></category>

		<guid isPermaLink="false">http://blog.phpstone.com/?p=126</guid>
		<description><![CDATA[声明：因本人水平有限，所写的操作方式仅作为参考，因为Webmin涉及到整个系统的操作，故无完全经验不可轻易用于生产环境中。
接触了一些国外的主机空间，多数是Linux+cPanel，cPanel/WHM的实用性，的确无法比拟，但其高昂的价格，对于我们这种小用户来说是不现实的，加之FreeBSD社区对于开源软件有着更高的热情，因此最近有兴趣尝试下Webmin。
#cd /usr/ports/sysutils/webmin/
#make install clean
After installing Webmin for the first time you should perform the following
steps as root:
* Configure Webmin by running ${LOCALBASE}/lib/webmin/setup.sh
* Add webmin_enable=&#8221;YES&#8221; to your /etc/rc.conf
* Start Webmin for the first time by running ${LOCALBASE}/etc/rc.d/webmin
The parameters requested by setup.sh may then be changed from within Webmin
itself.
===&#62; Installing rc.d startup script(s)
===&#62;   Registering installation [...]]]></description>
			<content:encoded><![CDATA[<p>声明：因本人水平有限，所写的操作方式仅作为参考，因为Webmin涉及到整个系统的操作，故无完全经验不可轻易用于生产环境中。</p>
<p>接触了一些国外的主机空间，多数是Linux+cPanel，cPanel/WHM的实用性，的确无法比拟，但其高昂的价格，对于我们这种小用户来说是不现实的，加之FreeBSD社区对于开源软件有着更高的热情，因此最近有兴趣尝试下Webmin。<span id="more-126"></span></p>
<p>#cd /usr/ports/sysutils/webmin/<br />
#make install clean</p>
<blockquote><p>After installing Webmin for the first time you should perform the following<br />
steps as root:</p>
<p>* Configure Webmin by running ${LOCALBASE}/lib/webmin/setup.sh<br />
* Add webmin_enable=&#8221;YES&#8221; to your /etc/rc.conf<br />
* Start Webmin for the first time by running ${LOCALBASE}/etc/rc.d/webmin</p>
<p>The parameters requested by setup.sh may then be changed from within Webmin<br />
itself.</p>
<p>===&gt; Installing rc.d startup script(s)<br />
===&gt;   Registering installation for webmin-1.450_2<br />
===&gt;  Cleaning for p5-Net-SSLeay-1.35<br />
===&gt;  Cleaning for p5-Authen-PAM-0.16_1<br />
===&gt;  Cleaning for webmin-1.450_2</p></blockquote>
<p>因为之前也没有搜索任何安装资料，安装完毕按着这个提示进行初始配置：<br />
#/usr/local/lib/webmin/setup.sh</p>
<p>此过程的交互式配置大致就是些用户，端口等的常规设置。</p>
<blockquote><p>Web server port (default 10000):<br />
Login name (default admin):<br />
Login password:<br />
Password again:<br />
Segmentation fault (core dumped)<br />
The Perl SSLeay library is not installed. SSL not available.</p></blockquote>
<p>Notice:最后一行是说我们没有安装Perl SSLeay库，SSL不可用，这个接下来再解决。</p>
<p>完成后添加启动脚本和启动Webmin:</p>
<blockquote><p>
#echo &#8216;webmin_enable=&#8221;YES&#8221;&#8216; >> /etc/rc.conf<br />
（注意这里有两个“>”，如果只打一个就不是追加而是替换了。）<br />
#/usr/local/etc/rc.d/webmin start
</p></blockquote>
<p>成功启动后浏览器输入http://serverip:10000即可打开登陆界面了</p>
<p>现在来解决HTTPS登陆的问题。<br />
由于p5-Net-SSLeay-1.35已经关联安装过，说明是安装此port时出现了问题，进入目录/usr/ports/security/p5-Net-SSLeay/<br />
#make deinstall<br />
#make install clean<br />
安装时提示说一些模块必须与perl，openssl保持一致，否则会出现问题。于是将perl与openssl版本更新到ports最新版本，然后安装p5-Net-SSLeay。</p>
<p>期间仍然出现许多警告，如：</p>
<blockquote><p>SSLeay.c: In function &#8216;XS_Net__SSLeay_set_app_data&#8217;:<br />
SSLeay.c:7637: warning: cast to pointer from integer of different size<br />
SSLeay.c: In function &#8216;XS_Net__SSLeay_set_mode&#8217;:<br />
SSLeay.c:7662: warning: cast to pointer from integer of different size<br />
SSLeay.c: In function &#8216;XS_Net__SSLeay_set_pref_cipher&#8217;:<br />
SSLeay.c:7687: warning: cast to pointer from integer of different size<br />
SSLeay.c: In function &#8216;XS_Net__SSLeay_set_tmp_dh&#8217;:<br />
SSLeay.c:7712: warning: cast to pointer from integer of different size<br />
SSLeay.c:7713: warning: cast to pointer from integer of different size</p></blockquote>
<p>这些问题的原因还有待知者指点。</p>
<p>完毕后登陆仍以http方式登陆webmin，然后打开到Webmin-Webmin配置-SSL加密-Enable SSL if available?点选为“是”，保存后即可使用https登陆。</p>
]]></content:encoded>
			<wfw:commentRss>http://phpstone.com/install-webmin-on-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
