更多相关内容...>>KBS安装指南
KBS安装指南
KBS安装指南
nr6Yd5 http://blog.numino.net/
一些环境准备
PIMOy2 http://blog.numino.net/
虚机(virtualbox 5.1+, 比如5.1.26)环境搭建
N76wY7 http://blog.numino.net/
如果没有开启vt,需要开启,首先开机进入BIOS,Security,Virtualization,选择Enable即可
81m8Fh http://blog.numino.net/
安装ubuntu12.04.5,地址 :
SdGtrM http://blog.numino.net/
http://mirrors.163.com/ubuntu-releases/12.04/ubuntu-12.04.5-desktop-amd64.iso
4FVcBD http://blog.numino.net/
比较古老的32位的或不支持vt技术的cpu选择:
1RbTQv http://blog.numino.net/
http://mirrors.163.com/ubuntu-releases/12.04/ubuntu-12.04.5-desktop-i386.iso
b9bUtc http://blog.numino.net/
虚机网络断开安装,否则会自动安装更新,耗时比较久,
V4F5TR http://blog.numino.net/
virtualbox - 显示 - 启用3d加速
n3n59r http://blog.numino.net/
安装过程中,配置用户名设置为 bbs
a0lkhz http://blog.numino.net/
安装完成后去掉iso挂载,网络选择网络地址转换NAT,重启后
8krI17 http://blog.numino.net/
virtuabbox, 设备-安装增强功能(和主机共享文件)
VfQA2B http://blog.numino.net/
df 查看光盘挂载地址
5Jr8x4 http://blog.numino.net/
cd /media/VBOXADDITIONS_5.1_xxxx (xxxx为上面命令结果补全)
vZ9yLQ http://blog.numino.net/
sudo ./VBoxLinuxAdditions.run
858R5P http://blog.numino.net/
重启,设备 - 共享文件夹, 选择windows主机的文件夹映射为 bbs目录为共享目录,选择固定分配,自动挂载
D0H1Qo http://blog.numino.net/
sudo mount -t vboxsf bbs /mnt
WuE2Ne http://blog.numino.net/
添加国内源
Dkxutu http://blog.numino.net/
sudo vi /etc/apt/sources.list
FXqC4f http://blog.numino.net/
删除文本所有内容,添加:
s181VO http://blog.numino.net/
1
Q5d2uM http://blog.numino.net/
2
FeGkz3 http://blog.numino.net/
3
r8356C http://blog.numino.net/
4
34Bdhc http://blog.numino.net/
5
QF3nhD http://blog.numino.net/
6
egIKvo http://blog.numino.net/
7
9GyDMZ http://blog.numino.net/
8
QTZjg7 http://blog.numino.net/
9
h48ypy http://blog.numino.net/
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
y93ITl http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main restricted universe multiverse
827KYS http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main restricted universe multiverse
X13wk5 http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
o31723 http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
1392VK http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
gk61Mm http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
N737JC http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-security main restricted universe multiverse
LY4qC4 http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-security main restricted universe multiverse
1s8sFP http://blog.numino.net/
修改一下vim打开文件的编码方式,否则后续编辑有可能显示乱码
7Ch27E http://blog.numino.net/
vim ~/.vimrc
qSqX8l http://blog.numino.net/
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
9EKacf http://blog.numino.net/
安装 sudo ./php_apache.sh 安装合适的 php, apache, mysql 等依赖库
2uk8Iu http://blog.numino.net/
php_apache.sh 的内容:
KvvLzi http://blog.numino.net/
apt-get update &&
2qDUkN http://blog.numino.net/
apt-get install -y zlib1g-dev &&
JJfkl5 http://blog.numino.net/
apt-get install -y autoconf &&
5DSA0z http://blog.numino.net/
apt-get install -y automake &&
P70o3l http://blog.numino.net/
apt-get install -y libtool &&
0baZOy http://blog.numino.net/
apt-get install -y libgmp3c2 &&
8a2GcE http://blog.numino.net/
apt-get install -y libgmp3-dev &&
ZKCk2S http://blog.numino.net/
apt-get install -y openssl &&
uCX0Ac http://blog.numino.net/
apt-get install -y apache2 &&
UFp47f http://blog.numino.net/
apt-get install -y libapache2-mod-php5 &&
Xn78N2 http://blog.numino.net/
apt-get install -y php5-dev &&
gxllqL http://blog.numino.net/
apt-get install -y php5-gd &&
I9CY0h http://blog.numino.net/
apt-get install -y bison &&
45YEiq http://blog.numino.net/
apt-get install -y byacc &&
m247PP http://blog.numino.net/
apt-get install -y tree &&
JzMpU6 http://blog.numino.net/
apt-get install -y libcurl4-openssl-dev &&
zJS1yX http://blog.numino.net/
apt-get install -y dos2unix &&
626zvg http://blog.numino.net/
apt-get install -y libpcre3 &&
NruU4I http://blog.numino.net/
apt-get install -y libpcre3-dev &&
hL4dNY http://blog.numino.net/
apt-get install -y libmysqlclient-dev &&
VZMMvE http://blog.numino.net/
apt-get install -y php5-mysql &&
ylR8Qn http://blog.numino.net/
apt-get install -y sendmail &&
2o2QK2 http://blog.numino.net/
apt-get install -y php-pear &&
on2qP4 http://blog.numino.net/
apt-get install -y sqlite3 &&
66XyK9 http://blog.numino.net/
apt-get install -y libsqlite3-dev &&
S879M3 http://blog.numino.net/
apt-get install -y git &&
O7VL3P http://blog.numino.net/
apt-get install -y mysql-client &&
kFhMte http://blog.numino.net/
apt-get install -y mysql-server &&
qH0f6Y http://blog.numino.net/
apt-get install -y curl &&
c6W989 http://blog.numino.net/
apt-get install -y libboost-dev &&
1fTtQa http://blog.numino.net/
apt-get install -y libboost-test-dev &&
sZiBE6 http://blog.numino.net/
apt-get install -y libboost-program-options-dev &&
PX5xlu http://blog.numino.net/
apt-get install -y libboost-system-dev &&
lRGrMf http://blog.numino.net/
apt-get install -y libboost-filesystem-dev &&
013hS8 http://blog.numino.net/
apt-get install -y libevent-dev &&
oYuRkB http://blog.numino.net/
apt-get install -y pkg-config &&
YARyAH http://blog.numino.net/
apt-get install -y g++ &&
BVGkw7 http://blog.numino.net/
apt-get install -y libglib2.0-dev &&
O1ZCSj http://blog.numino.net/
apt-get install -y libgtk2.0-dev &&
tzhg5h http://blog.numino.net/
#apt-get install -y librdkafka-dev librdkafka1 &&
4V2uvN http://blog.numino.net/
apt-get install -y python-dev &&
4bg28O http://blog.numino.net/
apt-get install -y openjdk-7-jre openjdk-7-jdk
45uqhy http://blog.numino.net/
安装过程提示输入mysql密码,设置的是beautiful,如设置别的密码,后续使用mysql相应修改
PS1SlY http://blog.numino.net/
拷贝一些头文件,编译kbs会用到
W7cyjS http://blog.numino.net/
sudo cp /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h /usr/include/
IIE524 http://blog.numino.net/
sudo cp /usr/lib/jvm/java-7-openjdk-amd64/include/* /usr/include/ -a
YL0ll5 http://blog.numino.net/
sudo cp /usr/lib/jvm/java-7-openjdk-amd64/include/linux/* /usr/include/ -a
awmHDX http://blog.numino.net/
thirft使用 thrift-0.10.0.tar.gz (version 0.11.0/0.12.0在ubuntu12.04未能编译通过)
xUsonq http://blog.numino.net/
kafka使用 librdkafka-1.0.1.tar.gz (低版本有函数未定义)
aYYR7l http://blog.numino.net/
两者编译安装
c5CIfJ http://blog.numino.net/
./configure –prefix=/usr && make && sudo make install
yjd71q http://blog.numino.net/
安装kbs
mtkYIY http://blog.numino.net/
解压kbs到/home/bbs/src目录
PEX9oL http://blog.numino.net/
src/Makefile.am
Yyza1G http://blog.numino.net/
local_utl/Makefile.am
v182GB http://blog.numino.net/
daemon/Makefile.am
cpjte9 http://blog.numino.net/
libBBS/Makefile.am
19gye9 http://blog.numino.net/
几个文件的 LDADD 增加 -lrdkafka
5DKaoa http://blog.numino.net/
./autogen.sh
8mnhcc http://blog.numino.net/
./configure –prefix=/home/bbs –enable-site=newsmth –with-php –with-mysql
6XSJCi http://blog.numino.net/
vi /etc/passwd, 找bbs的userid, grpid, 我这里是1000,1000, 更新到 site/newsmth.h 的 BBSUID, BBSGID
06hAst http://blog.numino.net/
site.h, src/extra.h 中暂时去掉以下KBS宏定义 (暂未编译通过)
E60xCA http://blog.numino.net/
//#define ENABLE_LIKE 1
HkfeTH http://blog.numino.net/
//#define ENABLE_REFER_LIKE
aS81Lc http://blog.numino.net/
src/bbs.c 屏蔽函数 recommend_tg
Z84qa6 http://blog.numino.net/
src/talk.c 屏蔽函数 display_user_summary display_userinfo
yNaD9j http://blog.numino.net/
libBBS/libbm.c 屏蔽函数 AO_int_fetch_and_add
MsDx1G http://blog.numino.net/
libBBS/extra.c 屏蔽函数 AO_int_fetch_and_add
6AH39Z http://blog.numino.net/
local_utl/awardonline.c 屏蔽函数 AO_int_fetch_and_add
3xa1Wp http://blog.numino.net/
修改php模块待安装目录的权限
VWNKY4 http://blog.numino.net/
sudo chown bbs:bbs /usr/lib/php5 -R
d8kV9e http://blog.numino.net/
make
KNIH67 http://blog.numino.net/
make install
kneHqk http://blog.numino.net/
make install-home
更多相关内容...>>KBS安装指南

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

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