confluence部署与破解
一、confluence安装
#安装环境环境
centos7、jdk8、mysql5.7、Confluence6.14.1
confluence下载地址
wget https://product-downloads.atlassian.com/software/confluence/downloads/atlassian-confluence-6.14.1-x64.bin
#赋予执行权限
chmod a+x atlassian-confluence-6.14.1-x64.bin
#运行、安装confluence
./atlassian-confluence-6.14.1-x64.bin
#指定数据存放的目录
/data/atlassian/confluence
界面会有以下提示:依次输入指定选项即可
Unpacking JRE ...
Starting Installer ...
# o确定安装,c取消
This will install Confluence 6.9.1 on your computer.
OK [o, Enter], Cancel [c]
o
Click Next to continue, or Cancel to exit Setup.
# 选择2自定义安装
Choose the appropriate installation or upgrade option.
Please choose one of the following:
Express Install (uses default settings) [1],
Custom Install (recommended for advanced users) [2, Enter],
Upgrade an existing Confluence installation [3]
2
# 指定安装的目录,会自动创建,不输入直接回车就是使用默认路径
Select the folder where you would like Confluence 6.9.1 to be installed,
then click Next.
Where should Confluence 6.9.1 be installed?
[/opt/atlassian/confluence]
# 使用默认的路径存储数据
Default location for Confluence data
[/var/atlassian/application-data/confluence]
/var/atlassian/application-data/confluence
# 使用默认的端口,8090和8000,可手动输入更改
18090
18000
Configure which ports Confluence will use.
Confluence requires two TCP ports that are not being used by any other
applications on this machine. The HTTP port is where you will access
Confluence through your browser. The Control port is used to Startup and
Shutdown Confluence.
Use default ports (HTTP: 8090, Control: 8000) - Recommended [1, Enter], Set custom value for HTTP and Control ports [2]
1
# 安装为后台进程,可后台运行
Confluence can be run in the background.
You may choose to run Confluence as a service, which means it will start
automatically whenever the computer restarts.
Install Confluence as Service?
Yes [y, Enter], No [n]
y
Extracting files ...
Please wait a few moments while we configure Confluence.
# 确定开始安装
Installation of Confluence 6.9.1 is complete
Start Confluence now?
Yes [y, Enter], No [n]
y
Please wait a few moments while Confluence starts up.
Launching Confluence ...
Installation of Confluence 6.9.1 is complete
Your installation of Confluence 6.9.1 is now ready and can be accessed via
your browser.
Confluence 6.9.1 can be accessed at http://localhost:8090
Finishing installation ...
# 安装完成,访问本机的8090端口进行web端安装
# 开放防火墙端口
firewall-cmd --add-port=8090/tcp --permanent
firewall-cmd --add-port=8000/tcp --permanent
firewall-cmd --reload
二、confluence破解
Confluence的破解,需要用到破解工具,首先下载破解工具到你的个人电脑,不是centos服务器。下载地址:
https://files.cnblogs.com/files/Javame/confluence%E7%A0%B4%E8%A7%A3%E5%B7%A5%E5%85%B7.zip
然后按照下面的步骤进行:
1. 访问第一步安装好的Confluence,选择语言为中文-->选择安装-->插件先不选,直接下一步--> 记录下server ID。
2. 进行破解
# 关闭Confluence
cd /opt/atlassian/confluence # 进入你安装的目录
bin/stop-confluence.sh # 关闭confluence
# 将confluence 下面的一个atlassian-extras-decoder-v2-3.4.1.jar包复制一份出来
cp /opt/atlassian/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.4.1.jar ~/
# 将其改名为atlassian-extras-2.4.jar
mv ~/atlassian-extras-decoder-v2-3.4.1.jar ~/atlassian-extras-2.4.jar
# 将改名后的atlassian-extras-2.4.jar 传到本地
# 具体方法不细说了
然后本地电脑操作: ① 打开下载的破解工具,运行confluence_keygen.jar (需要java环境) ②将记录的server ID填入,Name随便填。③点击gen, 生成key并记录。 ④点击patch,选择刚下传到本地的atlassian-extras-2.4.jar文件进行破解。
#ID
BZIK-I89A-NWVI-IL29
#破解后的序列号
AAABLA0ODAoPeJxtUMlqwzAQvesrBD0reKlpExBUsXUwseRQOyntTXEnrcBRghbT/H2djUDpbWbev
GXmoQ2AhbI4ynD8OIvSWZbhvGlxEsVTVIDrrD54vTc035ttH8B0gGTYbcDW25UD6yiJUW5BnZYK5
YGemCRKSZShkeNV56XaAe3u/FM5Ged6AOptgNseF0r3VJtBO73p4cV1YGBiesQH1YezA92q3l0VK
j3iDtrjAc4OeS0Ef81LVqFRyHgwanTjPwdtj5dkafpE4oQk2UXgdkfeB+fByv0nOBqhhkv6Xq+wY
AuOBccMN6zASyYLNkG1/VJGu0sYLde60fOK45YzgRqwA9iyoPOPckHK5ykj8m1dkrJKpuiadkSrs
rh1/4dbBtt9Kwd/3vkLdoiKyDAsAhRGtmGss1tGE0j0KSXdMrR1WfI1JwIUDMM8AWs8y0GJsl8ZA
bUhrfZVMQ4=X02f3
OK,破解完成后,将破解后的文件传回服务器
# 传回服务器后,将名称改回之前的名称
mv atlassian-extras-2.4.jar atlassian-extras-decoder-v2-3.4.1.jar
# 然后覆盖回原路径
mv atlassian-extras-decoder-v2-3.4.1.jar /opt/atlassian/confluence/confluence/WEB-INF/lib/
3. 配置修改mysql并上传mysql驱动
Confluence本身是没有集成mysql驱动的,需要自己下载并上传,原本在你安装的时候,输入key之后,会需要填入mysql连接信息,那里会有链接指向官方文档,教你如何配置mysql。但是配置完成后需要重启,会导致前面的破解出问题,所以,这里要一起完成后再重新启动。官方教程文档地址如下:
https://confluence.atlassian.com/doc/database-setup-for-mysql-128747.html
具体操作,按照官方文档来就行,然后下载mysql的驱动,上传到指定文件夹。
三、mysql配置
4.安装、配置mysql
vim /etc/yum.repos.d/mysql.repo
[mysql57-community]
name=MySQL 5.7 Community Server baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/ enabled=1 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
yum -y install mysql yum -y install mysql-community-server.x86_64 mysqld --initialize --user=mysql systemctl start mysqld grep 'password' /var/log/mysqld.log mysql -u root -p'gskr=:f3rD_T'
ALTER USER’root’@’localhost’ IDENTIFIED BY ‘DuLingYu@123’; CREATE DATABASE confluence CHARACTER SET utf8 COLLATE utf8_bin; GRANT ALL ON confluence.* TO 'confluence'@'localhost' IDENTIFIED BY 'Confluence@123'; GRANT ALL ON confluence.* TO 'confluence'@'%' IDENTIFIED BY 'Confluence@123';
vim /etc/my.cnf
......... [mysqld] character-set-server=utf8 collation-server=utf8_bin default-storage-engine=INNODB max_allowed_packet=256M innodb_log_file_size=2GB #// remove this if it exists #sql_mode=NO_AUTO_VALUE_ON_ZERO transaction-isolation=READ-COMMITTED binlog_format=row .......
systemctl restart mysqld
三、重新启动Confluence并完成后续安装配置
完成上述步骤后,重启confluence,会回到输入key的界面,输入上面记录的key,点击下一步 --> 然后进行配置数据库 --> 推荐使用示范站点,先熟悉Confluence,然后再自行进行设置 --> 用户管理可以选择与jira进行集成,否则还是选择第一个自己管理用户和用户组。 --> 配置系统管理员账号 --> 完成
每一步的图如下:
后面的使用与插件破解,请耐心等待下一次的补充
注:Connertor默认没有mysql的链接插件,如果图二出错,需要下载mysql-connector-java-5.1.47.tar.gz,
加压,并将“*.jar”结尾的包放到 /opt/atlassian/confluence/confluence/WEB-INF/lib/ 下,重新启动即可:
mysql-connector-java-5.1.47-bin.jar mysql-connector-java-5.1.47.jar
启动命令:
service confluence start
停止命令:
service confluence stop