前期准备工作
1)请将confluence7.4破解包下载到本机电脑上
wget http://down.whsir.com/downloads/confluence7.4pojie.zip
2)请将java8程序下载安装到本机电脑上
wget http://down.whsir.com/downloads/jdk-8u172-windows-x64.exe
或
查看yum库中都有哪些jdk版本,或者直接安装jdk1.8.0版本
yum search java|grep jdk
yum install java-1.8.0-openjdk*
或者
安装java环境--jdk
# wget -c http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz
# tar zxf jdk-8u45-linux-x64.gz -C /usr/local/
# ln -snv /usr/local/jdk1.8.0_45 /usr/local/java
环境变量配置加入如下内容
# vim /etc/profile.d/java.sh
export JAVA_HOME=/usr/local/java/
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$PATH:$JAVA_HOME/bin
导出环境变量
(2)
#export JAVA_HOME=/home/admin/source/jdk1.8.0_51
export JAVA_HOME=/usr/local/jdk1.8.0_51
export JRE_HOME=${JAVA_HOME}/jre
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib
export PATH=${JAVA_HOME}/bin:${JRE_HOME}/bin:$PATH
# source /etc/profile
验证java是否安装成功
# java --version
注:安装java用于运行confluence7.4破解程序
3)将MySQL驱动插件下载至CentOS服务器上
wget http://down.whsir.com/downloads/mysql-connector-java-5.1.46.tar.gz
4)在CentOS服务器上添加wlnmp一键安装包源
rpm -ivh https://mirrors.wlnmp.com/centos/wlnmp-release-centos.noarch.rpm
5)下载confluence7.4安装包至CentOS服务器上
wget http://down.whsir.com/downloads/atlassian-confluence-7.4.6-x64.bin
1、安装MYSQL
安装MYSQL
wget http://ftp.ntu.edu.tw/MySQL/Downloads/MySQL-5.7/mysql-5.7.34-linux-glibc2.12-x86_64.tar.gz
创建MySQL用户和用户组
groupadd mysql
useradd -g mysql mysql -s /sbin/nologin
把软件包解压到MySQL的家目录/usr/local下
tar -xvf mysql-8.0.12-linux-glibc2.12-x86_64.tar.xz -C /usr/local/
chown mysql:mysql -R mysql
创建MySQL数据目录,并授权
mkdir -p /data/mysql
chown mysql:mysql -R /data/mysql
编辑/etc/my.cnf配置参数文件
[root@localhost ~]# cat /etc/my.cnf
[client]
port=3306
socket=/tmp/mysql.sock
[mysql]
prompt="\u@db \R:\m:\s [\d]> "
no-auto-rehash
[mysqld]
user=mysql
port=3306
basedir=/usr/local/mysql
datadir=/data/mysql/
socket=/tmp/mysql.sock
pid-file=db.pid
character-set-server=utf8mb4
skip_name_resolve=1
open_files_limit=65535
back_log=1024
max_connections=512
max_connect_errors=1000000
table_open_cache=1024
table_definition_cache=1024
table_open_cache_instances=64
thread_stack=512K
external-locking=FALSE
max_allowed_packet=32M
sort_buffer_size=4M
join_buffer_size=4M
thread_cache_size=768
#query_cache_size=0
#query_cache_type=0
interactive_timeout=600
wait_timeout=600
tmp_table_size=32M
max_heap_table_size=32M
slow_query_log=1
slow_query_log_file=/data/mysql/slow.log
log-error=/data/mysql/error.log
long_query_time=0.1
server-id=3306101
log-bin=/data/mysql/mysql-bin
sync_binlog=1
binlog_cache_size=4M
max_binlog_cache_size=1G
max_binlog_size=1G
expire_logs_days=7
master_info_repository=TABLE
relay_log_info_repository=TABLE
gtid_mode=on
enforce_gtid_consistency=1
log_slave_updates
binlog_format=row
relay_log_recovery=1
relay-log-purge=1
key_buffer_size=32M
read_buffer_size=8M
read_rnd_buffer_size=4M
bulk_insert_buffer_size=64M
lock_wait_timeout=3600
explicit_defaults_for_timestamp=1
innodb_thread_concurrency=0
innodb_sync_spin_loops=100
innodb_spin_wait_delay=30
transaction_isolation=REPEATABLE-READ
#innodb_additional_mem_pool_size=16M
innodb_buffer_pool_size=512M
innodb_buffer_pool_instances=8
innodb_buffer_pool_load_at_startup=1
innodb_buffer_pool_dump_at_shutdown=1
innodb_data_file_path=ibdata1:1G:autoextend
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=32M
innodb_log_file_size=2G
innodb_log_files_in_group=2
innodb_max_undo_log_size=4G
innodb_io_capacity=4000
innodb_io_capacity_max=8000
innodb_flush_neighbors=0
innodb_write_io_threads=8
innodb_read_io_threads=8
innodb_purge_threads=4
innodb_page_cleaners=4
innodb_open_files=65535
innodb_max_dirty_pages_pct=50
innodb_flush_method=O_DIRECT
innodb_lru_scan_depth=4000
innodb_checksum_algorithm=crc32
##innodb_file_format=Barracuda
##innodb_file_format_max = Barracuda
innodb_lock_wait_timeout=10
innodb_rollback_on_timeout=1
innodb_print_all_deadlocks=1
innodb_file_per_table=1
innodb_online_alter_log_max_size=4G
internal_tmp_disk_storage_engine=InnoDB
innodb_stats_on_metadata=0
[mysqldump]
quick
max_allowed_packet=32M
6.初始化数据库
/usr/local/mysql/bin/mysqld --defaults-file=/etc/my.cnf --basedir=/usr/local/mysql --datadir=/data/mysql/ --user=mysql --initialize
或
bin/mysqld --initialize --user=mysql --basedir=/usr/app/mysql --datadir=/usr/app/mysqldata
改密码:
alter user 'root'@'localhost' identified by '123456';
flush privileges;
mysql> create user confluence@localhost identified by 'confluence';
mysql> create database confluence character set utf8 collate utf8_bin;
mysql> grant all privileges on confluence.* to confluence@'localhost';
mysql> set password = password('123456');
mysql> quit
注:
将innodb_log_file_size = 32M改成innodb_log_file_size = 256M
将max_allowed_packet = 16M改成max_allowed_packet = 34M,注意此字段有两个
字段下添加一行:transaction-isolation=READ-COMMITTED
启动数据库
bin/mysqld_safe --user=mysql --basedir=/usr/app/mysql --datadir=/usr/app/mysqldata &
2、安装confluence
3、配置MySQL驱动
4、开始破解
破解需要两部,一是破解文件,二是获取授权码
一、破解文件
在CentOS服务器上下载/opt/atlassian/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.4.1.jar文件到本地重命名为atlassian-extras-2.4.jar
通过java运行confluence_keygen.jar(文中最开始的那个破解包,在windows上运行,需要在windows上安装好java)
选择.patch!找到刚才重命名的那个文件打开
打开后在当前目录下可以看到atlassian-extras-2.4.jar和atlassian-extras-2.4.bak两个文件,这里atlassian-extras-2.4.jar已经是破解好的了,将atlassian-extras-2.4.jar名字改回atlassian-extras-decoder-v2-3.4.1.jar
然后上传回CentOS服务器/opt/atlassian/confluence/confluence/WEB-INF/lib/目录,覆盖掉原来的atlassian-extras-decoder-v2-3.4.1.jar文件
此时要重启confluence服务:/etc/init.d/confluence restart
二、获取授权码
访问web页面,获取服务器ID,http://IP:8090
复制网页中的服务器ID,运行破解工具confluence_keygen.jar,破解复制Key到Confluence里,获得授权码,进行下一步
选择MySQL配置项,配置数据库即可
5、验证授权
右上角配置→一般配置→授权细节