Confluence 3.2.1 安装与破解


安装
wget http://downloads.atlassian.com/software/confluence/downloads/confluence-3.2.1_01-std.tar.gz
tar -zxvf confluence-3.2.1_01-std.tar.gz
mv confluence-3.2.1_01-std /opt/confluence-3.2.1
配置,汉化
mkdir /opt/confluence-3.2.1/data 
cd /opt/confluence-3.2.1/confluence/WEB-INF/classes
vi confluence-init.properties
confluence.home=/opt/confluence-3.2.1/data
wget http://www.fangwai.net/software/confluence/download/confluence-zh_CN-plugin.jar
mv confluence-zh_CN-plugin.jar /opt/confluence-3.2.1/confluence/WEB-INF/lib/
Confluence 中文乱码问题
vi /opt/lampp/etc/my.cnf
[client]
default-character-set=utf8
[mysqld]
default-character-set=utf8
重启mysql
登陆mysql,查看:
show variables like 'character%';
启动
./mysql -u root -p
create database confluence character set 'UTF8';
./startup.sh
在线生成一个评估license
自定安装
直接JDBC连接
next...Confluence Setup Successful .
破解
---------------------以下是破解文件,直接下载可以使用--------------------------
http://download.csdn.net/source/2460218
http://cid-96dbfec9c10f1efa.office.live.com/self.aspx/.Public/atlassian-extras-2.4.jar
(直接使用该地址下载的文件无效,点击该地址会进入下载页面,在里面下载才行)
mv atlassian-extras-2.4.jar /opt/confluence-3.2.1/confluence/WEB-INF/lib
替换文件后通重启即可.
---------------------以下是破解atlassian-extras-2.4.jar方法,喜欢DIY的可以自己试试--------------------------
cd /opt/confluence-3.2.1/confluence/WEB-INF/lib
sz atlassian-extras-2.4.jar
解压,用jad或java decompiler对com.atlassian.license.decoder.LicenseAdaptor进行反编译,然后编辑之:
view plaincopy to clipboardprint?
public Date getExpiryDate() {   
   return null;  // 永不过期   
}   
...   
public LicenseType getLicenseType() {   
   return com.atlassian.license.applications.confluence.ConfluenceLicenseTypeStore.FULL_LICENSE;  // 改为最强License   
}   
...   
public int getUsers() {   
   return 100000;  // 允许十万用户   
}   
...   
public boolean isExpired() {   
   return false;  // 永不过期   
}  
public Date getExpiryDate() {
   return null;  // 永不过期
}
...
public LicenseType getLicenseType() {
   return com.atlassian.license.applications.confluence.ConfluenceLicenseTypeStore.FULL_LICENSE;  // 改为最强License
}
...
public int getUsers() {
   return 100000;  // 允许十万用户
}
...
public boolean isExpired() {
   return false;  // 永不过期
}
 反编译com.atlassian.license.LicenseUtils类,编辑:
view plaincopy to clipboardprint?
public static final long POST_LICENSE_EVAL_PERIOD = 0x75cd788000L;  // 均改为16年   
public static final long UPDATE_ALLOWED_PERIOD = 0x75cd788000L;   
...   
public static long getSupportPeriodEnd(License license) {   
   return license.getDateCreated().getTime() + 0x75cd788000L; // 16 years   
}   
...   
public static boolean isLicenseTooOldForBuild(License license, Date date) {   
   return false;   
}   
...   
public static boolean confirmExtendLicenseExpired(Date date) {   
   return false;   
}   
...   
public static boolean confirmExtendLicenseExpired(String s) throws NumberFormatException {   
   return false;   
}   
...   
private static long getNewBuildWithOldLicenseExpiryDate(Date date) {   
   return date.getTime() + 0x75cd788000L;   
}  
public static final long POST_LICENSE_EVAL_PERIOD = 0x75cd788000L;  // 均改为16年
public static final long UPDATE_ALLOWED_PERIOD = 0x75cd788000L;
...
public static long getSupportPeriodEnd(License license) {
   return license.getDateCreated().getTime() + 0x75cd788000L; // 16 years
}
...
public static boolean isLicenseTooOldForBuild(License license, Date date) {
   return false;
}
...
public static boolean confirmExtendLicenseExpired(Date date) {
   return false;
}
...
public static boolean confirmExtendLicenseExpired(String s) throws NumberFormatException {
   return false;
}
...
private static long getNewBuildWithOldLicenseExpiryDate(Date date) {
   return date.getTime() + 0x75cd788000L;
}

完成,编译: 
javac com/atlassian/license/decoder/LicenseAdaptor.java
javac com/atlassian/license/LicenseUtils.java 
打包:
jar -cvf atlassian-extras-2.4.jar *
mv atlassian-extras-2.4.jar /opt/confluence-3.2.1/confluence/WEB-INF/lib