更多相关内容...>>KBS安装指南
KBS安装指南
KBS安装指南
NyEMvY http://blog.numino.net/
一些环境准备
aNyfZ6 http://blog.numino.net/
虚机(virtualbox 5.1+, 比如5.1.26)环境搭建
92Iaqv http://blog.numino.net/
如果没有开启vt,需要开启,首先开机进入BIOS,Security,Virtualization,选择Enable即可
XkWfii http://blog.numino.net/
安装ubuntu12.04.5,地址 :
BNZ0C1 http://blog.numino.net/
http://mirrors.163.com/ubuntu-releases/12.04/ubuntu-12.04.5-desktop-amd64.iso
k5O71Q http://blog.numino.net/
比较古老的32位的或不支持vt技术的cpu选择:
4nO3BZ http://blog.numino.net/
http://mirrors.163.com/ubuntu-releases/12.04/ubuntu-12.04.5-desktop-i386.iso
4WqKwL http://blog.numino.net/
虚机网络断开安装,否则会自动安装更新,耗时比较久,
rOmXsr http://blog.numino.net/
virtualbox - 显示 - 启用3d加速
x71QFC http://blog.numino.net/
安装过程中,配置用户名设置为 bbs
Jck6Qb http://blog.numino.net/
安装完成后去掉iso挂载,网络选择网络地址转换NAT,重启后
QWUibA http://blog.numino.net/
virtuabbox, 设备-安装增强功能(和主机共享文件)
vYAQ17 http://blog.numino.net/
df 查看光盘挂载地址
MPa1MN http://blog.numino.net/
cd /media/VBOXADDITIONS_5.1_xxxx (xxxx为上面命令结果补全)
1veXix http://blog.numino.net/
sudo ./VBoxLinuxAdditions.run
4bys0n http://blog.numino.net/
重启,设备 - 共享文件夹, 选择windows主机的文件夹映射为 bbs目录为共享目录,选择固定分配,自动挂载
yG434T http://blog.numino.net/
sudo mount -t vboxsf bbs /mnt
yjY74Z http://blog.numino.net/
添加国内源
yNosuD http://blog.numino.net/
sudo vi /etc/apt/sources.list
m0Vsbu http://blog.numino.net/
删除文本所有内容,添加:
pxj85O http://blog.numino.net/
1
aTgS3U http://blog.numino.net/
2
jpf253 http://blog.numino.net/
3
7Iw9nZ http://blog.numino.net/
4
6ql2T9 http://blog.numino.net/
5
Yw8tmb http://blog.numino.net/
6
3xA1eI http://blog.numino.net/
7
28GPEh http://blog.numino.net/
8
xaR1HI http://blog.numino.net/
9
S9E6D4 http://blog.numino.net/
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
SQycGx http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main restricted universe multiverse
Ep1aBp http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main restricted universe multiverse
2LK5SR http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
yk04TE http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
t0s6qE http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
3JZENR http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
WKBX7R http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-security main restricted universe multiverse
n2X8S6 http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-security main restricted universe multiverse
JvLxGD http://blog.numino.net/
修改一下vim打开文件的编码方式,否则后续编辑有可能显示乱码
BzVNm9 http://blog.numino.net/
vim ~/.vimrc
Cv0CwY http://blog.numino.net/
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
RwcFmo http://blog.numino.net/
安装 sudo ./php_apache.sh 安装合适的 php, apache, mysql 等依赖库
WGB386 http://blog.numino.net/
php_apache.sh 的内容:
nXFCSG http://blog.numino.net/
apt-get update &&
RvSc1J http://blog.numino.net/
apt-get install -y zlib1g-dev &&
HWN8la http://blog.numino.net/
apt-get install -y autoconf &&
97h068 http://blog.numino.net/
apt-get install -y automake &&
oP4cV7 http://blog.numino.net/
apt-get install -y libtool &&
9KniS3 http://blog.numino.net/
apt-get install -y libgmp3c2 &&
LG1a4R http://blog.numino.net/
apt-get install -y libgmp3-dev &&
x47q4r http://blog.numino.net/
apt-get install -y openssl &&
91NXJe http://blog.numino.net/
apt-get install -y apache2 &&
PvhW3I http://blog.numino.net/
apt-get install -y libapache2-mod-php5 &&
I00050 http://blog.numino.net/
apt-get install -y php5-dev &&
VED2tn http://blog.numino.net/
apt-get install -y php5-gd &&
7KiNs7 http://blog.numino.net/
apt-get install -y bison &&
AODz1l http://blog.numino.net/
apt-get install -y byacc &&
mi9KdB http://blog.numino.net/
apt-get install -y tree &&
Fj3A32 http://blog.numino.net/
apt-get install -y libcurl4-openssl-dev &&
e4N22L http://blog.numino.net/
apt-get install -y dos2unix &&
ca9abp http://blog.numino.net/
apt-get install -y libpcre3 &&
98Q383 http://blog.numino.net/
apt-get install -y libpcre3-dev &&
2K3GiR http://blog.numino.net/
apt-get install -y libmysqlclient-dev &&
FaPUNp http://blog.numino.net/
apt-get install -y php5-mysql &&
A31r65 http://blog.numino.net/
apt-get install -y sendmail &&
85IB9U http://blog.numino.net/
apt-get install -y php-pear &&
LAbKxh http://blog.numino.net/
apt-get install -y sqlite3 &&
82TZy6 http://blog.numino.net/
apt-get install -y libsqlite3-dev &&
BeF1Qg http://blog.numino.net/
apt-get install -y git &&
ne7n1I http://blog.numino.net/
apt-get install -y mysql-client &&
Ki4SVj http://blog.numino.net/
apt-get install -y mysql-server &&
asroR4 http://blog.numino.net/
apt-get install -y curl &&
K5ho3o http://blog.numino.net/
apt-get install -y libboost-dev &&
nf7QWv http://blog.numino.net/
apt-get install -y libboost-test-dev &&
00jUvP http://blog.numino.net/
apt-get install -y libboost-program-options-dev &&
WTGXf8 http://blog.numino.net/
apt-get install -y libboost-system-dev &&
0ofMjY http://blog.numino.net/
apt-get install -y libboost-filesystem-dev &&
618sBf http://blog.numino.net/
apt-get install -y libevent-dev &&
Ezz1E5 http://blog.numino.net/
apt-get install -y pkg-config &&
fPDyJD http://blog.numino.net/
apt-get install -y g++ &&
NdtBV3 http://blog.numino.net/
apt-get install -y libglib2.0-dev &&
6xjudg http://blog.numino.net/
apt-get install -y libgtk2.0-dev &&
51hC7Y http://blog.numino.net/
#apt-get install -y librdkafka-dev librdkafka1 &&
aQW3VW http://blog.numino.net/
apt-get install -y python-dev &&
jKQroH http://blog.numino.net/
apt-get install -y openjdk-7-jre openjdk-7-jdk
stuQSD http://blog.numino.net/
安装过程提示输入mysql密码,设置的是beautiful,如设置别的密码,后续使用mysql相应修改
7i58DE http://blog.numino.net/
拷贝一些头文件,编译kbs会用到
FCsgWk http://blog.numino.net/
sudo cp /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h /usr/include/
4Gjh9X http://blog.numino.net/
sudo cp /usr/lib/jvm/java-7-openjdk-amd64/include/* /usr/include/ -a
9GfCiX http://blog.numino.net/
sudo cp /usr/lib/jvm/java-7-openjdk-amd64/include/linux/* /usr/include/ -a
d4ELcV http://blog.numino.net/
thirft使用 thrift-0.10.0.tar.gz (version 0.11.0/0.12.0在ubuntu12.04未能编译通过)
JJn636 http://blog.numino.net/
kafka使用 librdkafka-1.0.1.tar.gz (低版本有函数未定义)
1aJ9m9 http://blog.numino.net/
两者编译安装
N6HvHR http://blog.numino.net/
./configure –prefix=/usr && make && sudo make install
r4J325 http://blog.numino.net/
安装kbs
M9CYtS http://blog.numino.net/
解压kbs到/home/bbs/src目录
p70cE5 http://blog.numino.net/
src/Makefile.am
B0psdu http://blog.numino.net/
local_utl/Makefile.am
w7Z2Z3 http://blog.numino.net/
daemon/Makefile.am
fBPl4K http://blog.numino.net/
libBBS/Makefile.am
nqWwl6 http://blog.numino.net/
几个文件的 LDADD 增加 -lrdkafka
i95RpK http://blog.numino.net/
./autogen.sh
E2lhl5 http://blog.numino.net/
./configure –prefix=/home/bbs –enable-site=newsmth –with-php –with-mysql
3BLN1P http://blog.numino.net/
vi /etc/passwd, 找bbs的userid, grpid, 我这里是1000,1000, 更新到 site/newsmth.h 的 BBSUID, BBSGID
7oJnkh http://blog.numino.net/
site.h, src/extra.h 中暂时去掉以下KBS宏定义 (暂未编译通过)
QPaszn http://blog.numino.net/
//#define ENABLE_LIKE 1
xMg5l5 http://blog.numino.net/
//#define ENABLE_REFER_LIKE
W0dInZ http://blog.numino.net/
src/bbs.c 屏蔽函数 recommend_tg
FSwvwx http://blog.numino.net/
src/talk.c 屏蔽函数 display_user_summary display_userinfo
Ms8tJQ http://blog.numino.net/
libBBS/libbm.c 屏蔽函数 AO_int_fetch_and_add
qQRnAm http://blog.numino.net/
libBBS/extra.c 屏蔽函数 AO_int_fetch_and_add
l2KC7z http://blog.numino.net/
local_utl/awardonline.c 屏蔽函数 AO_int_fetch_and_add
0GRHzk http://blog.numino.net/
修改php模块待安装目录的权限
xJx1td http://blog.numino.net/
sudo chown bbs:bbs /usr/lib/php5 -R
5od1VL http://blog.numino.net/
make
Y4n3Gg http://blog.numino.net/
make install
D2kDzd http://blog.numino.net/
make install-home
更多相关内容...>>KBS安装指南

Bug报告 |  免责声明 |  联系我们 |  加入收藏

Copyright © 2006 NuminoStudio(www.numino.net) All Rights Reserved