SetupBBS 板


LINE

※ [本文转录自 shakalaca 看板] 作者: shakalaca (Lord Of The BBS :D) 看板: shakalaca 标题: [beta] Maple BBS 之架设篇 时间: Sun Oct 12 19:20:16 2003 摩拳擦掌来架站 (Maple BBS 之架设篇) =================================== ※ 版本 2003.10.12 初稿 ※ 作者 Jian-Zhou Huang <[email protected]> ※ 参考文件 * php.twbbs.org / Plan: 看板 & ※ 内容 * 架站环境 1) FreeBSD 5.1 / PIII-1G / 512MB ram / 512MB swap 2) 架站所用的 id/groupid: bbsadm/bbsgroup (9999/9999), 家目录为 /home/bbs 3) 我假设你的机器没有使用 telnetd, 或者是其他任何程式占住 port 23 * 教学目标 1) 编译 BBS 2) 启动 BBS 3) 开机自动启动 BBS * 教学内容 以下将照着顺序安装 Maple BBS 3.x 以及其延伸版本, 我们首先以原始的 Maple BBS 进行示范. +-----------------------------------------------------------------------+ | Step 1. 抓取 BBS 程式码 | +-----------------------------------------------------------------------+ 我们可以在 ftp://php.twbbs.org/pub/bbs/Maple/Maple3 找到 MapleBBS-3.02-RELEASE.tgz & MapleBBS-3.10-20000606-SNAP.tgz 这两个档案. 前者是由 [email protected] 所 port 到其他平台的版本, 後者则加入了 [email protected] 的修正. 因此在这边我使用後者的档案, 虽然说我不保证程式完全没有问题. 我们先以 bbsadm 登入到主机, 然後把档案抓下来放到家目录下并解开: # tar zxvf MapleBBS-3.10-20000606-SNAP.tgz +-----------------------------------------------------------------------+ | Step 2. 修改并且编译 BBS | +-----------------------------------------------------------------------+ 切换到 src/include 并修改 config.h, 有几个部分一定要更动: > #define BOARDNAME "冷 馨 居" /* 中文站名 */ - 改成你想要用的中文站名. > #define MYHOSTNAME "Rouge.Dragon2.Net" /* 网路位址 */ - 改成你的 hostname, 比如 "php.twbbs.org" > #define BBSHOME "/home/bbs" /* BBS 的家 */ - 如果你的 bbs 不是安装在 /home/bbs, 请修改这个路径 > #define BBSUID 9999 - 如果你所使用的 uid 不是 9999, 请更改 > #define BBSGID 99 - 如果你所使用的 gid 不是 99, 请更改. 我这边就改为 9999 > #define TAG_VALID "[RougeBBS]To " /* 身分认证函token */ - 身分证任所使用的 Tag, 你可以改成你想要的文字. 比如 "[TestBBS]To " 接着请: # cd ../lib # make clean all # cd ../maple 这边请注意, 请依照你所使用的作业系统, 将 ostype 换成相关的文字. 比如你使用 freebsd 则 ostype 替换成 freebsd; 如果是 linux 则替换成 linux. 後面有提到 ostype 请依样画葫芦. # make ostype install Linux 的使用者请注意, 如果你在编译时出现 menu.c:xxx: dereferencing ... 之类的错误, 请修改 ~bbs/src/include/bbs.h 中第 31 行 #include <sys/time.h> 改成 #include <time.h> 然後编译其他档案: # cd bso # make ostype install # cd ../../util # make ostype install 如果 Linux 使用者在这边出现 webx.c 的错误, 也请修改 webx.c 中的 #include <sys/time.h> 改成 #include <time.h> # cd ../bgopherd # make ostype install # cd ../innbbsd 修改 Makefile, 把 1. ADMINUSER 改成你所使用的 email. 2. BBSHOME 设定为你的 bbsadm 家目录. 3. BBSADR 改成你所使用的 domain name. 最後要修改一下 innbbsconf.h, 找到: # define DefaultINNBBSPort "119" 把 119 改成 7777, 储存离开, 然後: # make ostype install 到这里为止, 一些 bbs 基本的工具及程式都已经编译完成. 如果你想要让 bbs 的使用者能够使用 pop3 收信, 请 # cd ../bpop3d # make ostype install 如果你这台机器只想单纯做 bbs 的用途, 而且机器上没有其他使用者的帐号或者是 不收信件也没关系, 建议使用 bmtad 让 bbs 使用者外来信件. 请 # cd ../bmtad # make ostype install +-----------------------------------------------------------------------+ | Step 3. 执行 BBS | +-----------------------------------------------------------------------+ 先以 bbsadm 执行 # cd ~; bin/camera; bin/account; bin/xchatd; innd/innbbsd 此时画面似乎卡住, 不过你可以按 Enter 跳出. 然後以 root 帐号执行; # ~bbs/bin/bbsd (这是 bbs 主程式) # ~bbs/bin/gemd (让别人可以连线读取你的) # ~bbs/bin/bguard (让别人可以远端查询使用者) # ~bbs/bin/bpop3d (让使用者可以将 BBS 的信件收到自己的电脑中) 如果你想要让机器单纯的只接受 bbs 的信件, 请停止你的 mail daemon 然後 以 root 执行: # ~bbs/bin/bmtad 到这边, 你已经架起来一个 bbs 了. 现在 # telnet localhost 应该可以看到 bbs 的进站画面. 预设是没有任何帐号, 所以输入 new 申请一个 sysop 帐号吧 ! 申请完成时, 站长的权限并无立即生效, 你要重新以 sysop 的帐号登入, 才在主选单看到 "(0)Admin 【 系统维护区 】" 这个选项. 此时你已经 可以行使站长的权限了. +-----------------------------------------------------------------------+ | Step 4. 开机自动启动 BBS | +-----------------------------------------------------------------------+ 在这边提供 FreeBSD 的方法, 首先编辑 bbs.sh: ========================我是bbs.sh的分隔线================================ #!/bin/sh if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then echo "$0: Cannot determine the PREFIX" >&2 exit 1 fi BBSHOME=/home/bbs PID=`/usr/bin/tail -1 /home/bbs/run/bbs.pid | /usr/bin/awk '{print $1}'` PS=`/bin/ps -ax | /usr/bin/awk '{ print $1 }' | /usr/bin/grep $PID` case "$1" in start) if [ ! -z "$PS" ]; then echo ' bbs is already running' exit 1 fi su -fm bbs -c $BBSHOME/bin/camera > /dev/null 2>&1 su -fm bbs -c $BBSHOME/bin/account > /dev/null 2>&1 su -fm bbs -c $BBSHOME/bin/xchatd > /dev/null 2>&1 su -fm bbs -c $BBSHOME/innd/innbbsd > /dev/null 2>&1 $BBSHOME/bin/bbsd $BBSHOME/bin/bguard echo -n ' bbsd' if [ -x $BBSHOME/bin/bpop3d ]; then echo -n ' bpop3d' $BBSHOME/bin/bpop3d fi if [ -x $BBSHOME/bin/gemd ]; then echo -n ' gemd' $BBSHOME/bin/gemd fi ;; stop) if [ -z "$PS" ]; then echo ' bbs is not running' exit 1 fi killall -9 xchatd su -fm bbs -c "$BBSHOME/innd/ctlinnbbsd shutdown" killall -9 bbsd killall -9 bguard for i in `ipcs | grep bbs | awk '{print $3}'` do if [ $OSTYPE = "FreeBSD" ]; then ipcrm -M $i else if [ $OSTYPE = "linux-gnu" -o $OSTYPE = "Linux" ]; then ipcrm shm $i fi fi done echo -n ' bbsd' if [ -x $BBSHOME/bin/bpop3d ]; then echo -n ' bpop3d' killall -9 bpop3d fi if [ -x $BBSHOME/bin/gemd ]; then echo -n ' gemd' killall -9 gemd fi ;; *) echo "Usage: `basename $0` {start|stop}" >&2 ;; esac exit 0 ========================我是bbs.sh的分隔线================================ 然後放到 /usr/local/etc/rc.d/ 里面即可食用 :) ※ 後记 1. 感谢你看到这边, 不管你是不是跳过前面也好 :p 2. 一而再再而三的修正, 真对不起大家的眼睛 :Q -- ^..^ < 猪 头 纪 公 园 - php.twbbs.org (140.113.208.200) > -w @@ w-- < lion.ee.ncku.edu.tw >







