#搭建环境: 操作系统:contos7 数据库:5.5.60-MariaDB java版本: jdk-11.0.2 confluence版本:confluence6.7.1
#一. 准备工作 下载confluence
wget https://downloads.atlassian.com/software/confluence/downloads/atlassian-confluence-6.7.1-x64.bin 下载破解工具 wget https://files.cnblogs.com/files/Javame/confluence%E7%A0%B4%E8%A7%A3%E5%B7%A5%E5%85%B7.zip 下载mysql驱动 wget https://files.cnblogs.com/files/Javame/confluence%E7%A0%B4%E8%A7%A3%E5%B7%A5%E5%85%B7.rar
#二. 安装confluence
安装之前需要提前将java环境安装好。 找到刚刚下载的atlassian-confluence-6.7.1-x64.bin文件
chmod +x atlassian-confluence-6.7.1-x64.bin
执行安装程序,进行安装:
./atlassian-confluence-6.7.1-x64.bin Unpacking JRE ... Starting Installer ...
o确定安装,c取消 This will install Confluence 6.7.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.7.1 be installed? [/opt/atlassian/confluence] /usr/local/atlassian/confluence
指定路径存储数据 Default location for Confluence data [/var/atlassian/application-data/confluence] /usr/local/atlassian/application-data/confluence
使用默认的端口,8090和8000 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.7.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.7.1 is complete Your installation of Confluence 6.7.1 is now ready and can be accessed via your browser. Confluence 6.7.1 can be accessed at http://localhost:8090 Finishing installation ...
#三. 破解jar包
- 备份jar包 mv /usr/local/atlassian/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.3.0.jar /opt/atlassian-extras-2.4.jar
- 将atlassian-extras-2.4.jar传到本地windows机器 破解jar需要在本地windows上安装java环境,这里不详细记录 将下载的包confluence破解工具.zip 解压后,将confluence_keygen.jar 传到windows机器,然后在windows机器中进入命令行运行confluence_keygen.jar
C:UsersheavenDesktop>java -jar confluence_keygen.jar 点击.patch,选择atlassian-extras-2.4.jar文件,点击打开,jar文件破解成功 3. 上传破解后atlassian-extras-2.4.jar包到/usr/local/atlassian/confluence/confluence/WEB-INF/lib,并重命名atlassian-extras-decoder-v2-3.3.0.jar 4. 解压confluence破解工具.rar包,上传mysql驱动文件mysql-connector-java-5.1.44-bin.jar 到目录/usr/local/atlassian/confluence/confluence/WEB-INF/lib
#四. 重启confluence服务
停止:sh /usr/local/atlassian/confluence/bin/stop-confluence.sh 启动:sh /usr/local/atlassian/confluence/bin/start-confluence.sh
#五. 访问confluence,以及初始化安装 http:ip:8090
1. 选择中文、点击产品安装
2. 拷贝服务ID通过破解器获取key
3. 使用之前的破解工具获取key,填好Name,和Server ID然后点击.gen!
4. 将生成的key复制到安装界面中的confluence中 5. 设置数据库,我们选择自己的数据库 5.1. 这里可以设置的数据库类型有多种,比如说pgsql,mysql,mariadb等等,我们选择使用mariadb 5.2. 在服务器上装mariadb
yum -y install mariadb mariadb-server systemctl start mariadb
接下来进行MariaDB的相关简单配置 执行命令 mysql_secure_installation 首先是设置密码,会提示先输入密码
Enter current password for root (enter for none):<–初次运行直接回车
设置密码
Set root password? [Y/n] <– 是否设置root用户密码,输入y并回车或直接回车 New password: <– 设置root用户的密码 Re-enter new password: <– 再输入一次你设置的密码
其他配置
Remove anonymous users? [Y/n] <– 是否删除匿名用户,回车
Disallow root login remotely? [Y/n] <–是否禁止root远程登录,回车,
Remove test database and access to it? [Y/n] <– 是否删除test数据库,回车
Reload privilege tables now? [Y/n] <– 是否重新加载权限表,回车
初始化MariaDB完成,接下来测试登录
mysql -uroot -ppassword
修改my.cnf文件设置字符集等配置
[root@heaven00 soft]# cat /etc/my.cnf [mysqld] init_connect='SET collation_connection = utf8_unicode_ci' init_connect='SET NAMES utf8' character-set-server=utf8 collation-server=utf8_unicode_ci skip-character-set-client-handshake
[client] default-character-set=utf8
[mysql] default-character-set=utf8
重启数据库
systemctl restart mariadb.service
5.3 创建confluence使用的数据库,以及创建连接的用户,及授权
create database confluence default character set utf8 collate utf8_bin; grant all on confluence.* to 'confluence'@'%' identified by '123456'; flush privileges; SET GLOBAL tx_isolation='READ-COMMITTED'; #不设置这个安装过程中会报错
#六. 配置数据库连接即可
后面的部分按照提示操作即可。