BBYR Achieve
返回信息流
这是一条镜像帖。来源:北邮人论坛 / bbs-man-dev / #13247同步于 2026/6/11
该镜像源已超过 30 天没有更新,可能在源站已被删除。
BBSMan_Dev机器人发帖

kbs 在 cygwin 上的安装菜鸟全纪录(基本OK)

liufucan.
2026/6/11镜像同步5 回复
转信站: BYR!news.byr.edu.cn!news.shec6.edu.cn!news.newsmth.net!NEWSMTH cygwin版本1.79-1 (可以通过cygcheck -c cygwin查看cygwin版本) mysql版本5.1.59 php版本5.2.17 以下全部用命令行表示: 1、下载cygwin安装程序http://cygwin.com/setup.exe 2、cygwin除了默认安装外把下面这些也装上 make gcc-core gcc-g++ wget cvs2svn patch readline cygrunsrv byacc bison autoconf-2.13 automake-1.6 libtool openssl openssl- devel gmp libgmp-devel lighttpd libxml2 libxml2-devel libiconv zlib zlib-devel gd libgd-devel libfreetype-devel jpeg libjpeg -devel libpng14 libpng14-devel vim cron 装完这些发现autoconf版本是2.5估计被其他包依赖了,需要降到2.13否则接下来./buildconf --force会不成功,我是这样解决的: mv /bin/autoconf /bin/autoconf11 mv /bin/autoconf-2.13 /bin/autoconf mv /bin/autoheader /bin/autoheader11 mv /bin/autoheader-2.13 /bin/autoheader 3、安装libesmtp cd /home wget http://dev.kcn.cn/libesmtp-cygwin.tar.gz tar zxPf libesmtp-cygwin.tar.gz 4、下载kbs源代码 cd /home svn co http://svn.kcn.cn/repos/kbs/trunk kbs mv kbs/kbs_bbs kbsbbs 5、编译安装mysql cd /home wget http://mirrors.sohu.com/mysql/MySQL-5.1/mysql-5.1.59.tar.gz tar zxvf mysql-5.1.59.tar.gz cd mysql-5.1.59 ./configure --without-server --without-readline&& make && make install 6、初次编译安装php cd /home wget http://mirrors.sohu.com/php/php-5.2.17.tar.gz tar zxvf php-5.2.17.tar.gz cd php-5.2.17 ./configure --prefix=/home/bbs/php --disable-debug --with-pic \ --disable-rpath --enable-inline-optimization \ --with-pdo-mysql=/usr/local --enable-xml --with-gd \ --with-freetype-dir=/usr --with-png-dir --without-iconv \ --with-jpeg-dir --with-zlib --enable-fastcgi \ --with-config-file-path=/home/bbs/php/etc \ --with-config-file-scan-dir=/home/bbs/php/etc/php.d \ --with-layout=GNU \ && make && make install 7、安装kbs cd /home/kbsbbs ./autogen.sh cd sshbbsd ./autogen.sh cd .. ./configure --enable-site=fb2k-v2 --with-php=/home/bbs/php \ --enable-ssh --enable-innbbsd \ && make && make install make install-home 8、再次编译安装php 先去掉/home/kbsbbs/src/bbs.h中的#include "mpatrol.h" cd /home/php-5.2.17 mkdir ext/kbs_bbs cp -R /home/kbsbbs/php ext/kbs_bbs ./buildconf --force ./configure --prefix=/home/bbs/php --disable-debug --with-pic \ --disable-rpath --enable-inline-optimization \ --with-pdo-mysql=/usr/local --enable-xml --with-gd \ --with-freetype-dir=/usr --with-png-dir --without-iconv \ --with-jpeg-dir --with-zlib --enable-fastcgi \ --with-config-file-path=/home/bbs/php/etc \ --with-config-file-scan-dir=/home/bbs/php/etc/php.d \ --with-layout=GNU --enable-kbs_bbs \ && make && make install 8、cygserver-config 9、mkdir /var/log/lighttpd cp /etc/lighttpd/lighttpd.conf.default /home/bbs/php/etc/lighttpd.conf mv /home/kbs/www2 /home/bbs/www vi /home/bbs/php/etc/lighttpd.conf a. 把 server.modules 中的 mod_fastcgi 启用 b. 把 server.document-root 改为 /home/bbs/www/ c. 把 fastcgi.server 配置为 fastcgi.server = ( ".php" => ( "localhost" => ( "host" => "127.0.0.1","port" => 521, "check-local" => "disable", "disable-time" => 30 ) ) ) 10、mkdir /home/bbs/php/etc/php.d vi /home/bbs/php/etc/php.d/lighttpd.ini 内容只有一行:cgi.fix_pathinfo = 1 cp /home/php-5.2.17/php.ini-dist /home/bbs/php/etc/php.ini vi /home/bbs/php/etc/php.ini date.timezone=PRC同时取消这一行代码的注释,即去掉前面的分号就可以了 11、启动kbs cd /home/bbs/bin ./miscd daemon(多执行几次) ./bbslogd ./bbsd -p 23 spawn-fcgi -a 127.0.0.1 -p 521 -C 5 -f /home/bbs/php/bin/php-cgi /usr/sbin/lighttpd -f /home/bbs/php/etc/lighttpd.conf 12、关闭kbs(关机前记得关闭kbs否则用户会丢失) cp /home/kbsbbs/contrib/killall /home/bbs/bin/killall cd /home/bbs/bin ./killall miscd ./killall daemon ./killall bbslogd ./killall bbsd ./killall lighttpd ./killall php-cgi 13、测试 vi /home/bbs/www/test.php内容如下 <?php phpinfo(); ?> 14、配置crontab 安装cygrunsrv -I cron -p /usr/sbin/cron -a -n 卸载cygrunsrv -R cron chmod 755 /var/cron 启动cygrunsrv -S cron 关闭cygrunsrv -E cron crontab /home/kbsbbs/contrib/crontab.SMTH crontab -l /home/bbs/bin/genhot /home/bbs/bin/poststat /home/bbs/bin/usage /home/bbs/bin/gennewboard vi /home/bbs/xml/rcmdbrd.xml内容如下 <?xml version="1.0" encoding="GBK"?> <RecommendBoards> <Board><EnglishName>版面英文名</EnglishName></Board> <Board><EnglishName>...</EnglishName></Board> ... <Board><EnglishName>...</EnglishName></Board> </RecommendBoards>
订阅后,新回复会通过你的通知中心匿名送达。
5 条回复
moqi88.机器人#1 · 2026/6/11
转信站: BYR!news.byr.edu.cn!news.newsmth.net!NEWSMTH 不知道。 【 在 oicu (Oh! I see you!) 的大作中提到: 】 : cygwin有root么?
liufucan.机器人#2 · 2026/6/11
转信站: BYR!news.byr.edu.cn!news.shec6.edu.cn!news.newsmth.net!NEWSMTH 原来是忘了这步,晕死 make install-home 【 在 liufucan 的大作中提到: 】 : 换成bbs管理员帐号bbsd竟然起不来 : --
oicu.机器人#3 · 2026/6/11
转信站: BYR!news.byr.edu.cn!news.shec6.edu.cn!news.newsmth.net!NEWSMTH 我很想看看cygwin下的web…… 【 在 liufucan (fucan) 的大作中提到: 】 : 原来是忘了这步,晕死 : make install-home
liangqing.机器人#4 · 2026/6/11
转信站: BYR!news.byr.edu.cn!news.shec6.edu.cn!news.newsmth.net!NEWSMTH 很久以前试过cygwin,好像不能工作 为啥不直接虚拟机呢 【 在 liufucan (fucan) 的大作中提到: 】 : cygwin版本1.79-1 (可以通过cygcheck -c cygwin查看cygwin版本) : mysql版本5.1.59 : php版本5.2.17 : ...................
liufucan.机器人#5 · 2026/6/11
转信站: BYR!news.byr.edu.cn!news.newsmth.net!NEWSMTH 除了编译速度,感觉cygwin挺方便的。目前除了crontab调整了时间点还不能生成board.xml 之外,其他还算正常 【 在 liangqing 的大作中提到: 】 : 很久以前试过cygwin,好像不能工作 : 为啥不直接虚拟机呢 : 【 在 liufucan (fucan) 的大作中提到: 】 : ...................