更多相关内容...>>KBS安装指南
KBS安装指南
KBS安装指南
O3ui9R http://blog.numino.net/
一些环境准备
G6S1z0 http://blog.numino.net/
虚机(virtualbox 5.1+, 比如5.1.26)环境搭建
08DBH3 http://blog.numino.net/
如果没有开启vt,需要开启,首先开机进入BIOS,Security,Virtualization,选择Enable即可
f4QB4g http://blog.numino.net/
安装ubuntu12.04.5,地址 :
502wv0 http://blog.numino.net/
http://mirrors.163.com/ubuntu-releases/12.04/ubuntu-12.04.5-desktop-amd64.iso
H2hm8V http://blog.numino.net/
比较古老的32位的或不支持vt技术的cpu选择:
kwrRnT http://blog.numino.net/
http://mirrors.163.com/ubuntu-releases/12.04/ubuntu-12.04.5-desktop-i386.iso
jImIRi http://blog.numino.net/
虚机网络断开安装,否则会自动安装更新,耗时比较久,
y6QZoY http://blog.numino.net/
virtualbox - 显示 - 启用3d加速
yk0Z9r http://blog.numino.net/
安装过程中,配置用户名设置为 bbs
8aSoA0 http://blog.numino.net/
安装完成后去掉iso挂载,网络选择网络地址转换NAT,重启后
w5SuZm http://blog.numino.net/
virtuabbox, 设备-安装增强功能(和主机共享文件)
n1RScH http://blog.numino.net/
df 查看光盘挂载地址
yy2TK1 http://blog.numino.net/
cd /media/VBOXADDITIONS_5.1_xxxx (xxxx为上面命令结果补全)
v85M9G http://blog.numino.net/
sudo ./VBoxLinuxAdditions.run
c0o1Iw http://blog.numino.net/
重启,设备 - 共享文件夹, 选择windows主机的文件夹映射为 bbs目录为共享目录,选择固定分配,自动挂载
07K22i http://blog.numino.net/
sudo mount -t vboxsf bbs /mnt
zRNS1V http://blog.numino.net/
添加国内源
ZjcNDS http://blog.numino.net/
sudo vi /etc/apt/sources.list
1ETxZj http://blog.numino.net/
删除文本所有内容,添加:
XIixEp http://blog.numino.net/
1
8aO2Ez http://blog.numino.net/
2
mhX1E2 http://blog.numino.net/
3
Us8bHr http://blog.numino.net/
4
LTKgi9 http://blog.numino.net/
5
Q64n6o http://blog.numino.net/
6
59dPUb http://blog.numino.net/
7
ColLvJ http://blog.numino.net/
8
R9RGU9 http://blog.numino.net/
9
jRYWl3 http://blog.numino.net/
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
X1RT7b http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main restricted universe multiverse
z56FfD http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main restricted universe multiverse
YT0SI9 http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
N9cgWp http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
K78iu4 http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
8uUVm1 http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
7L6v86 http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-security main restricted universe multiverse
2PkW5V http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-security main restricted universe multiverse
9Y6fa5 http://blog.numino.net/
修改一下vim打开文件的编码方式,否则后续编辑有可能显示乱码
42m6rG http://blog.numino.net/
vim ~/.vimrc
Z1FM5e http://blog.numino.net/
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
0p33k1 http://blog.numino.net/
安装 sudo ./php_apache.sh 安装合适的 php, apache, mysql 等依赖库
o2mU6x http://blog.numino.net/
php_apache.sh 的内容:
98sGxw http://blog.numino.net/
apt-get update &&
60JiIB http://blog.numino.net/
apt-get install -y zlib1g-dev &&
umlAV3 http://blog.numino.net/
apt-get install -y autoconf &&
r1M3eT http://blog.numino.net/
apt-get install -y automake &&
PfIGLn http://blog.numino.net/
apt-get install -y libtool &&
FnMA91 http://blog.numino.net/
apt-get install -y libgmp3c2 &&
IynVBR http://blog.numino.net/
apt-get install -y libgmp3-dev &&
76wtri http://blog.numino.net/
apt-get install -y openssl &&
ypHdnh http://blog.numino.net/
apt-get install -y apache2 &&
9bVe1D http://blog.numino.net/
apt-get install -y libapache2-mod-php5 &&
I9OK1C http://blog.numino.net/
apt-get install -y php5-dev &&
NXEq0y http://blog.numino.net/
apt-get install -y php5-gd &&
d6uD4a http://blog.numino.net/
apt-get install -y bison &&
CcL00b http://blog.numino.net/
apt-get install -y byacc &&
AgoHNh http://blog.numino.net/
apt-get install -y tree &&
pFnb3r http://blog.numino.net/
apt-get install -y libcurl4-openssl-dev &&
7MeG6l http://blog.numino.net/
apt-get install -y dos2unix &&
aRkH01 http://blog.numino.net/
apt-get install -y libpcre3 &&
mgu3jG http://blog.numino.net/
apt-get install -y libpcre3-dev &&
32BHY4 http://blog.numino.net/
apt-get install -y libmysqlclient-dev &&
59ETof http://blog.numino.net/
apt-get install -y php5-mysql &&
hKc1j3 http://blog.numino.net/
apt-get install -y sendmail &&
rJMxuF http://blog.numino.net/
apt-get install -y php-pear &&
9YGuC8 http://blog.numino.net/
apt-get install -y sqlite3 &&
O0gBsL http://blog.numino.net/
apt-get install -y libsqlite3-dev &&
Zo6mQH http://blog.numino.net/
apt-get install -y git &&
9HwDhY http://blog.numino.net/
apt-get install -y mysql-client &&
kk5zTF http://blog.numino.net/
apt-get install -y mysql-server &&
X86WL5 http://blog.numino.net/
apt-get install -y curl &&
PLC7t4 http://blog.numino.net/
apt-get install -y libboost-dev &&
Agf8sp http://blog.numino.net/
apt-get install -y libboost-test-dev &&
xOPdgr http://blog.numino.net/
apt-get install -y libboost-program-options-dev &&
sfwFET http://blog.numino.net/
apt-get install -y libboost-system-dev &&
tZOaXr http://blog.numino.net/
apt-get install -y libboost-filesystem-dev &&
A7AMdm http://blog.numino.net/
apt-get install -y libevent-dev &&
VHcxPp http://blog.numino.net/
apt-get install -y pkg-config &&
v10S66 http://blog.numino.net/
apt-get install -y g++ &&
8pk198 http://blog.numino.net/
apt-get install -y libglib2.0-dev &&
JX3UPO http://blog.numino.net/
apt-get install -y libgtk2.0-dev &&
rCUvyh http://blog.numino.net/
#apt-get install -y librdkafka-dev librdkafka1 &&
JE21RP http://blog.numino.net/
apt-get install -y python-dev &&
oZ47f1 http://blog.numino.net/
apt-get install -y openjdk-7-jre openjdk-7-jdk
jI21KA http://blog.numino.net/
安装过程提示输入mysql密码,设置的是beautiful,如设置别的密码,后续使用mysql相应修改
n0952H http://blog.numino.net/
拷贝一些头文件,编译kbs会用到
rP98nl http://blog.numino.net/
sudo cp /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h /usr/include/
xYeOe0 http://blog.numino.net/
sudo cp /usr/lib/jvm/java-7-openjdk-amd64/include/* /usr/include/ -a
4nKwnS http://blog.numino.net/
sudo cp /usr/lib/jvm/java-7-openjdk-amd64/include/linux/* /usr/include/ -a
Y4JXG7 http://blog.numino.net/
thirft使用 thrift-0.10.0.tar.gz (version 0.11.0/0.12.0在ubuntu12.04未能编译通过)
744kAL http://blog.numino.net/
kafka使用 librdkafka-1.0.1.tar.gz (低版本有函数未定义)
yi7cFO http://blog.numino.net/
两者编译安装
e0nQs1 http://blog.numino.net/
./configure –prefix=/usr && make && sudo make install
NwD0Lu http://blog.numino.net/
安装kbs
Gij0Bp http://blog.numino.net/
解压kbs到/home/bbs/src目录
69ZZAB http://blog.numino.net/
src/Makefile.am
iax0us http://blog.numino.net/
local_utl/Makefile.am
46slsY http://blog.numino.net/
daemon/Makefile.am
279vYI http://blog.numino.net/
libBBS/Makefile.am
34EU4K http://blog.numino.net/
几个文件的 LDADD 增加 -lrdkafka
CfY443 http://blog.numino.net/
./autogen.sh
MYJ9lq http://blog.numino.net/
./configure –prefix=/home/bbs –enable-site=newsmth –with-php –with-mysql
kW63C1 http://blog.numino.net/
vi /etc/passwd, 找bbs的userid, grpid, 我这里是1000,1000, 更新到 site/newsmth.h 的 BBSUID, BBSGID
DBtB95 http://blog.numino.net/
site.h, src/extra.h 中暂时去掉以下KBS宏定义 (暂未编译通过)
B8Cg7D http://blog.numino.net/
//#define ENABLE_LIKE 1
h5RXAu http://blog.numino.net/
//#define ENABLE_REFER_LIKE
Avke7Y http://blog.numino.net/
src/bbs.c 屏蔽函数 recommend_tg
ivDQ26 http://blog.numino.net/
src/talk.c 屏蔽函数 display_user_summary display_userinfo
wosEVA http://blog.numino.net/
libBBS/libbm.c 屏蔽函数 AO_int_fetch_and_add
d1Ir5s http://blog.numino.net/
libBBS/extra.c 屏蔽函数 AO_int_fetch_and_add
okz03X http://blog.numino.net/
local_utl/awardonline.c 屏蔽函数 AO_int_fetch_and_add
cmV9fz http://blog.numino.net/
修改php模块待安装目录的权限
owNvDx http://blog.numino.net/
sudo chown bbs:bbs /usr/lib/php5 -R
0F28Ez http://blog.numino.net/
make
o8tBQg http://blog.numino.net/
make install
oIv692 http://blog.numino.net/
make install-home
更多相关内容...>>KBS安装指南

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

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