参见 https://confluence.atlassian.com/display/CONF54/Installing+the+Confluence+EAR-WAR+Edition

下载5.4.4版本

注意:目前5.4.4才有破解版。

http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-5.4.4-war.tar.gz

安装其它环境

  1. CentOS 6.6
  2. 安装jdk 1.7,安装前请卸载其他版本的jdk以避免兼容问题,安装好设置$JAVA_HOME环境变量
  3. yum install httpd
  4. yum install tomcat6  (注意,tomcat7不兼容)
  5. yum install mysql-server
  6. chkconfig httpd on
  7. chkconfig tomcat6 on
  8. chkconfig mysqld on

修改iptables

修改文件/etc/sysconfig/iptables

*filter

:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [37:5933]
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -s 192.168.0.0/16 -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
-A INPUT -s 192.168.0.0/24 -p tcp -m tcp --dport 3306 -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -p udp -m udp --sport 53 -j ACCEPT
-A INPUT -s 127.0.0.1/32 -d 127.0.0.1/32 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
COMMIT

然后运行service iptables restart

 

修改java参数

修改文件/etc/tomcat6/tomcat6.conf

增加一行

JAVA_OPTS="-Xms256m -Xmx512m -XX:MaxPermSize=256m"

解压文件

gunzip -c atlassian-confluence-5.4.4-war.tar.gz | tar -xv

sudo mv confluence-5.4.4 /usr/local/

修改文件/usr/local/confluence-5.4.4/confluence/WEB-INF/classes/confluence-init.properties,把“confluence.home=/var/confluence”前面的注释去掉

mkdir /var/confluence

chown tomcat.tomcat /var/confluence

配置tomcat

修改文件/etc/tomcat6/server.xml,</engine>前增加

<Host name="wiki.aoyouzu.org">
<Context path="" docBase="/usr/local/confluence-5.4.4/confluence" debug="0" reloadable="true">
</Context>
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="wiki_access_log." suffix=".txt" pattern="%h %l %u %t &quot;%r&quot; %s %b" />
</Host>

在<Connector port="8080">里增加属性URIEncoding="UTF-8"

在<Connector port="8009">里增加属性URIEncoding="UTF-8"

service tomcat6 start

配置httpd

在目录/etc/httpd/conf.d文件z-confluence.conf

<VirtualHost *:80>
ServerName wiki.andychat.cn
ServerAlias wiki.aoyouzu.org
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/
</VirtualHost>

service httpd start

 

Mysql配置

修改/etc/my.cnf,[mysqld]下增加一行

character-set-server=utf8

max_allowed_packet=16M

 

运行service mysqld start

/usr/bin/mysql_secure_installation

增加confluence用户以及confluence数据库, 数据库Default Collation为utf8 - default collation

mysql -u root -p

insert into mysql.user(Host,User,Password) values("localhost","confluence",password("1234"));

flush privileges;

CREATE DATABASE confluence DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci

grant all privileges on confluence.* to confluence@localhost identified by '1234';

flush privileges;

破解

运行localhost:8080,得出confluence的Service ID

运行confluence_keygen.jarconfluence_keygen (1).jar,得出key

service stop tomcat6,替换/usr/local/confluence-5.4.4/confluence/WEB-INF/lib里的atlassian-extras-2.4.jar,同时拷贝mysql-connector-java-5.1.34-bin.jar到lib目录,重新启动tomcat,输入key

继续配置Confluence

选择External Database,Mysql,选择Direct JDBC Connection,

DB URL输入jdbc:mysql://localhost/confluence?sessionVariables=storage_engine%3DInnoDB&useUnicode=true&characterEncoding=utf8

输入数据库用户名和密码

中文

管理员登录,点击右上角螺母=》Add-ones,输入url: https://translations.atlassian.com/download/Confluence/5.4.4/zh_CN/Confluence-5.4.4-language-pack-zh_CN.jar

一般配置=》附件设置 附件最大值设为20M,否则无法上传中文字体

站点管理=》PDF导出语言支持,增加pdf中文字体simsun.ttc