like.gif 您可能会有兴趣的文章
icon.png[问题/行为] 猫晚上进房间会不会有憋尿问题
icon.pngRe: [闲聊] 选了错误的女孩成为魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一张
icon.png[心得] EMS高领长版毛衣.墨小楼MC1002
icon.png[分享] 丹龙隔热纸GE55+33+22
icon.png[问题] 清洗洗衣机
icon.png[寻物] 窗台下的空间
icon.png[闲聊] 双极の女神1 木魔爵
icon.png[售车] 新竹 1997 march 1297cc 白色 四门
icon.png[讨论] 能从照片感受到摄影者心情吗
icon.png[狂贺] 贺贺贺贺 贺!岛村卯月!总选举NO.1
icon.png[难过] 羡慕白皮肤的女生
icon.png阅读文章
icon.png[黑特]
icon.png[问题] SBK S1安装於安全帽位置
icon.png[分享] 旧woo100绝版开箱!!
icon.pngRe: [无言] 关於小包卫生纸
icon.png[开箱] E5-2683V3 RX480Strix 快睿C1 简单测试
icon.png[心得] 苍の海贼龙 地狱 执行者16PT
icon.png[售车] 1999年Virage iO 1.8EXi
icon.png[心得] 挑战33 LV10 狮子座pt solo
icon.png[闲聊] 手把手教你不被桶之新手主购教学
icon.png[分享] Civic Type R 量产版官方照无预警流出
icon.png[售车] Golf 4 2.0 银色 自排
icon.png[出售] Graco提篮汽座(有底座)2000元诚可议
icon.png[问题] 请问补牙材质掉了还能再补吗?(台中半年内
icon.png[问题] 44th 单曲 生写竟然都给重复的啊啊!
icon.png[心得] 华南红卡/icash 核卡
icon.png[问题] 拔牙矫正这样正常吗
icon.png[赠送] 老莫高业 初业 102年版
icon.png[情报] 三大行动支付 本季掀战火
icon.png[宝宝] 博客来Amos水蜡笔5/1特价五折
icon.pngRe: [心得] 新鲜人一些面试分享
icon.png[心得] 苍の海贼龙 地狱 麒麟25PT
icon.pngRe: [闲聊] (君の名は。雷慎入) 君名二创漫画翻译
icon.pngRe: [闲聊] OGN中场影片:失踪人口局 (英文字幕)
icon.png[问题] 台湾大哥大4G讯号差
icon.png[出售] [全国]全新千寻侘草LED灯, 水草

请输入看板名称,例如:e-shopping站内搜寻

TOP