更多相关内容...>>KBS安装指南
KBS安装指南
KBS安装指南
OpUiB8 http://blog.numino.net/
一些环境准备
EE5mE3 http://blog.numino.net/
虚机(virtualbox 5.1+, 比如5.1.26)环境搭建
49iMV4 http://blog.numino.net/
如果没有开启vt,需要开启,首先开机进入BIOS,Security,Virtualization,选择Enable即可
18ppZ6 http://blog.numino.net/
安装ubuntu12.04.5,地址 :
4xGJkJ http://blog.numino.net/
http://mirrors.163.com/ubuntu-releases/12.04/ubuntu-12.04.5-desktop-amd64.iso
V2LEHq http://blog.numino.net/
比较古老的32位的或不支持vt技术的cpu选择:
7hD2yr http://blog.numino.net/
http://mirrors.163.com/ubuntu-releases/12.04/ubuntu-12.04.5-desktop-i386.iso
5J8AWR http://blog.numino.net/
虚机网络断开安装,否则会自动安装更新,耗时比较久,
hPnZq6 http://blog.numino.net/
virtualbox - 显示 - 启用3d加速
TD7JFM http://blog.numino.net/
安装过程中,配置用户名设置为 bbs
1tYFZU http://blog.numino.net/
安装完成后去掉iso挂载,网络选择网络地址转换NAT,重启后
wbueWH http://blog.numino.net/
virtuabbox, 设备-安装增强功能(和主机共享文件)
3mqSMj http://blog.numino.net/
df 查看光盘挂载地址
9XTf2a http://blog.numino.net/
cd /media/VBOXADDITIONS_5.1_xxxx (xxxx为上面命令结果补全)
8Kig7F http://blog.numino.net/
sudo ./VBoxLinuxAdditions.run
2Mjj56 http://blog.numino.net/
重启,设备 - 共享文件夹, 选择windows主机的文件夹映射为 bbs目录为共享目录,选择固定分配,自动挂载
9skmd4 http://blog.numino.net/
sudo mount -t vboxsf bbs /mnt
fYCR4V http://blog.numino.net/
添加国内源
tvimjm http://blog.numino.net/
sudo vi /etc/apt/sources.list
ujk4ha http://blog.numino.net/
删除文本所有内容,添加:
yZoPhb http://blog.numino.net/
1
92woT6 http://blog.numino.net/
2
mZbmJw http://blog.numino.net/
3
m7RAiT http://blog.numino.net/
4
kH93Du http://blog.numino.net/
5
8fdjO2 http://blog.numino.net/
6
K0Xty1 http://blog.numino.net/
7
E6WC8j http://blog.numino.net/
8
6WHjYi http://blog.numino.net/
9
l46air http://blog.numino.net/
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
H6SnaG http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main restricted universe multiverse
8N9N8y http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main restricted universe multiverse
OAFz1w http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
6Q5nGa http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
nEMe40 http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
xvsxn3 http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
cLHPf8 http://blog.numino.net/
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-security main restricted universe multiverse
3ksukI http://blog.numino.net/
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-security main restricted universe multiverse
uVTbNf http://blog.numino.net/
修改一下vim打开文件的编码方式,否则后续编辑有可能显示乱码
GtoqBu http://blog.numino.net/
vim ~/.vimrc
P2MAYg http://blog.numino.net/
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
m2Or6C http://blog.numino.net/
安装 sudo ./php_apache.sh 安装合适的 php, apache, mysql 等依赖库
RUVQ36 http://blog.numino.net/
php_apache.sh 的内容:
pj7X0Y http://blog.numino.net/
apt-get update &&
cIkp7Z http://blog.numino.net/
apt-get install -y zlib1g-dev &&
H3zfwI http://blog.numino.net/
apt-get install -y autoconf &&
n0e1k4 http://blog.numino.net/
apt-get install -y automake &&
h6n7ht http://blog.numino.net/
apt-get install -y libtool &&
Ut39Gv http://blog.numino.net/
apt-get install -y libgmp3c2 &&
Z64j02 http://blog.numino.net/
apt-get install -y libgmp3-dev &&
PjbBOM http://blog.numino.net/
apt-get install -y openssl &&
Bk39w9 http://blog.numino.net/
apt-get install -y apache2 &&
v6N8t2 http://blog.numino.net/
apt-get install -y libapache2-mod-php5 &&
mdg9xv http://blog.numino.net/
apt-get install -y php5-dev &&
4YZqja http://blog.numino.net/
apt-get install -y php5-gd &&
tkg1CB http://blog.numino.net/
apt-get install -y bison &&
14GOTO http://blog.numino.net/
apt-get install -y byacc &&
2EH16U http://blog.numino.net/
apt-get install -y tree &&
oyOMoG http://blog.numino.net/
apt-get install -y libcurl4-openssl-dev &&
8aDlyn http://blog.numino.net/
apt-get install -y dos2unix &&
GdoJvh http://blog.numino.net/
apt-get install -y libpcre3 &&
xh0hV5 http://blog.numino.net/
apt-get install -y libpcre3-dev &&
fXp8K4 http://blog.numino.net/
apt-get install -y libmysqlclient-dev &&
e5AxV4 http://blog.numino.net/
apt-get install -y php5-mysql &&
S47F9r http://blog.numino.net/
apt-get install -y sendmail &&
70mpz7 http://blog.numino.net/
apt-get install -y php-pear &&
TXTIPH http://blog.numino.net/
apt-get install -y sqlite3 &&
NR1Jxu http://blog.numino.net/
apt-get install -y libsqlite3-dev &&
XBPsZG http://blog.numino.net/
apt-get install -y git &&
mMn6hO http://blog.numino.net/
apt-get install -y mysql-client &&
y2BLP6 http://blog.numino.net/
apt-get install -y mysql-server &&
ptAZ9x http://blog.numino.net/
apt-get install -y curl &&
qZVpXp http://blog.numino.net/
apt-get install -y libboost-dev &&
qE43w2 http://blog.numino.net/
apt-get install -y libboost-test-dev &&
5dM9rl http://blog.numino.net/
apt-get install -y libboost-program-options-dev &&
IoO8XN http://blog.numino.net/
apt-get install -y libboost-system-dev &&
5QfUJ0 http://blog.numino.net/
apt-get install -y libboost-filesystem-dev &&
Ll8q5k http://blog.numino.net/
apt-get install -y libevent-dev &&
bJCOmr http://blog.numino.net/
apt-get install -y pkg-config &&
lD29n9 http://blog.numino.net/
apt-get install -y g++ &&
Xuu0sM http://blog.numino.net/
apt-get install -y libglib2.0-dev &&
b0bKep http://blog.numino.net/
apt-get install -y libgtk2.0-dev &&
gwRi85 http://blog.numino.net/
#apt-get install -y librdkafka-dev librdkafka1 &&
K4ZY6H http://blog.numino.net/
apt-get install -y python-dev &&
Fr2Ecs http://blog.numino.net/
apt-get install -y openjdk-7-jre openjdk-7-jdk
a2ALYT http://blog.numino.net/
安装过程提示输入mysql密码,设置的是beautiful,如设置别的密码,后续使用mysql相应修改
EeRO23 http://blog.numino.net/
拷贝一些头文件,编译kbs会用到
6fO2YG http://blog.numino.net/
sudo cp /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h /usr/include/
20S0zj http://blog.numino.net/
sudo cp /usr/lib/jvm/java-7-openjdk-amd64/include/* /usr/include/ -a
6gQlhM http://blog.numino.net/
sudo cp /usr/lib/jvm/java-7-openjdk-amd64/include/linux/* /usr/include/ -a
hRl131 http://blog.numino.net/
thirft使用 thrift-0.10.0.tar.gz (version 0.11.0/0.12.0在ubuntu12.04未能编译通过)
P2GYQl http://blog.numino.net/
kafka使用 librdkafka-1.0.1.tar.gz (低版本有函数未定义)
ADEXxe http://blog.numino.net/
两者编译安装
jP7EEY http://blog.numino.net/
./configure –prefix=/usr && make && sudo make install
Naf9Mi http://blog.numino.net/
安装kbs
H2eZY4 http://blog.numino.net/
解压kbs到/home/bbs/src目录
P22sHm http://blog.numino.net/
src/Makefile.am
NXdxmT http://blog.numino.net/
local_utl/Makefile.am
7LfCkt http://blog.numino.net/
daemon/Makefile.am
SEij60 http://blog.numino.net/
libBBS/Makefile.am
W3U81V http://blog.numino.net/
几个文件的 LDADD 增加 -lrdkafka
Xn3191 http://blog.numino.net/
./autogen.sh
9Kk0CL http://blog.numino.net/
./configure –prefix=/home/bbs –enable-site=newsmth –with-php –with-mysql
WcNfuR http://blog.numino.net/
vi /etc/passwd, 找bbs的userid, grpid, 我这里是1000,1000, 更新到 site/newsmth.h 的 BBSUID, BBSGID
R4s1zS http://blog.numino.net/
site.h, src/extra.h 中暂时去掉以下KBS宏定义 (暂未编译通过)
M9gXFd http://blog.numino.net/
//#define ENABLE_LIKE 1
4R5lbF http://blog.numino.net/
//#define ENABLE_REFER_LIKE
6TR27a http://blog.numino.net/
src/bbs.c 屏蔽函数 recommend_tg
wxJ7ua http://blog.numino.net/
src/talk.c 屏蔽函数 display_user_summary display_userinfo
GUX0bE http://blog.numino.net/
libBBS/libbm.c 屏蔽函数 AO_int_fetch_and_add
I9DsRk http://blog.numino.net/
libBBS/extra.c 屏蔽函数 AO_int_fetch_and_add
4QXKiZ http://blog.numino.net/
local_utl/awardonline.c 屏蔽函数 AO_int_fetch_and_add
3Fz67j http://blog.numino.net/
修改php模块待安装目录的权限
3lweEQ http://blog.numino.net/
sudo chown bbs:bbs /usr/lib/php5 -R
rX32q2 http://blog.numino.net/
make
k4bd09 http://blog.numino.net/
make install
877Fe0 http://blog.numino.net/
make install-home
更多相关内容...>>KBS安装指南

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

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