KBS安装指南 |
KBS安装指南 rFsEQD http://blog.numino.net/ 一些环境准备 wj8pZR http://blog.numino.net/ 虚机(virtualbox 5.1+, 比如5.1.26)环境搭建 5BNTXB http://blog.numino.net/ 如果没有开启vt,需要开启,首先开机进入BIOS,Security,Virtualization,选择Enable即可 a2RwGe http://blog.numino.net/ 安装ubuntu12.04.5,地址 : v6PIwh http://blog.numino.net/ http://mirrors.163.com/ubuntu-releases/12.04/ubuntu-12.04.5-desktop-amd64.iso ybDBH0 http://blog.numino.net/ 比较古老的32位的或不支持vt技术的cpu选择: TlzP2c http://blog.numino.net/ http://mirrors.163.com/ubuntu-releases/12.04/ubuntu-12.04.5-desktop-i386.iso iOnaMP http://blog.numino.net/ 虚机网络断开安装,否则会自动安装更新,耗时比较久, ugK3FN http://blog.numino.net/ virtualbox - 显示 - 启用3d加速 Wr07m2 http://blog.numino.net/ 安装过程中,配置用户名设置为 bbs Jhd259 http://blog.numino.net/ 安装完成后去掉iso挂载,网络选择网络地址转换NAT,重启后 kv5eH8 http://blog.numino.net/ virtuabbox, 设备-安装增强功能(和主机共享文件) CONkc2 http://blog.numino.net/ df 查看光盘挂载地址 eSvtQb http://blog.numino.net/ cd /media/VBOXADDITIONS_5.1_xxxx (xxxx为上面命令结果补全) eD5Th3 http://blog.numino.net/ sudo ./VBoxLinuxAdditions.run lP7t41 http://blog.numino.net/ 重启,设备 - 共享文件夹, 选择windows主机的文件夹映射为 bbs目录为共享目录,选择固定分配,自动挂载 CJcMM3 http://blog.numino.net/ sudo mount -t vboxsf bbs /mnt JKE2kV http://blog.numino.net/ 添加国内源 5rqt8L http://blog.numino.net/ sudo vi /etc/apt/sources.list qt85aV http://blog.numino.net/ 删除文本所有内容,添加: NAeIwx http://blog.numino.net/ 1 5r6445 http://blog.numino.net/ 2 x56hV8 http://blog.numino.net/ 3 wIcVpV http://blog.numino.net/ 4 G0orOB http://blog.numino.net/ 5 985QmR http://blog.numino.net/ 6 lY5DOD http://blog.numino.net/ 7 27x7W3 http://blog.numino.net/ 8 wZv6mh http://blog.numino.net/ 9 JLX1f8 http://blog.numino.net/ # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 fh12A1 http://blog.numino.net/ deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main restricted universe multiverse 72fXE1 http://blog.numino.net/ # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main restricted universe multiverse fStlnN http://blog.numino.net/ deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-updates main restricted universe multiverse O0GUGQ http://blog.numino.net/ # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-updates main restricted universe multiverse 5tKx26 http://blog.numino.net/ deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-backports main restricted universe multiverse BvReK5 http://blog.numino.net/ # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-backports main restricted universe multiverse 73N61y http://blog.numino.net/ deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-security main restricted universe multiverse HTZwXR http://blog.numino.net/ # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-security main restricted universe multiverse CMBQt9 http://blog.numino.net/ 修改一下vim打开文件的编码方式,否则后续编辑有可能显示乱码 aHc6JR http://blog.numino.net/ vim ~/.vimrc f0jLRQ http://blog.numino.net/ set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936 e3zXNO http://blog.numino.net/ 安装 sudo ./php_apache.sh 安装合适的 php, apache, mysql 等依赖库 sCOR3D http://blog.numino.net/ php_apache.sh 的内容: Q93910 http://blog.numino.net/ apt-get update && RyQM34 http://blog.numino.net/ apt-get install -y zlib1g-dev && EENS7d http://blog.numino.net/ apt-get install -y autoconf && 4hAStX http://blog.numino.net/ apt-get install -y automake && 8HBsIO http://blog.numino.net/ apt-get install -y libtool && oz4XtD http://blog.numino.net/ apt-get install -y libgmp3c2 && hZXT76 http://blog.numino.net/ apt-get install -y libgmp3-dev && t2tXXN http://blog.numino.net/ apt-get install -y openssl && 6535EG http://blog.numino.net/ apt-get install -y apache2 && Cc2a2K http://blog.numino.net/ apt-get install -y libapache2-mod-php5 && U31Dd1 http://blog.numino.net/ apt-get install -y php5-dev && H1AW27 http://blog.numino.net/ apt-get install -y php5-gd && 7U20Qj http://blog.numino.net/ apt-get install -y bison && x11i1r http://blog.numino.net/ apt-get install -y byacc && J10Qm7 http://blog.numino.net/ apt-get install -y tree && nif7j4 http://blog.numino.net/ apt-get install -y libcurl4-openssl-dev && Pr1XwJ http://blog.numino.net/ apt-get install -y dos2unix && 3622Bd http://blog.numino.net/ apt-get install -y libpcre3 && vyjKyb http://blog.numino.net/ apt-get install -y libpcre3-dev && 7W1kay http://blog.numino.net/ apt-get install -y libmysqlclient-dev && w6YO7b http://blog.numino.net/ apt-get install -y php5-mysql && 9U6QgL http://blog.numino.net/ apt-get install -y sendmail && k4y4Bu http://blog.numino.net/ apt-get install -y php-pear && kPMQUv http://blog.numino.net/ apt-get install -y sqlite3 && lSux3s http://blog.numino.net/ apt-get install -y libsqlite3-dev && Fd3Se4 http://blog.numino.net/ apt-get install -y git && bANr6s http://blog.numino.net/ apt-get install -y mysql-client && 4Uo42L http://blog.numino.net/ apt-get install -y mysql-server && EyTIzy http://blog.numino.net/ apt-get install -y curl && ZdPsh6 http://blog.numino.net/ apt-get install -y libboost-dev && 9uyIsO http://blog.numino.net/ apt-get install -y libboost-test-dev && 4fYZx5 http://blog.numino.net/ apt-get install -y libboost-program-options-dev && KpV309 http://blog.numino.net/ apt-get install -y libboost-system-dev && hEne4A http://blog.numino.net/ apt-get install -y libboost-filesystem-dev && g7PQw1 http://blog.numino.net/ apt-get install -y libevent-dev && 2Gy2dR http://blog.numino.net/ apt-get install -y pkg-config && fn3u73 http://blog.numino.net/ apt-get install -y g++ && 1BmgOI http://blog.numino.net/ apt-get install -y libglib2.0-dev && pX0WJC http://blog.numino.net/ apt-get install -y libgtk2.0-dev && Kn57Ai http://blog.numino.net/ #apt-get install -y librdkafka-dev librdkafka1 && rw82n3 http://blog.numino.net/ apt-get install -y python-dev && uQY640 http://blog.numino.net/ apt-get install -y openjdk-7-jre openjdk-7-jdk pB797f http://blog.numino.net/ 安装过程提示输入mysql密码,设置的是beautiful,如设置别的密码,后续使用mysql相应修改 3K6J5e http://blog.numino.net/ 拷贝一些头文件,编译kbs会用到 Jt2ghq http://blog.numino.net/ sudo cp /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h /usr/include/ g2yy3b http://blog.numino.net/ sudo cp /usr/lib/jvm/java-7-openjdk-amd64/include/* /usr/include/ -a 3kJJJ6 http://blog.numino.net/ sudo cp /usr/lib/jvm/java-7-openjdk-amd64/include/linux/* /usr/include/ -a 8PG1Aw http://blog.numino.net/ thirft使用 thrift-0.10.0.tar.gz (version 0.11.0/0.12.0在ubuntu12.04未能编译通过) haLs7J http://blog.numino.net/ kafka使用 librdkafka-1.0.1.tar.gz (低版本有函数未定义) Sq1U2V http://blog.numino.net/ 两者编译安装 VqOoTJ http://blog.numino.net/ ./configure –prefix=/usr && make && sudo make install 9a7VEK http://blog.numino.net/ 安装kbs ADLDqn http://blog.numino.net/ 解压kbs到/home/bbs/src目录 mCa6Se http://blog.numino.net/ src/Makefile.am L98HYX http://blog.numino.net/ local_utl/Makefile.am nH87Nx http://blog.numino.net/ daemon/Makefile.am n084uS http://blog.numino.net/ libBBS/Makefile.am 7jWmam http://blog.numino.net/ 几个文件的 LDADD 增加 -lrdkafka X34i53 http://blog.numino.net/ ./autogen.sh xVGiCd http://blog.numino.net/ ./configure –prefix=/home/bbs –enable-site=newsmth –with-php –with-mysql Jyfzuw http://blog.numino.net/ vi /etc/passwd, 找bbs的userid, grpid, 我这里是1000,1000, 更新到 site/newsmth.h 的 BBSUID, BBSGID jO8S8j http://blog.numino.net/ site.h, src/extra.h 中暂时去掉以下KBS宏定义 (暂未编译通过) 30e7SI http://blog.numino.net/ //#define ENABLE_LIKE 1 6ed76S http://blog.numino.net/ //#define ENABLE_REFER_LIKE ga8oxJ http://blog.numino.net/ src/bbs.c 屏蔽函数 recommend_tg zw49Jc http://blog.numino.net/ src/talk.c 屏蔽函数 display_user_summary display_userinfo OFrPgg http://blog.numino.net/ libBBS/libbm.c 屏蔽函数 AO_int_fetch_and_add 3Fwl6v http://blog.numino.net/ libBBS/extra.c 屏蔽函数 AO_int_fetch_and_add 26Hm6p http://blog.numino.net/ local_utl/awardonline.c 屏蔽函数 AO_int_fetch_and_add 1pptV3 http://blog.numino.net/ 修改php模块待安装目录的权限 YPTj46 http://blog.numino.net/ sudo chown bbs:bbs /usr/lib/php5 -R qcU2ym http://blog.numino.net/ make n72Iv0 http://blog.numino.net/ make install EKbd41 http://blog.numino.net/ make install-home
|
|