更多相关内容...>>KBS安装指南
KBS安装指南
KBS安装指南
zL7Tm8 http://www.numino.net
一些环境准备
Vow2r6 http://www.numino.net
虚机(virtualbox 5.1+, 比如5.1.26)环境搭建
GRDTeK http://www.numino.net
如果没有开启vt,需要开启,首先开机进入BIOS,Security,Virtualization,选择Enable即可
lmXnXj http://www.numino.net
安装ubuntu12.04.5,地址 :
ip82X2 http://www.numino.net
http://mirrors.163.com/ubuntu-releases/12.04/ubuntu-12.04.5-desktop-amd64.iso
lY52Du http://www.numino.net
比较古老的32位的或不支持vt技术的cpu选择:
fbve3o http://www.numino.net
http://mirrors.163.com/ubuntu-releases/12.04/ubuntu-12.04.5-desktop-i386.iso
Ws2WpQ http://www.numino.net
虚机网络断开安装,否则会自动安装更新,耗时比较久,
Sh7jKS http://www.numino.net
virtualbox - 显示 - 启用3d加速
bYIdT9 http://www.numino.net
安装过程中,配置用户名设置为 bbs
bA3akh http://www.numino.net
安装完成后去掉iso挂载,网络选择网络地址转换NAT,重启后
8y3Uoz http://www.numino.net
virtuabbox, 设备-安装增强功能(和主机共享文件)
U4vE5s http://www.numino.net
df 查看光盘挂载地址
n5IYXA http://www.numino.net
cd /media/VBOXADDITIONS_5.1_xxxx (xxxx为上面命令结果补全)
9x5k0J http://www.numino.net
sudo ./VBoxLinuxAdditions.run
LQGl2c http://www.numino.net
重启,设备 - 共享文件夹, 选择windows主机的文件夹映射为 bbs目录为共享目录,选择固定分配,自动挂载
I820GN http://www.numino.net
sudo mount -t vboxsf bbs /mnt
qG0EEw http://www.numino.net
添加国内源
4TV2Dz http://www.numino.net
sudo vi /etc/apt/sources.list
513TNR http://www.numino.net
删除文本所有内容,添加:
lnq4G1 http://www.numino.net
1
2pG7E7 http://www.numino.net
2
hp07O9 http://www.numino.net
3
O5Yxtn http://www.numino.net
4
Ravoj1 http://www.numino.net
5
LYkMRi http://www.numino.net
6
1kL5GR http://www.numino.net
7
QBkAND http://www.numino.net
8
bjX96n http://www.numino.net
9
WzCO4W http://www.numino.net
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
MAH4td http://www.numino.net
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main restricted universe multiverse
g010da http://www.numino.net
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main restricted universe multiverse
yCyTzz http://www.numino.net
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
Xmdseb http://www.numino.net
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-updates main restricted universe multiverse
8wC8Wc http://www.numino.net
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
w4TPkH http://www.numino.net
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
0sLVzo http://www.numino.net
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-security main restricted universe multiverse
uPJiHj http://www.numino.net
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-security main restricted universe multiverse
cY429I http://www.numino.net
修改一下vim打开文件的编码方式,否则后续编辑有可能显示乱码
82GOUl http://www.numino.net
vim ~/.vimrc
3W7ez8 http://www.numino.net
set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
WMH9Ar http://www.numino.net
安装 sudo ./php_apache.sh 安装合适的 php, apache, mysql 等依赖库
6NweXn http://www.numino.net
php_apache.sh 的内容:
fqPXSC http://www.numino.net
apt-get update &&
76Ynwb http://www.numino.net
apt-get install -y zlib1g-dev &&
e0ltk3 http://www.numino.net
apt-get install -y autoconf &&
zR5Cd9 http://www.numino.net
apt-get install -y automake &&
PQvaoO http://www.numino.net
apt-get install -y libtool &&
W1ngug http://www.numino.net
apt-get install -y libgmp3c2 &&
ETesvg http://www.numino.net
apt-get install -y libgmp3-dev &&
9c7Kt8 http://www.numino.net
apt-get install -y openssl &&
j01teu http://www.numino.net
apt-get install -y apache2 &&
bw4fR1 http://www.numino.net
apt-get install -y libapache2-mod-php5 &&
iqb84F http://www.numino.net
apt-get install -y php5-dev &&
u24369 http://www.numino.net
apt-get install -y php5-gd &&
HiaDnk http://www.numino.net
apt-get install -y bison &&
gn1vi6 http://www.numino.net
apt-get install -y byacc &&
b1s6sk http://www.numino.net
apt-get install -y tree &&
5bUB8d http://www.numino.net
apt-get install -y libcurl4-openssl-dev &&
V4hmyx http://www.numino.net
apt-get install -y dos2unix &&
dz9S3q http://www.numino.net
apt-get install -y libpcre3 &&
mcStTb http://www.numino.net
apt-get install -y libpcre3-dev &&
aiHc5W http://www.numino.net
apt-get install -y libmysqlclient-dev &&
9wT1YE http://www.numino.net
apt-get install -y php5-mysql &&
dt2q28 http://www.numino.net
apt-get install -y sendmail &&
bQ2R24 http://www.numino.net
apt-get install -y php-pear &&
ymNfVl http://www.numino.net
apt-get install -y sqlite3 &&
myxc0a http://www.numino.net
apt-get install -y libsqlite3-dev &&
aVO2Wk http://www.numino.net
apt-get install -y git &&
3pBzq6 http://www.numino.net
apt-get install -y mysql-client &&
qLVjVW http://www.numino.net
apt-get install -y mysql-server &&
YRtam6 http://www.numino.net
apt-get install -y curl &&
dv9j0D http://www.numino.net
apt-get install -y libboost-dev &&
L14sf6 http://www.numino.net
apt-get install -y libboost-test-dev &&
P5BG8w http://www.numino.net
apt-get install -y libboost-program-options-dev &&
wW0iB5 http://www.numino.net
apt-get install -y libboost-system-dev &&
k3tWsv http://www.numino.net
apt-get install -y libboost-filesystem-dev &&
AJK5YS http://www.numino.net
apt-get install -y libevent-dev &&
WDIKID http://www.numino.net
apt-get install -y pkg-config &&
X5MW31 http://www.numino.net
apt-get install -y g++ &&
7XaKYn http://www.numino.net
apt-get install -y libglib2.0-dev &&
G7A91g http://www.numino.net
apt-get install -y libgtk2.0-dev &&
7ug8pz http://www.numino.net
#apt-get install -y librdkafka-dev librdkafka1 &&
3duJld http://www.numino.net
apt-get install -y python-dev &&
XvMWZS http://www.numino.net
apt-get install -y openjdk-7-jre openjdk-7-jdk
VmsU0r http://www.numino.net
安装过程提示输入mysql密码,设置的是beautiful,如设置别的密码,后续使用mysql相应修改
ZZczm3 http://www.numino.net
拷贝一些头文件,编译kbs会用到
HF8iHo http://www.numino.net
sudo cp /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h /usr/include/
DALM9u http://www.numino.net
sudo cp /usr/lib/jvm/java-7-openjdk-amd64/include/* /usr/include/ -a
4fTVGi http://www.numino.net
sudo cp /usr/lib/jvm/java-7-openjdk-amd64/include/linux/* /usr/include/ -a
c4GYzQ http://www.numino.net
thirft使用 thrift-0.10.0.tar.gz (version 0.11.0/0.12.0在ubuntu12.04未能编译通过)
5uckbN http://www.numino.net
kafka使用 librdkafka-1.0.1.tar.gz (低版本有函数未定义)
tOr95S http://www.numino.net
两者编译安装
wPtA00 http://www.numino.net
./configure –prefix=/usr && make && sudo make install
7Zgpp5 http://www.numino.net
安装kbs
cBbDFt http://www.numino.net
解压kbs到/home/bbs/src目录
DFjge3 http://www.numino.net
src/Makefile.am
4GaUZ1 http://www.numino.net
local_utl/Makefile.am
OijJ66 http://www.numino.net
daemon/Makefile.am
Alw8V8 http://www.numino.net
libBBS/Makefile.am
VBPTFe http://www.numino.net
几个文件的 LDADD 增加 -lrdkafka
b0lvYU http://www.numino.net
./autogen.sh
bkBL25 http://www.numino.net
./configure –prefix=/home/bbs –enable-site=newsmth –with-php –with-mysql
7Rk05N http://www.numino.net
vi /etc/passwd, 找bbs的userid, grpid, 我这里是1000,1000, 更新到 site/newsmth.h 的 BBSUID, BBSGID
0KQkrp http://www.numino.net
site.h, src/extra.h 中暂时去掉以下KBS宏定义 (暂未编译通过)
jY15Qi http://www.numino.net
//#define ENABLE_LIKE 1
YTUU91 http://www.numino.net
//#define ENABLE_REFER_LIKE
0r88HV http://www.numino.net
src/bbs.c 屏蔽函数 recommend_tg
785Tbt http://www.numino.net
src/talk.c 屏蔽函数 display_user_summary display_userinfo
nfZua3 http://www.numino.net
libBBS/libbm.c 屏蔽函数 AO_int_fetch_and_add
8V10JQ http://www.numino.net
libBBS/extra.c 屏蔽函数 AO_int_fetch_and_add
1OO5Wn http://www.numino.net
local_utl/awardonline.c 屏蔽函数 AO_int_fetch_and_add
GHrkjx http://www.numino.net
修改php模块待安装目录的权限
RhBHgk http://www.numino.net
sudo chown bbs:bbs /usr/lib/php5 -R
81j0Su http://www.numino.net
make
q1WG22 http://www.numino.net
make install
j8llk6 http://www.numino.net
make install-home
更多相关内容...>>KBS安装指南

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

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