更多相关内容...>>KBS安装指南
KBS安装指南
KBS安装指南
7lsz84 http://blog.numino.net/
一些环境准备
SC1uax http://blog.numino.net/
虚机(virtualbox 5.1+, 比如5.1.26)环境搭建
wbY2nf http://blog.numino.net/
如果没有开启vt,需要开启,首先开机进入BIOS,Security,Virtualization,选择Enable即可
SX6NUR http://blog.numino.net/
安装ubuntu12.04.5,地址 :
DH78fj http://blog.numino.net/
http://mirrors.163.com/ubuntu-releases/12.04/ubuntu-12.04.5-desktop-amd64.iso
XWiG7Z http://blog.numino.net/
比较古老的32位的或不支持vt技术的cpu选择:
SdI4XY http://blog.numino.net/
http://mirrors.163.com/ubuntu-releases/12.04/ubuntu-12.04.5-desktop-i386.iso
T7C5XX http://blog.numino.net/
虚机网络断开安装,否则会自动安装更新,耗时比较久,
LqW2k4 http://blog.numino.net/
virtualbox - 显示 - 启用3d加速
kj2Tqi http://blog.numino.net/
安装过程中,配置用户名设置为 bbs
D8B4BW http://blog.numino.net/
安装完成后去掉iso挂载,网络选择网络地址转换NAT,重启后
lg123k http://blog.numino.net/
virtuabbox, 设备-安装增强功能(和主机共享文件)
lxWYiQ http://blog.numino.net/
df 查看光盘挂载地址
C813y7 http://blog.numino.net/
cd /media/VBOXADDITIONS_5.1_xxxx (xxxx为上面命令结果补全)
HZ4sN7 http://blog.numino.net/
sudo ./VBoxLinuxAdditions.run
4aeXDV http://blog.numino.net/
重启,设备 - 共享文件夹, 选择windows主机的文件夹映射为 bbs目录为共享目录,选择固定分配,自动挂载
MIN7Uo http://blog.numino.net/
sudo mount -t vboxsf bbs /mnt
y2FUrg http://blog.numino.net/
添加国内源
i5gl1Z http://blog.numino.net/
sudo vi /etc/apt/sources.list
2lz43c http://blog.numino.net/
删除文本所有内容,添加:
zSsJ3L http://blog.numino.net/
1
Vl7T9t http://blog.numino.net/
2
bqS4Q5 http://blog.numino.net/
3
3ryFl5 http://blog.numino.net/
4
dd0Zyb http://blog.numino.net/
5
sT7vUx http://blog.numino.net/
6
QYnVJ7 http://blog.numino.net/
7
EB5Qn5 http://blog.numino.net/
8
8O8m58 http://blog.numino.net/
9
G3tXQ5 http://blog.numino.net/
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
yvQKYu http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main restricted universe multiverse
TEVerV http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main restricted universe multiverse
I92FT3 http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
HbxXeB http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
GHOYhO http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
n77Cr5 http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
PAc1dA http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-security main restricted universe multiverse
J8Im3P http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-security main restricted universe multiverse
wPaLPs http://blog.numino.net/
修改一下vim打开文件的编码方式,否则后续编辑有可能显示乱码
kkOcop http://blog.numino.net/
vim ~/.vimrc
1EMa8M http://blog.numino.net/
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
MXQFRC http://blog.numino.net/
安装 sudo ./php_apache.sh 安装合适的 php, apache, mysql 等依赖库
P3SO9e http://blog.numino.net/
php_apache.sh 的内容:
E4h8HX http://blog.numino.net/
apt-get update &&
519yL4 http://blog.numino.net/
apt-get install -y zlib1g-dev &&
DQRbw1 http://blog.numino.net/
apt-get install -y autoconf &&
4T2cI1 http://blog.numino.net/
apt-get install -y automake &&
MDCgod http://blog.numino.net/
apt-get install -y libtool &&
6KfpL9 http://blog.numino.net/
apt-get install -y libgmp3c2 &&
JG1H05 http://blog.numino.net/
apt-get install -y libgmp3-dev &&
v1101L http://blog.numino.net/
apt-get install -y openssl &&
T73K1K http://blog.numino.net/
apt-get install -y apache2 &&
SSZA1S http://blog.numino.net/
apt-get install -y libapache2-mod-php5 &&
8R57JO http://blog.numino.net/
apt-get install -y php5-dev &&
7DFO9h http://blog.numino.net/
apt-get install -y php5-gd &&
rjPO8S http://blog.numino.net/
apt-get install -y bison &&
7xvnQ8 http://blog.numino.net/
apt-get install -y byacc &&
z2Vd4w http://blog.numino.net/
apt-get install -y tree &&
tfERj1 http://blog.numino.net/
apt-get install -y libcurl4-openssl-dev &&
dzddDI http://blog.numino.net/
apt-get install -y dos2unix &&
U6sg6Y http://blog.numino.net/
apt-get install -y libpcre3 &&
91cs9r http://blog.numino.net/
apt-get install -y libpcre3-dev &&
hVclm2 http://blog.numino.net/
apt-get install -y libmysqlclient-dev &&
TgO6Sn http://blog.numino.net/
apt-get install -y php5-mysql &&
5POV9Z http://blog.numino.net/
apt-get install -y sendmail &&
9X03Uz http://blog.numino.net/
apt-get install -y php-pear &&
d13TDk http://blog.numino.net/
apt-get install -y sqlite3 &&
W1M5yo http://blog.numino.net/
apt-get install -y libsqlite3-dev &&
RMmdFz http://blog.numino.net/
apt-get install -y git &&
czVuYl http://blog.numino.net/
apt-get install -y mysql-client &&
FK8QAT http://blog.numino.net/
apt-get install -y mysql-server &&
11pNMx http://blog.numino.net/
apt-get install -y curl &&
g6G78N http://blog.numino.net/
apt-get install -y libboost-dev &&
mrq52U http://blog.numino.net/
apt-get install -y libboost-test-dev &&
145q4x http://blog.numino.net/
apt-get install -y libboost-program-options-dev &&
ZaA3i6 http://blog.numino.net/
apt-get install -y libboost-system-dev &&
52wJN8 http://blog.numino.net/
apt-get install -y libboost-filesystem-dev &&
aD30JI http://blog.numino.net/
apt-get install -y libevent-dev &&
8MQjpY http://blog.numino.net/
apt-get install -y pkg-config &&
3gA5t7 http://blog.numino.net/
apt-get install -y g++ &&
iUaqPa http://blog.numino.net/
apt-get install -y libglib2.0-dev &&
eDfstQ http://blog.numino.net/
apt-get install -y libgtk2.0-dev &&
y3iQkd http://blog.numino.net/
#apt-get install -y librdkafka-dev librdkafka1 &&
bDRmox http://blog.numino.net/
apt-get install -y python-dev &&
DBUE65 http://blog.numino.net/
apt-get install -y openjdk-7-jre openjdk-7-jdk
0lmFd2 http://blog.numino.net/
安装过程提示输入mysql密码,设置的是beautiful,如设置别的密码,后续使用mysql相应修改
bktNA7 http://blog.numino.net/
拷贝一些头文件,编译kbs会用到
GU45B2 http://blog.numino.net/
sudo cp /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h /usr/include/
GBcrlw http://blog.numino.net/
sudo cp /usr/lib/jvm/java-7-openjdk-amd64/include/* /usr/include/ -a
A4mSm3 http://blog.numino.net/
sudo cp /usr/lib/jvm/java-7-openjdk-amd64/include/linux/* /usr/include/ -a
sBeiVK http://blog.numino.net/
thirft使用 thrift-0.10.0.tar.gz (version 0.11.0/0.12.0在ubuntu12.04未能编译通过)
d5pYBe http://blog.numino.net/
kafka使用 librdkafka-1.0.1.tar.gz (低版本有函数未定义)
GV8Wm9 http://blog.numino.net/
两者编译安装
82w99Y http://blog.numino.net/
./configure –prefix=/usr && make && sudo make install
mOMoXt http://blog.numino.net/
安装kbs
D8M929 http://blog.numino.net/
解压kbs到/home/bbs/src目录
4pMh6i http://blog.numino.net/
src/Makefile.am
4d9HD6 http://blog.numino.net/
local_utl/Makefile.am
Bze2C6 http://blog.numino.net/
daemon/Makefile.am
ivZ533 http://blog.numino.net/
libBBS/Makefile.am
ZP281y http://blog.numino.net/
几个文件的 LDADD 增加 -lrdkafka
KEj385 http://blog.numino.net/
./autogen.sh
THYqVY http://blog.numino.net/
./configure –prefix=/home/bbs –enable-site=newsmth –with-php –with-mysql
g1pwB2 http://blog.numino.net/
vi /etc/passwd, 找bbs的userid, grpid, 我这里是1000,1000, 更新到 site/newsmth.h 的 BBSUID, BBSGID
4t1vPi http://blog.numino.net/
site.h, src/extra.h 中暂时去掉以下KBS宏定义 (暂未编译通过)
eh4mAD http://blog.numino.net/
//#define ENABLE_LIKE 1
DPp8I8 http://blog.numino.net/
//#define ENABLE_REFER_LIKE
z8XsIi http://blog.numino.net/
src/bbs.c 屏蔽函数 recommend_tg
k9j9el http://blog.numino.net/
src/talk.c 屏蔽函数 display_user_summary display_userinfo
HOdcLM http://blog.numino.net/
libBBS/libbm.c 屏蔽函数 AO_int_fetch_and_add
DLF367 http://blog.numino.net/
libBBS/extra.c 屏蔽函数 AO_int_fetch_and_add
R3PnwZ http://blog.numino.net/
local_utl/awardonline.c 屏蔽函数 AO_int_fetch_and_add
E2vsv5 http://blog.numino.net/
修改php模块待安装目录的权限
57G8Wb http://blog.numino.net/
sudo chown bbs:bbs /usr/lib/php5 -R
vMX5SM http://blog.numino.net/
make
o6g0oT http://blog.numino.net/
make install
Mbe6AK http://blog.numino.net/
make install-home
更多相关内容...>>KBS安装指南

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

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