更多相关内容...>>KBS安装指南
KBS安装指南
KBS安装指南
Syy33f http://blog.numino.net/
一些环境准备
7m5wkj http://blog.numino.net/
虚机(virtualbox 5.1+, 比如5.1.26)环境搭建
98NdRb http://blog.numino.net/
如果没有开启vt,需要开启,首先开机进入BIOS,Security,Virtualization,选择Enable即可
6GBCm0 http://blog.numino.net/
安装ubuntu12.04.5,地址 :
ccU101 http://blog.numino.net/
http://mirrors.163.com/ubuntu-releases/12.04/ubuntu-12.04.5-desktop-amd64.iso
L0A896 http://blog.numino.net/
比较古老的32位的或不支持vt技术的cpu选择:
9ZZ0YD http://blog.numino.net/
http://mirrors.163.com/ubuntu-releases/12.04/ubuntu-12.04.5-desktop-i386.iso
cbbXfc http://blog.numino.net/
虚机网络断开安装,否则会自动安装更新,耗时比较久,
4X7vnE http://blog.numino.net/
virtualbox - 显示 - 启用3d加速
G2SqBH http://blog.numino.net/
安装过程中,配置用户名设置为 bbs
hiwax3 http://blog.numino.net/
安装完成后去掉iso挂载,网络选择网络地址转换NAT,重启后
ADSrzQ http://blog.numino.net/
virtuabbox, 设备-安装增强功能(和主机共享文件)
1fvXF9 http://blog.numino.net/
df 查看光盘挂载地址
YTsCYV http://blog.numino.net/
cd /media/VBOXADDITIONS_5.1_xxxx (xxxx为上面命令结果补全)
4L84wY http://blog.numino.net/
sudo ./VBoxLinuxAdditions.run
505cS3 http://blog.numino.net/
重启,设备 - 共享文件夹, 选择windows主机的文件夹映射为 bbs目录为共享目录,选择固定分配,自动挂载
UbCAAi http://blog.numino.net/
sudo mount -t vboxsf bbs /mnt
LRFI41 http://blog.numino.net/
添加国内源
R1tJn7 http://blog.numino.net/
sudo vi /etc/apt/sources.list
bG1gJ2 http://blog.numino.net/
删除文本所有内容,添加:
b1F14e http://blog.numino.net/
1
b3Uy44 http://blog.numino.net/
2
TPehGQ http://blog.numino.net/
3
a2fOxE http://blog.numino.net/
4
aN7q7j http://blog.numino.net/
5
tRphmY http://blog.numino.net/
6
jOp2Uo http://blog.numino.net/
7
BJ5ixl http://blog.numino.net/
8
r1CqDW http://blog.numino.net/
9
s4t8ha http://blog.numino.net/
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
l3rz5l http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main restricted universe multiverse
4Ol1Zm http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main restricted universe multiverse
7490Gc http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
E8xeQ6 http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
OKKajs http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
KSSUaw http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
haFg2Q http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-security main restricted universe multiverse
37ArJY http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-security main restricted universe multiverse
t1dWiY http://blog.numino.net/
修改一下vim打开文件的编码方式,否则后续编辑有可能显示乱码
G24O5W http://blog.numino.net/
vim ~/.vimrc
vJJJAS http://blog.numino.net/
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
0LvxUZ http://blog.numino.net/
安装 sudo ./php_apache.sh 安装合适的 php, apache, mysql 等依赖库
H4aEQh http://blog.numino.net/
php_apache.sh 的内容:
b129rH http://blog.numino.net/
apt-get update &&
J2VYOS http://blog.numino.net/
apt-get install -y zlib1g-dev &&
301Kig http://blog.numino.net/
apt-get install -y autoconf &&
9IKO0Q http://blog.numino.net/
apt-get install -y automake &&
3mtpl4 http://blog.numino.net/
apt-get install -y libtool &&
WVpMHO http://blog.numino.net/
apt-get install -y libgmp3c2 &&
O76wO7 http://blog.numino.net/
apt-get install -y libgmp3-dev &&
9lWRZY http://blog.numino.net/
apt-get install -y openssl &&
uqHe65 http://blog.numino.net/
apt-get install -y apache2 &&
8lxCK1 http://blog.numino.net/
apt-get install -y libapache2-mod-php5 &&
i5FZR0 http://blog.numino.net/
apt-get install -y php5-dev &&
wKWx52 http://blog.numino.net/
apt-get install -y php5-gd &&
AHyE8a http://blog.numino.net/
apt-get install -y bison &&
Aq86mb http://blog.numino.net/
apt-get install -y byacc &&
jn10no http://blog.numino.net/
apt-get install -y tree &&
hT369N http://blog.numino.net/
apt-get install -y libcurl4-openssl-dev &&
6HxC97 http://blog.numino.net/
apt-get install -y dos2unix &&
J5TM0u http://blog.numino.net/
apt-get install -y libpcre3 &&
wb5sJN http://blog.numino.net/
apt-get install -y libpcre3-dev &&
rlv2sK http://blog.numino.net/
apt-get install -y libmysqlclient-dev &&
Wu94N4 http://blog.numino.net/
apt-get install -y php5-mysql &&
QXmV8g http://blog.numino.net/
apt-get install -y sendmail &&
az299h http://blog.numino.net/
apt-get install -y php-pear &&
Xs7gnb http://blog.numino.net/
apt-get install -y sqlite3 &&
EnqY5h http://blog.numino.net/
apt-get install -y libsqlite3-dev &&
j91N56 http://blog.numino.net/
apt-get install -y git &&
LMmlEJ http://blog.numino.net/
apt-get install -y mysql-client &&
9yl2yn http://blog.numino.net/
apt-get install -y mysql-server &&
ClGS0Q http://blog.numino.net/
apt-get install -y curl &&
J83N92 http://blog.numino.net/
apt-get install -y libboost-dev &&
xF3r8l http://blog.numino.net/
apt-get install -y libboost-test-dev &&
J55MJx http://blog.numino.net/
apt-get install -y libboost-program-options-dev &&
816gXv http://blog.numino.net/
apt-get install -y libboost-system-dev &&
6daJJH http://blog.numino.net/
apt-get install -y libboost-filesystem-dev &&
zN1Xg4 http://blog.numino.net/
apt-get install -y libevent-dev &&
W40kLi http://blog.numino.net/
apt-get install -y pkg-config &&
IWmm0t http://blog.numino.net/
apt-get install -y g++ &&
9T9hKT http://blog.numino.net/
apt-get install -y libglib2.0-dev &&
6xream http://blog.numino.net/
apt-get install -y libgtk2.0-dev &&
C10jYU http://blog.numino.net/
#apt-get install -y librdkafka-dev librdkafka1 &&
R502KN http://blog.numino.net/
apt-get install -y python-dev &&
12bDkj http://blog.numino.net/
apt-get install -y openjdk-7-jre openjdk-7-jdk
Zp067F http://blog.numino.net/
安装过程提示输入mysql密码,设置的是beautiful,如设置别的密码,后续使用mysql相应修改
2rSyo2 http://blog.numino.net/
拷贝一些头文件,编译kbs会用到
D4H1zd http://blog.numino.net/
sudo cp /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h /usr/include/
jF7DKm http://blog.numino.net/
sudo cp /usr/lib/jvm/java-7-openjdk-amd64/include/* /usr/include/ -a
CYU3av http://blog.numino.net/
sudo cp /usr/lib/jvm/java-7-openjdk-amd64/include/linux/* /usr/include/ -a
4KxjkI http://blog.numino.net/
thirft使用 thrift-0.10.0.tar.gz (version 0.11.0/0.12.0在ubuntu12.04未能编译通过)
J8Fo3F http://blog.numino.net/
kafka使用 librdkafka-1.0.1.tar.gz (低版本有函数未定义)
uu9grN http://blog.numino.net/
两者编译安装
yJc3Is http://blog.numino.net/
./configure –prefix=/usr && make && sudo make install
n9Ih77 http://blog.numino.net/
安装kbs
EBGKk9 http://blog.numino.net/
解压kbs到/home/bbs/src目录
Rl5DYp http://blog.numino.net/
src/Makefile.am
89bw2M http://blog.numino.net/
local_utl/Makefile.am
ZlGl77 http://blog.numino.net/
daemon/Makefile.am
f8G2Vi http://blog.numino.net/
libBBS/Makefile.am
HPCNYV http://blog.numino.net/
几个文件的 LDADD 增加 -lrdkafka
gsXtCD http://blog.numino.net/
./autogen.sh
ZwgGXZ http://blog.numino.net/
./configure –prefix=/home/bbs –enable-site=newsmth –with-php –with-mysql
8cF22p http://blog.numino.net/
vi /etc/passwd, 找bbs的userid, grpid, 我这里是1000,1000, 更新到 site/newsmth.h 的 BBSUID, BBSGID
sO6mzU http://blog.numino.net/
site.h, src/extra.h 中暂时去掉以下KBS宏定义 (暂未编译通过)
C3auiY http://blog.numino.net/
//#define ENABLE_LIKE 1
E0h6Wt http://blog.numino.net/
//#define ENABLE_REFER_LIKE
ALarMC http://blog.numino.net/
src/bbs.c 屏蔽函数 recommend_tg
8TRrMD http://blog.numino.net/
src/talk.c 屏蔽函数 display_user_summary display_userinfo
coF0xp http://blog.numino.net/
libBBS/libbm.c 屏蔽函数 AO_int_fetch_and_add
bEegLW http://blog.numino.net/
libBBS/extra.c 屏蔽函数 AO_int_fetch_and_add
DpSk6a http://blog.numino.net/
local_utl/awardonline.c 屏蔽函数 AO_int_fetch_and_add
JK65B9 http://blog.numino.net/
修改php模块待安装目录的权限
arY8t5 http://blog.numino.net/
sudo chown bbs:bbs /usr/lib/php5 -R
0iK8A3 http://blog.numino.net/
make
rP3S5C http://blog.numino.net/
make install
uHGY6u http://blog.numino.net/
make install-home
更多相关内容...>>KBS安装指南

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

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