CenOS 7.x 安装Confluence 7.4.7

  1. 当前环境
0 14:10:00 root@confluence,172.16.2.2:~ # cat /etc/redhat-release 
CentOS Linux release 7.9.2009 (Core)
0 14:10:06 root@confluence,172.16.2.2:~ # java -version
java version "1.8.0_201"
  1. 下载confluence安装包。
0 14:10:13 root@confluence,172.16.2.2:~ # cd /usr/local/src/
0 14:10:20 root@confluence,172.16.2.2:/usr/local/src # wget https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-7.4.7-x64.bin
0 14:44:12 root@confluence,172.16.2.2:/usr/local/src # chmod u+x atlassian-confluence-7.4.7-x64.bin
  1. 将confluence安装在数据盘。
0 14:45:07 root@confluence,172.16.2.2:/usr/local/src # ./atlassian-confluence-7.4.7-x64.bin 
......
Unpacking JRE ...
Starting Installer ...

This will install Confluence 7.4.7 on your computer.
OK [o, Enter], Cancel [c]      # 直接回车

Click Next to continue, or Cancel to exit Setup.

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 7.4.7 to be installed,
then click Next.
Where should Confluence 7.4.7 be installed?
[/opt/atlassian/confluence]
/server/app/atlassian/confluence    # 指定安装目录

Default location for Confluence data
[/var/atlassian/application-data/confluence]
/server/app/atlassian/application-data/confluence      # 指定数据目录

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]      # 直接回车,使用默认端口


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]      # 直接回车

Extracting files ...
                                                                           

Please wait a few moments while we configure Confluence.

Installation of Confluence 7.4.7 is complete
Start Confluence now?
Yes [y, Enter], No [n]      # 直接回车

Please wait a few moments while Confluence starts up.
Launching Confluence ...

Installation of Confluence 7.4.7 is complete
Your installation of Confluence 7.4.7 is now ready and can be accessed via
your browser.
Confluence 7.4.7 can be accessed at http://localhost:8090
Finishing installation ...
  1. 接下来就是web端的相关配置,浏览器打开http://x.x.x.x:8090
  1. 复制上面的服务器ID,并保存好。下载/server/app/atlassian/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.4.1.jar至本地,并修改文件名为atlassian-extras-2.4.jar。
0 14:55:50 root@confluence,172.16.2.2:~ # cd /server/app/atlassian/confluence/confluence/WEB-INF/lib
0 15:15:42 root@confluence,172.16.2.2:/server/app/atlassian/confluence/confluence/WEB-INF/lib # mv atlassian-extras-decoder-v2-3.4.1.jar{,.bak}      # 下载完再mv
  1. 在Windows中运行破解工具confluence_keygen.jar(提取码:3a37。运行此包需要windows主机安装java环境),填入上面的的服务器ID,然后点.patch加载atlassian-extras-2.4.jar包进行修补。
  1. 将修补完成的atlassian-extras-2.4.jar上传至服务器/server/app/atlassian/confluence/confluence/WEB-INF/lib目录下,在还原之前的文件名,此时不要关闭注册机。
0 15:23:39 root@confluence,172.16.2.2:/server/app/atlassian/confluence/confluence/WEB-INF/lib # mv atlassian-extras-2.4.jar atlassian-extras-decoder-v2-3.4.1.jar
  1. 此例中使用mysql依赖,所以需要下载mysql驱动,并上传至/server/app/atlassian/confluence/confluence/WEB-INF/lib下,这里使用的驱动版本是mysql-connector-java-8.0.22.jar,重启confluence。
0 15:25:15 root@confluence,172.16.2.2:/server/app/atlassian/confluence/confluence/WEB-INF/lib # ll mysql-connector-java-8.0.22.jar
-rw-r--r-- 1 root root 2389216 3月   4 13:20 mysql-connector-java-8.0.22.jar
0 15:25:31 root@confluence,172.16.2.2:/server/app/atlassian/confluence/confluence/WEB-INF/lib # /etc/init.d/confluence restart
  1. 浏览器打开http://x.x.x.x:8090,回到填写授权码的界面,然后点击注册机的.gen生成key信息,将key信息复制到confluence安装界面的授权码栏,继续安装。
  1. 部署mysql,我这里安装的是5.7.32,不过其实步骤都一样,此例my.cnf配置如下:
[client]
port=3306
socket=/usr/local/mysql/mysql.sock

[mysql]
prompt="\\u@\\h \\R:\\m:\\s [\\d]> "

[mysqld]
user=mysql
port=3306
basedir=/usr/local/mysql
datadir=/server/data/mysql
socket=/usr/local/mysql/mysql.sock
pid-file=/usr/local/mysql/mysqld.pid
log-error=/server/logs/mysql/error.log
character-set-server=utf8mb4
collation-server=utf8mb4_bin
default-storage-engine=INNODB
max_allowed_packet=256M
innodb_log_file_size=2GB
transaction-isolation=READ-COMMITTED
binlog_format=row
log_timestamps = SYSTEM
default_time_zone = "+8:00"
  1. 登入mysql,创建confluence数据库、创建对应账户并授权。
0 16:26:47 root@confluence,172.16.2.2:/usr/local/mysql/support-files # cd
0 16:26:48 root@confluence,172.16.2.2:~ # mysql -uroot -p
root@localhost 16:27:10 [(none)]> create database confluence CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
Query OK, 1 row affected (0.00 sec)

root@localhost 16:29:07 [(none)]> grant all on confluence.* to 'confluence'@'localhost' identified by 'ashdasdasd';
Query OK, 0 rows affected, 1 warning (0.00 sec)

root@localhost 16:30:11 [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)

root@localhost 16:30:20 [(none)]> \q
  1. 继续配置
  1. 查看激活信息,位置在右上角:设置->一般设置->授权细节。
  1. 可选配置:安装Markdown插件。位置在右上角:设置->一般设置->查找新应用。


写作不易,转载请注明出处,谢谢~~

posted @ 2021-03-04 19:41  merlee  阅读(1202)  评论(0编辑  收藏  举报