<?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>Yousri&#039;s Blog &#187; kbs</title>
	<atom:link href="http://blog.yousri.org/tag/kbs/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.yousri.org</link>
	<description>一个人骑单车在陌生城市路上自由穿梭的生活</description>
	<lastBuildDate>Fri, 20 Jan 2012 15:01:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>安装配置基于KBS程序的BBS系统</title>
		<link>http://blog.yousri.org/2009/05/16/%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%ae%e5%9f%ba%e4%ba%8ekbs%e7%a8%8b%e5%ba%8f%e7%9a%84bbs%e7%b3%bb%e7%bb%9f.html</link>
		<comments>http://blog.yousri.org/2009/05/16/%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%ae%e5%9f%ba%e4%ba%8ekbs%e7%a8%8b%e5%ba%8f%e7%9a%84bbs%e7%b3%bb%e7%bb%9f.html#comments</comments>
		<pubDate>Sat, 16 May 2009 15:00:55 +0000</pubDate>
		<dc:creator>Yousri</dc:creator>
				<category><![CDATA[技术]]></category>
		<category><![CDATA[bbs]]></category>
		<category><![CDATA[kbs]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://qingxianyan.cn/?p=328</guid>
		<description><![CDATA[注：此文备录 相关信息来自网络 记录备用下并时刻更新 操作系统环境：VM虚拟机下的Ubuntu8.04 Server 只安装OpenSSH服务 KBS BBS： kbs svn上最新的源代码 Apache：apache1.3.41.tar.gz (下载：http://www.apache.org） PHP：php5.2.6.tar.gz（下载：http://www.php.net） 代码目录:/home/bbs/src/ 安装前准备工作：更新安装时可能所需要的包： # apt-get install automake1.9 # apt-get install php5-dev # apt-get install libmysqlclient15-dev # apt-get install sendmail # apt-get install libesmtp5 # apt-get install byacc # apt-get install libgmp3-dev # apt-get install flex # apt-get install libxml2-dev # apt-get install libjpeg62-dev <a href='http://blog.yousri.org/2009/05/16/%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%ae%e5%9f%ba%e4%ba%8ekbs%e7%a8%8b%e5%ba%8f%e7%9a%84bbs%e7%b3%bb%e7%bb%9f.html' class='excerpt-more'>[...]</a><table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.yousri.org%2F2010%2F02%2F25%2Finstall_apache_and_subversion.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F05%2F16%2F%25E5%25AE%2589%25E8%25A3%2585%25E9%2585%258D%25E7%25BD%25AE%25E5%259F%25BA%25E4%25BA%258Ekbs%25E7%25A8%258B%25E5%25BA%258F%25E7%259A%2584bbs%25E7%25B3%25BB%25E7%25BB%259F.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Apache编译安装配置并支持Subversion版本控制</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.yousri.org%2F2009%2F09%2F21%2Fbbs%25E5%25B8%25AE%25E5%258A%25A9%25E6%2596%2587%25E6%25A1%25A3%25E8%25AE%25B0%25E5%25BD%2595.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F05%2F16%2F%25E5%25AE%2589%25E8%25A3%2585%25E9%2585%258D%25E7%25BD%25AE%25E5%259F%25BA%25E4%25BA%258Ekbs%25E7%25A8%258B%25E5%25BA%258F%25E7%259A%2584bbs%25E7%25B3%25BB%25E7%25BB%259F.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">BBS帮助文档记录</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.yousri.org%2F2009%2F03%2F26%2F%25E7%2594%259F%25E6%25B4%25BB%25E7%2590%2590%25E4%25BA%258B.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F05%2F16%2F%25E5%25AE%2589%25E8%25A3%2585%25E9%2585%258D%25E7%25BD%25AE%25E5%259F%25BA%25E4%25BA%258Ekbs%25E7%25A8%258B%25E5%25BA%258F%25E7%259A%2584bbs%25E7%25B3%25BB%25E7%25BB%259F.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">生活琐事</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.yousri.org%2F2009%2F03%2F26%2F%25E6%259F%25A5%25E7%259C%258B%25E7%25A1%25AC%25E4%25BB%25B6%25E4%25BF%25A1%25E6%2581%25AF%25E5%25B7%25A5%25E5%2585%25B7lshw%25E5%258F%258A%25E6%259F%25A5%25E6%2589%25BE%25E6%2589%2593%25E5%25BC%2580%25E7%259A%2584%25E6%2596%2587%25E4%25BB%25B6%25E5%25B7%25A5%25E5%2585%25B7lsof.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F05%2F16%2F%25E5%25AE%2589%25E8%25A3%2585%25E9%2585%258D%25E7%25BD%25AE%25E5%259F%25BA%25E4%25BA%258Ekbs%25E7%25A8%258B%25E5%25BA%258F%25E7%259A%2584bbs%25E7%25B3%25BB%25E7%25BB%259F.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">查看硬件信息工具lshw及查找打开的文件工具lsof</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></description>
			<content:encoded><![CDATA[<p>注：此文备录 相关信息来自网络 记录备用下并时刻更新<br />
操作系统环境：VM虚拟机下的Ubuntu8.04 Server 只安装OpenSSH服务<br />
KBS BBS： kbs svn上最新的源代码<br />
Apache：apache1.3.41.tar.gz (下载：<a href="http://www.apache.org">http://www.apache.org</a>）<br />
PHP：php5.2.6.tar.gz（下载：<a href="http://www.php.net">http://www.php.net</a>）<br />
代码目录:/home/bbs/src/ </p>
<p>安装前准备工作：更新安装时可能所需要的包：</p>
<pre class="brush: bash">
# apt-get install automake1.9
# apt-get install php5-dev
# apt-get install libmysqlclient15-dev
# apt-get install sendmail
# apt-get install libesmtp5
# apt-get install byacc
# apt-get install libgmp3-dev
# apt-get install flex
# apt-get install libxml2-dev
# apt-get install libjpeg62-dev
# apt-get install libpng12-dev
# apt-get install libfreetype6-dev
# apt-get install subversion
</pre>
<p>创建bbs用户：</p>
<pre class="brush: bash">
    # adduser bbs
</pre>
<p>安装apache服务：</p>
<pre class="brush: bash">
# tar xvf apache_1.3.41.tar.gz
# cd apache_1.3.41
# CC="gcc" OPTIM="-O2" ./configure --prefix=/home/bbs/www --enable-module=so
# make
# make install
</pre>
<p>编辑apache的配置文件，User和Group都改成bbs，Port改成想要的端口。</p>
<pre class="brush: bash">
# cd /home/bbs/www/conf
# vim httpd.conf
</pre>
<p>安装PHP</p>
<pre class="brush: bash">
# tar xvf php-5.2.6.tar.gz
# cd php-5.2.6
# ./configure --with-mysql --with-apxs=/home/bbs/www/bin/apxs \\
--with-gd --with-png-dir --with-iconv --with-jpeg-dir \\
--with-zlib --with-ttf --with-freetype-dir --enable-gd-native-ttf
# make
# make install
</pre>
<p>编辑apache的配置文件/home/bbs/www/conf/httpd.conf，在里面加入这样一行：</p>
<pre class="brush: bash">AddType application/x-httpd-php .php</pre>
<p>下载安装KBS<br />
从kbs的svn服务器上下载最新的kbs源代码。</p>
<pre class="brush: bash">
# cd /home/bbs/src
# svn co http://svn.kcn.cn/repos/kbs/trunk/kbs_bbs
# svn co http://svn.kcn.cn/repos/kbs/trunk/www2
</pre>
<p>查看bbs用户的gid和uid是多少。</p>
<pre class="brush: bash"># cat /etc/passwd | grep bbs</pre>
<p>到kbs的站点定义目录下，建造一份自己的站点的定义文件，比如站点叫做Yousri。尤其要修改Yousri.h中的BBSUID和BBSGID为刚才看到的bbs用户的编号。</p>
<pre class="brush: bash">
$cd /home/bbs/src/kbs_bbs/site
$cp fb2k-v2.h yousri.h
$cp fb2k-v2.c yousri.c
$vim yousri.h
</pre>
<p>运行autogen.sh。</p>
<pre class="brush: bash">
# cd /home/bbs/src/kbs_bbs
# ./autogen.sh
# cd sshbbsd
# ./autogen.sh
</pre>
<p>编译安装kbs。</p>
<pre class="brush: bash">
# cd /home/bbs/src/kbs_bbs
# ./configure --prefix=/home/bbs --enable-site=yousri \\
--with-php --with-mysql --enable-ssh --enable-ssl \\
--with-openssl=/usr --with-libesmtp --enable-innbbsd CFLAGS="-O3 -g"
# make
# make install
</pre>
<p>如果是新建的bbs站点，还需要安装默认的站点文件。</p>
<pre class="brush: bash"># make install-home</pre>
<p>给sshbbsd生成钥匙。</p>
<pre class="brush: bash">
# cd /home/bbs/etc
# touch sshd_config
# ssh-keygen -t rsa1 -f ssh_host_key
</pre>
<p>从php源码目录复制来一个php的配置文件，并编辑之。</p>
<pre class="brush: bash">
# cd /usr/local/lib
# cp /home/bbs/src/php-5.2.6/php.ini-dist php.ini
# vim php.ini
</pre>
<p>修改extension_dir一行为：</p>
<pre class="brush: bash">extension_dir = "/usr/local/lib/php/extensions/no-debug-non-zts-20060613/"</pre>
<p>然后加入下面一行：</p>
<pre class="brush: bash">extension=libphpbbslib.so</pre>
<p>把www2符号连接到apache的网页目录来。</p>
<pre class="brush: bash">
# cd /home/bbs/www/
# mv htdocs htdocs.default
# ln -s ../src/www2 htdocs
</pre>
<p>因为之前很多操作需要用root执行，可能bbs的很多文件的owner和group不对，所以一并搞掉。</p>
<pre class="brush: bash"># chown -R bbs:bbs /home/bbs</pre>
<p>启动BBS:</p>
<pre class="brush: bash">
# cd /home/bbs/bin
# ./miscd daemon
# ./bbslogd
# ./bbsd -p 23
# ./sshbbsd -p 22
# cd ../www/bin
# ./apachectl start
</pre>
<p>如果要停止bbs的话按如下操作：</p>
<pre class="brush: bash">
# cd /home/bbs/www/bin
# ./apachectl stop
# cd ../../bin
# killall sshbbsd
# killall bbsd
# killall bbslogd
# ./miscd flush
# killall miscd
</pre>
<p>其中期间遇到过两个比较莫名其妙的小问题<br />
到最后启动bbs的时候 执行</p>
<pre class="brush: bash">
root@yousri:/home/bbs/bin# ./miscd daemon
Bus error
</pre>
<p>这一步的时候出现如此的错误提示<br />
还有就是启动后 telnet 127.0.0.1 进入要注册出现无法注册的现象如注册SYSOP账号却提示<br />
“由于某些系统原因, 无法注册新的帐号.”<br />
然后要再次连接 telnet 127.0.0.1 就无法连接了</p>
<pre class="brush: bash">
“root@yousri:/home/bbs# telnet 127.0.0.1
  Trying 127.0.0.1...
  Connected to 127.0.0.1.
  Escape character is '^]'.
  Connection closed by foreign host.”
</pre>
<p>至于执行./miscd daemon报错的问题 后来又重新编译安装了下kbs代码 倒是可行了。。。<br />
对于无法注册账号的  貌似要杀掉有关miscd及bbslogd的进程 然后重新创建才可以 即：</p>
<pre class="brush: bash">
$killall miscd
$killall bbslogd
</pre>
<p>终于正常了。。。。<br />
其他系统使用待更新。。。。</p>
<table class="wumii-related-items" cellspacing="0" cellpadding="2" border="0" width="100%" style="clear: both;">
    
    <tr>
        <td ><b><font size="-1"  style="display: block !important; padding: 20px 0 5px !important;">您可能也喜欢：</font></b></td>
    </tr>
    
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.yousri.org%2F2010%2F02%2F25%2Finstall_apache_and_subversion.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F05%2F16%2F%25E5%25AE%2589%25E8%25A3%2585%25E9%2585%258D%25E7%25BD%25AE%25E5%259F%25BA%25E4%25BA%258Ekbs%25E7%25A8%258B%25E5%25BA%258F%25E7%259A%2584bbs%25E7%25B3%25BB%25E7%25BB%259F.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">Apache编译安装配置并支持Subversion版本控制</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.yousri.org%2F2009%2F09%2F21%2Fbbs%25E5%25B8%25AE%25E5%258A%25A9%25E6%2596%2587%25E6%25A1%25A3%25E8%25AE%25B0%25E5%25BD%2595.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F05%2F16%2F%25E5%25AE%2589%25E8%25A3%2585%25E9%2585%258D%25E7%25BD%25AE%25E5%259F%25BA%25E4%25BA%258Ekbs%25E7%25A8%258B%25E5%25BA%258F%25E7%259A%2584bbs%25E7%25B3%25BB%25E7%25BB%259F.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">BBS帮助文档记录</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.yousri.org%2F2009%2F03%2F26%2F%25E7%2594%259F%25E6%25B4%25BB%25E7%2590%2590%25E4%25BA%258B.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F05%2F16%2F%25E5%25AE%2589%25E8%25A3%2585%25E9%2585%258D%25E7%25BD%25AE%25E5%259F%25BA%25E4%25BA%258Ekbs%25E7%25A8%258B%25E5%25BA%258F%25E7%259A%2584bbs%25E7%25B3%25BB%25E7%25BB%259F.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">生活琐事</font>
                    </a>
                </td>
            </tr>
            <tr>
                <td style="margin: 0 !important; padding: 0 !important; line-height: 20px !important;">
                    <img border="0" src="http://static.wumii.com/images/widget/widget_solidPoint.gif">
                    <a target="_blank" style="text-decoration: none !important;" href="http://app.wumii.com/ext/redirect?url=http%3A%2F%2Fblog.yousri.org%2F2009%2F03%2F26%2F%25E6%259F%25A5%25E7%259C%258B%25E7%25A1%25AC%25E4%25BB%25B6%25E4%25BF%25A1%25E6%2581%25AF%25E5%25B7%25A5%25E5%2585%25B7lshw%25E5%258F%258A%25E6%259F%25A5%25E6%2589%25BE%25E6%2589%2593%25E5%25BC%2580%25E7%259A%2584%25E6%2596%2587%25E4%25BB%25B6%25E5%25B7%25A5%25E5%2585%25B7lsof.html&from=http%3A%2F%2Fblog.yousri.org%2F2009%2F05%2F16%2F%25E5%25AE%2589%25E8%25A3%2585%25E9%2585%258D%25E7%25BD%25AE%25E5%259F%25BA%25E4%25BA%258Ekbs%25E7%25A8%258B%25E5%25BA%258F%25E7%259A%2584bbs%25E7%25B3%25BB%25E7%25BB%259F.html">
                        <font size="-1" color="#333333" style="line-height: 1.65em; font-size: 12px !important;">查看硬件信息工具lshw及查找打开的文件工具lsof</font>
                    </a>
                </td>
            </tr>
    
    <tr>
        <td  align="right">
            <a style="text-decoration: none !important;" href="http://www.wumii.com/widget/relatedItems" target="_blank" title="无觅相关文章插件">
                <font size="-1" color="#bbbbbb" style="display: block !important; font-family: arial !important; padding: 5px 0 !important; font-size: 12px !important; color: #bbb !important;">无觅</font>
            </a>
        </td>
    </tr>
</table>]]></content:encoded>
			<wfw:commentRss>http://blog.yousri.org/2009/05/16/%e5%ae%89%e8%a3%85%e9%85%8d%e7%bd%ae%e5%9f%ba%e4%ba%8ekbs%e7%a8%8b%e5%ba%8f%e7%9a%84bbs%e7%b3%bb%e7%bb%9f.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

