更多相关内容...>>KBS安装指南
KBS安装指南
KBS安装指南
79ucP3 http://www.numino.net
一些环境准备
4OaqsZ http://www.numino.net
虚机(virtualbox 5.1+, 比如5.1.26)环境搭建
P4ckXR http://www.numino.net
如果没有开启vt,需要开启,首先开机进入BIOS,Security,Virtualization,选择Enable即可
g8r79Q http://www.numino.net
安装ubuntu12.04.5,地址 :
EK6VAK http://www.numino.net
http://mirrors.163.com/ubuntu-releases/12.04/ubuntu-12.04.5-desktop-amd64.iso
bj6Vf7 http://www.numino.net
比较古老的32位的或不支持vt技术的cpu选择:
fKBrN5 http://www.numino.net
http://mirrors.163.com/ubuntu-releases/12.04/ubuntu-12.04.5-desktop-i386.iso
a62g5n http://www.numino.net
虚机网络断开安装,否则会自动安装更新,耗时比较久,
86z5H2 http://www.numino.net
virtualbox - 显示 - 启用3d加速
NzUFBC http://www.numino.net
安装过程中,配置用户名设置为 bbs
tFpL62 http://www.numino.net
安装完成后去掉iso挂载,网络选择网络地址转换NAT,重启后
R3wgUi http://www.numino.net
virtuabbox, 设备-安装增强功能(和主机共享文件)
UjCmpX http://www.numino.net
df 查看光盘挂载地址
tl57T2 http://www.numino.net
cd /media/VBOXADDITIONS_5.1_xxxx (xxxx为上面命令结果补全)
J71nZc http://www.numino.net
sudo ./VBoxLinuxAdditions.run
xR5NZY http://www.numino.net
重启,设备 - 共享文件夹, 选择windows主机的文件夹映射为 bbs目录为共享目录,选择固定分配,自动挂载
Vt3Zn3 http://www.numino.net
sudo mount -t vboxsf bbs /mnt
DGqGGz http://www.numino.net
添加国内源
9bX97M http://www.numino.net
sudo vi /etc/apt/sources.list
5cEh1c http://www.numino.net
删除文本所有内容,添加:
z2wj9T http://www.numino.net
1
3HeQwQ http://www.numino.net
2
y9tjr9 http://www.numino.net
3
MFrctu http://www.numino.net
4
AMGpF9 http://www.numino.net
5
M8P7x4 http://www.numino.net
6
4qL3mw http://www.numino.net
7
B6hcQo http://www.numino.net
8
H2Nezv http://www.numino.net
9
NvxsQ7 http://www.numino.net
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
7JEv9Y http://www.numino.net
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main restricted universe multiverse
rqOMx7 http://www.numino.net
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main restricted universe multiverse
5Z78P9 http://www.numino.net
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
V2DWw1 http://www.numino.net
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
3gcJL6 http://www.numino.net
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
Rz3CCm http://www.numino.net
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
188u6b http://www.numino.net
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-security main restricted universe multiverse
aqY7JA http://www.numino.net
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-security main restricted universe multiverse
md9Bx6 http://www.numino.net
修改一下vim打开文件的编码方式,否则后续编辑有可能显示乱码
2xb4Lx http://www.numino.net
vim ~/.vimrc
1xYtUm http://www.numino.net
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
XW2LTJ http://www.numino.net
安装 sudo ./php_apache.sh 安装合适的 php, apache, mysql 等依赖库
G4ie19 http://www.numino.net
php_apache.sh 的内容:
I6XC38 http://www.numino.net
apt-get update &&
MLPhT4 http://www.numino.net
apt-get install -y zlib1g-dev &&
JPZfNP http://www.numino.net
apt-get install -y autoconf &&
8dqf5n http://www.numino.net
apt-get install -y automake &&
KsLdgD http://www.numino.net
apt-get install -y libtool &&
VpS74s http://www.numino.net
apt-get install -y libgmp3c2 &&
slEq8X http://www.numino.net
apt-get install -y libgmp3-dev &&
P5Lt2z http://www.numino.net
apt-get install -y openssl &&
tp7x1s http://www.numino.net
apt-get install -y apache2 &&
IWE34o http://www.numino.net
apt-get install -y libapache2-mod-php5 &&
Wj9Dki http://www.numino.net
apt-get install -y php5-dev &&
o4346g http://www.numino.net
apt-get install -y php5-gd &&
Gh5hQz http://www.numino.net
apt-get install -y bison &&
PFlAAl http://www.numino.net
apt-get install -y byacc &&
QVDbA6 http://www.numino.net
apt-get install -y tree &&
IVSzb3 http://www.numino.net
apt-get install -y libcurl4-openssl-dev &&
Qd8U3u http://www.numino.net
apt-get install -y dos2unix &&
VzII8L http://www.numino.net
apt-get install -y libpcre3 &&
4J3hg0 http://www.numino.net
apt-get install -y libpcre3-dev &&
yiw96p http://www.numino.net
apt-get install -y libmysqlclient-dev &&
3UXUJ7 http://www.numino.net
apt-get install -y php5-mysql &&
hJHcW0 http://www.numino.net
apt-get install -y sendmail &&
U6316F http://www.numino.net
apt-get install -y php-pear &&
ylkl8Q http://www.numino.net
apt-get install -y sqlite3 &&
iPUlhW http://www.numino.net
apt-get install -y libsqlite3-dev &&
zU5T5a http://www.numino.net
apt-get install -y git &&
7zK6EC http://www.numino.net
apt-get install -y mysql-client &&
erPtu0 http://www.numino.net
apt-get install -y mysql-server &&
p4OWbH http://www.numino.net
apt-get install -y curl &&
L7Y8N5 http://www.numino.net
apt-get install -y libboost-dev &&
S514zz http://www.numino.net
apt-get install -y libboost-test-dev &&
Fd8Lko http://www.numino.net
apt-get install -y libboost-program-options-dev &&
FXRy26 http://www.numino.net
apt-get install -y libboost-system-dev &&
1ispqw http://www.numino.net
apt-get install -y libboost-filesystem-dev &&
5dhjk1 http://www.numino.net
apt-get install -y libevent-dev &&
nopeeE http://www.numino.net
apt-get install -y pkg-config &&
BE5AV1 http://www.numino.net
apt-get install -y g++ &&
42Dctq http://www.numino.net
apt-get install -y libglib2.0-dev &&
27EJD6 http://www.numino.net
apt-get install -y libgtk2.0-dev &&
Eig7Xq http://www.numino.net
#apt-get install -y librdkafka-dev librdkafka1 &&
EMai31 http://www.numino.net
apt-get install -y python-dev &&
3g5klD http://www.numino.net
apt-get install -y openjdk-7-jre openjdk-7-jdk
28pBu8 http://www.numino.net
安装过程提示输入mysql密码,设置的是beautiful,如设置别的密码,后续使用mysql相应修改
QjN9kb http://www.numino.net
拷贝一些头文件,编译kbs会用到
nov6sr http://www.numino.net
sudo cp /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h /usr/include/
BJh9Gd http://www.numino.net
sudo cp /usr/lib/jvm/java-7-openjdk-amd64/include/* /usr/include/ -a
8cK8dL http://www.numino.net
sudo cp /usr/lib/jvm/java-7-openjdk-amd64/include/linux/* /usr/include/ -a
fkACGL http://www.numino.net
thirft使用 thrift-0.10.0.tar.gz (version 0.11.0/0.12.0在ubuntu12.04未能编译通过)
l3nt7R http://www.numino.net
kafka使用 librdkafka-1.0.1.tar.gz (低版本有函数未定义)
2whs9Z http://www.numino.net
两者编译安装
541S77 http://www.numino.net
./configure –prefix=/usr && make && sudo make install
6DirHa http://www.numino.net
安装kbs
XGVGn2 http://www.numino.net
解压kbs到/home/bbs/src目录
HT1qm9 http://www.numino.net
src/Makefile.am
R5J5kL http://www.numino.net
local_utl/Makefile.am
YnDfGv http://www.numino.net
daemon/Makefile.am
cge7xG http://www.numino.net
libBBS/Makefile.am
o1s42l http://www.numino.net
几个文件的 LDADD 增加 -lrdkafka
ZFcuP3 http://www.numino.net
./autogen.sh
p1bu1O http://www.numino.net
./configure –prefix=/home/bbs –enable-site=newsmth –with-php –with-mysql
ySH1hE http://www.numino.net
vi /etc/passwd, 找bbs的userid, grpid, 我这里是1000,1000, 更新到 site/newsmth.h 的 BBSUID, BBSGID
I7HGg8 http://www.numino.net
site.h, src/extra.h 中暂时去掉以下KBS宏定义 (暂未编译通过)
57l8CF http://www.numino.net
//#define ENABLE_LIKE 1
jYSQgQ http://www.numino.net
//#define ENABLE_REFER_LIKE
pdJ2ga http://www.numino.net
src/bbs.c 屏蔽函数 recommend_tg
D5pcbO http://www.numino.net
src/talk.c 屏蔽函数 display_user_summary display_userinfo
FlJ4sO http://www.numino.net
libBBS/libbm.c 屏蔽函数 AO_int_fetch_and_add
dtWr59 http://www.numino.net
libBBS/extra.c 屏蔽函数 AO_int_fetch_and_add
RNpKJ1 http://www.numino.net
local_utl/awardonline.c 屏蔽函数 AO_int_fetch_and_add
hT0B1x http://www.numino.net
修改php模块待安装目录的权限
L8Axvh http://www.numino.net
sudo chown bbs:bbs /usr/lib/php5 -R
5cw9gk http://www.numino.net
make
0K1UcJ http://www.numino.net
make install
jaN30M http://www.numino.net
make install-home
更多相关内容...>>KBS安装指南

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

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