Ticket #62 (closed 总结: 已处理)
BBS7.0汽车网安装手册
| Reported by: | dingjianyong | Owned by: | dingjianyong |
|---|---|---|---|
| Priority: | 重要的(3) | Milestone: | |
| Component: | 核心模块 | Version: | BBS7.0 |
| Keywords: | Cc: | ||
| Due Date: | 09/04/2013 |
Description
汽车论坛bbs7.0安装手册
- nginx配置:
${nginx_home}/conf下的conf配置文件,需要添加对brand.jsp和boxbbs.jsp的url跳转
location = /brand.jsp {
if ($query_string ~ brandid=([\d]+)) {
set $brandid $1;
rewrite .* http://bbs.pcauto.com.cn/forum-$brandid.html? permanent;
}
}
location = /templates/auto/boxbbs.jsp {
rewrite .* http://bbs.pcauto.com.cn/plugin/auto/boxbbs.do? permanent;
}
2.resin上数据源配置
Mysql:
192.168.237.215:3306/bbs7_auto_app
bbs7_auto_app/bbs7_auto_appmysqlbbs7_auto_app
Postgresql:
192.168.239.213:5432/bbs7_auto_app
bbs7_auto_app/Autobbs#XW948Uv#
3.resin的JVM配置
需要配置为1024Mb
4.resin其他配置
${resin_home}的lib包下需要放置以下jar包:
auth-client-vip.jar
mysql-connector-java-5.1.10-bin.jar
postgresql-9.1-902.jdbc4.jar
r-route-1.1.jar
5.Memcached内存配置
需要配置为1024Mb
6.应用配置文件
${resin_home}的conf目录下需要添加auto.properties文件
文件内容如下:
#system config
system.root= http://bbs.pcauto.com.cn
system.loginUrl= http://my.pcauto.com.cn/login.jsp
system.systemName=auto
system.viewIpRoot= http://whois.pconline.com.cn/whois/?ip=
system.passportRoot= http://passport2.pcauto.com.cn/passport2/passport
system.passportUrl= http://passport2.pcauto.com.cn/passport2
system.emotRoot= http://bbs.pcauto.com.cn/images/emot
system.ucRoot= http://my.pcauto.com.cn
system.bipRoot= http://bip.pcauto.com.cn
system.uploadRoot= http://upc.pcauto.com.cn
system.attachmentRoot= http://upa.pconline.com.cn
system.userSessionName=common_session_id
system.widthOfPictureMax=900
system.maxDepthForUBB=5
#memached config
memcached.server=192.168.237.137:11212,192.168.238.138:11212,192.168.238.96:11212,192.168.237.105:11212
memcached.initConn=20
memcached.minConn=10
memcached.maxConn=50
memcached.maintSleep=30000
memcached.nagle=false
memcached.failover=false
memcached.failback=false
memcached.socketTO=3000
#censor config
censor.appName=bbs6
censor.site=2
censor.censorDomain=shenhe.pconline.cn
#counter config
counter.path0=/data/autobbs7_path0/
counter.path15=/data/autobbs7_path15/
#system.ucServer
system.ucServer= http://192.168.238.61:8088/usercenter
#system.snsServer
system.snsServer=
7.配置定时任务
把定时任务文件放置在/data/counter/autobbs7/ 目录下。
需要安装Groovy环境(Groovy版本统一使用2.1),需要检查groovy的lib目录下是否已经有commons-httpclient.jar和commons-codec.jar。
在服务器上建/data/autobbs7_path0和/data/autobbs7_path0两个目录,用于存放应用生成的记录文件(这个要路径和${resin_home}/conf/auto.properties里面的值相匹配)。
在服务器上建/data/nginx/html_autobbs7/top目录,用于存放top.groovy生成的排行榜html文件。
analyzer.properties上需要配置正确的数据源,以及需要获取访问数据的机器ip和端口。
top.groovy上需要配置应用正确的域名
定时任务配置如下:
主机配置如下
========================
LANG=zh_CN.GB18030
ANALYZER_HOME=/data/counter/autobbs7
# process task per 15 minutes
3,18,33,48 * * * * $ANALYZER_HOME/ana.sh >> $ANALYZER_HOME/analyze.log &2>1
0 0 * * * $ANALYZER_HOME/clean.sh >> $ANALYZER_HOME/clean.log &2>1
0 1 * * * $ANALYZER_HOME/daily.sh >> $ANALYZER_HOME/daily.log &2>1
0 8 * * * $ANALYZER_HOME/top.sh >> $ANALYZER_HOME/top.log &2>1
========================
其中ANALYZER_HOME为计数器目录,下面还要建backup,work和top三个子目录,在每个sh下都要修改应用的url(一般是127.0.0.1:端口)和 groovy的目录。
其他机配置如下
0 8 * * * /data/nginx/groovy-2.1.0/top.sh >> /data/nginx/groovy-2.1.0/top.log &2>1
8.验证安装成功
安装成功后,可以通过以下链点检验是否访问成功
http://bbs.pcauto.com.cn/index.do
http://bbs.pcauto.com.cn/forum-393.html
http://bbs.pcauto.com.cn/topic-2926893.html
![(please configure the [header_logo] section in trac.ini)](http://www1.pconline.com.cn/hr/2009/global/images/logo.gif)