| KBS安装指南 |
KBS安装指南 roKWBy http://blog.numino.net/ 一些环境准备 6p36iw http://blog.numino.net/ 虚机(virtualbox 5.1+, 比如5.1.26)环境搭建 w5Q9mH http://blog.numino.net/ 如果没有开启vt,需要开启,首先开机进入BIOS,Security,Virtualization,选择Enable即可 ZbGHX0 http://blog.numino.net/ 安装ubuntu12.04.5,地址 : U9ciQX http://blog.numino.net/ http://mirrors.163.com/ubuntu-releases/12.04/ubuntu-12.04.5-desktop-amd64.iso tKWbMQ http://blog.numino.net/ 比较古老的32位的或不支持vt技术的cpu选择: 6jvn5G http://blog.numino.net/ http://mirrors.163.com/ubuntu-releases/12.04/ubuntu-12.04.5-desktop-i386.iso 1QoM2L http://blog.numino.net/ 虚机网络断开安装,否则会自动安装更新,耗时比较久, yrST8N http://blog.numino.net/ virtualbox - 显示 - 启用3d加速 CvRYfa http://blog.numino.net/ 安装过程中,配置用户名设置为 bbs nchYk7 http://blog.numino.net/ 安装完成后去掉iso挂载,网络选择网络地址转换NAT,重启后 xMKL9N http://blog.numino.net/ virtuabbox, 设备-安装增强功能(和主机共享文件) 6Olf9z http://blog.numino.net/ df 查看光盘挂载地址 3rL8ss http://blog.numino.net/ cd /media/VBOXADDITIONS_5.1_xxxx (xxxx为上面命令结果补全) uIrNuN http://blog.numino.net/ sudo ./VBoxLinuxAdditions.run 7FI9vh http://blog.numino.net/ 重启,设备 - 共享文件夹, 选择windows主机的文件夹映射为 bbs目录为共享目录,选择固定分配,自动挂载 jq6kjn http://blog.numino.net/ sudo mount -t vboxsf bbs /mnt b5B0W5 http://blog.numino.net/ 添加国内源 XOwJsN http://blog.numino.net/ sudo vi /etc/apt/sources.list 5KY2qA http://blog.numino.net/ 删除文本所有内容,添加: G5P56q http://blog.numino.net/ 1 B4XvHQ http://blog.numino.net/ 2 Tdno2Q http://blog.numino.net/ 3 761AtE http://blog.numino.net/ 4 Ygt97I http://blog.numino.net/ 5 8q2X7G http://blog.numino.net/ 6 U25sE5 http://blog.numino.net/ 7 4MJ19e http://blog.numino.net/ 8 oxcqqK http://blog.numino.net/ 9 6lKh5K http://blog.numino.net/ # 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 j4AA4l http://blog.numino.net/ deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main restricted universe multiverse NY7yex http://blog.numino.net/ # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise main restricted universe multiverse P8AU0U http://blog.numino.net/ deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-updates main restricted universe multiverse fJ5Un6 http://blog.numino.net/ # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-updates main restricted universe multiverse h4Gt8e http://blog.numino.net/ deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-backports main restricted universe multiverse LGm0t8 http://blog.numino.net/ # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-backports main restricted universe multiverse 4fBwyQ http://blog.numino.net/ deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-security main restricted universe multiverse jiUy7T http://blog.numino.net/ # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ precise-security main restricted universe multiverse 3RyISb http://blog.numino.net/ 修改一下vim打开文件的编码方式,否则后续编辑有可能显示乱码 bCK6gY http://blog.numino.net/ vim ~/.vimrc 4hejU5 http://blog.numino.net/ set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936 8Dm8Rt http://blog.numino.net/ 安装 sudo ./php_apache.sh 安装合适的 php, apache, mysql 等依赖库 Wr2NMl http://blog.numino.net/ php_apache.sh 的内容: IFFkgy http://blog.numino.net/ apt-get update && 7c8530 http://blog.numino.net/ apt-get install -y zlib1g-dev && rXKD6y http://blog.numino.net/ apt-get install -y autoconf && BgF2gy http://blog.numino.net/ apt-get install -y automake && YNBYu3 http://blog.numino.net/ apt-get install -y libtool && 9APVNZ http://blog.numino.net/ apt-get install -y libgmp3c2 && 9Q8q9o http://blog.numino.net/ apt-get install -y libgmp3-dev && yfCNbO http://blog.numino.net/ apt-get install -y openssl && Z0KpmI http://blog.numino.net/ apt-get install -y apache2 && 2K7IFu http://blog.numino.net/ apt-get install -y libapache2-mod-php5 && mio6Ji http://blog.numino.net/ apt-get install -y php5-dev && p2Vn30 http://blog.numino.net/ apt-get install -y php5-gd && eOO5BR http://blog.numino.net/ apt-get install -y bison && wTtEXK http://blog.numino.net/ apt-get install -y byacc && 38QLs6 http://blog.numino.net/ apt-get install -y tree && M3B7eN http://blog.numino.net/ apt-get install -y libcurl4-openssl-dev && k4ZAJf http://blog.numino.net/ apt-get install -y dos2unix && PLTdrB http://blog.numino.net/ apt-get install -y libpcre3 && ahiCHT http://blog.numino.net/ apt-get install -y libpcre3-dev && g6Xde0 http://blog.numino.net/ apt-get install -y libmysqlclient-dev && 5ADC24 http://blog.numino.net/ apt-get install -y php5-mysql && 205xRg http://blog.numino.net/ apt-get install -y sendmail && aLr66Q http://blog.numino.net/ apt-get install -y php-pear && cLj0lq http://blog.numino.net/ apt-get install -y sqlite3 && uG9X5Z http://blog.numino.net/ apt-get install -y libsqlite3-dev && h6R03l http://blog.numino.net/ apt-get install -y git && jGG2s4 http://blog.numino.net/ apt-get install -y mysql-client && 6VEkd0 http://blog.numino.net/ apt-get install -y mysql-server && g4cFZD http://blog.numino.net/ apt-get install -y curl && riI6W6 http://blog.numino.net/ apt-get install -y libboost-dev && xd0Z2j http://blog.numino.net/ apt-get install -y libboost-test-dev && Bg20OL http://blog.numino.net/ apt-get install -y libboost-program-options-dev && 7DDhGQ http://blog.numino.net/ apt-get install -y libboost-system-dev && J69mu3 http://blog.numino.net/ apt-get install -y libboost-filesystem-dev && vOAW2f http://blog.numino.net/ apt-get install -y libevent-dev && HnLKw2 http://blog.numino.net/ apt-get install -y pkg-config && gy3KiI http://blog.numino.net/ apt-get install -y g++ && htAEYu http://blog.numino.net/ apt-get install -y libglib2.0-dev && XC0V1b http://blog.numino.net/ apt-get install -y libgtk2.0-dev && 98901y http://blog.numino.net/ #apt-get install -y librdkafka-dev librdkafka1 && zDHS36 http://blog.numino.net/ apt-get install -y python-dev && QS6pFh http://blog.numino.net/ apt-get install -y openjdk-7-jre openjdk-7-jdk CON537 http://blog.numino.net/ 安装过程提示输入mysql密码,设置的是beautiful,如设置别的密码,后续使用mysql相应修改 c1Kqtc http://blog.numino.net/ 拷贝一些头文件,编译kbs会用到 p99n2M http://blog.numino.net/ sudo cp /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h /usr/include/ zeRW6O http://blog.numino.net/ sudo cp /usr/lib/jvm/java-7-openjdk-amd64/include/* /usr/include/ -a Z5NWVD http://blog.numino.net/ sudo cp /usr/lib/jvm/java-7-openjdk-amd64/include/linux/* /usr/include/ -a 06t6Ql http://blog.numino.net/ thirft使用 thrift-0.10.0.tar.gz (version 0.11.0/0.12.0在ubuntu12.04未能编译通过) n3Lf5H http://blog.numino.net/ kafka使用 librdkafka-1.0.1.tar.gz (低版本有函数未定义) VfZ46D http://blog.numino.net/ 两者编译安装 pN23M7 http://blog.numino.net/ ./configure –prefix=/usr && make && sudo make install Ep0go9 http://blog.numino.net/ 安装kbs r5dNr0 http://blog.numino.net/ 解压kbs到/home/bbs/src目录 8aEH1p http://blog.numino.net/ src/Makefile.am xS6sxh http://blog.numino.net/ local_utl/Makefile.am JKBw2x http://blog.numino.net/ daemon/Makefile.am s2e8el http://blog.numino.net/ libBBS/Makefile.am wYOvB4 http://blog.numino.net/ 几个文件的 LDADD 增加 -lrdkafka 6jG3e6 http://blog.numino.net/ ./autogen.sh 7v15n2 http://blog.numino.net/ ./configure –prefix=/home/bbs –enable-site=newsmth –with-php –with-mysql Akv3pW http://blog.numino.net/ vi /etc/passwd, 找bbs的userid, grpid, 我这里是1000,1000, 更新到 site/newsmth.h 的 BBSUID, BBSGID 7hIH8o http://blog.numino.net/ site.h, src/extra.h 中暂时去掉以下KBS宏定义 (暂未编译通过) U87wLQ http://blog.numino.net/ //#define ENABLE_LIKE 1 VfXs0B http://blog.numino.net/ //#define ENABLE_REFER_LIKE 2I23Lc http://blog.numino.net/ src/bbs.c 屏蔽函数 recommend_tg T0aYnF http://blog.numino.net/ src/talk.c 屏蔽函数 display_user_summary display_userinfo oBRNBg http://blog.numino.net/ libBBS/libbm.c 屏蔽函数 AO_int_fetch_and_add Do16k2 http://blog.numino.net/ libBBS/extra.c 屏蔽函数 AO_int_fetch_and_add 9K7Crm http://blog.numino.net/ local_utl/awardonline.c 屏蔽函数 AO_int_fetch_and_add GZ5MQY http://blog.numino.net/ 修改php模块待安装目录的权限 rB2QRD http://blog.numino.net/ sudo chown bbs:bbs /usr/lib/php5 -R Yn5FIL http://blog.numino.net/ make w6IWN5 http://blog.numino.net/ make install vn1tx1 http://blog.numino.net/ make install-home
|
|