当前位置:   article > 正文

Confluence安装教程_confluence的插件怎么安装

confluence的插件怎么安装

Confluence简介

Confluence是一个企业级的Wiki软件,可用于在企业、部门、团队内部进行信息共享和协同编辑。

软件依赖

  • Mysql-server-8.0+
  • openjdk-v11.0.18
  • mysql-connector-java-8.0.30
  • atlassian-agent-v1.3.3

安装过程

安装java及mysql

  • Ubuntu系统_Ubuntu 22.04.2 LTS
# 安装java环境
sudo apt-get install default-jre
# 查看java版本号
java -version
# 安装mysql-server
sudo apt-get install mysql-server
# 下载mysql-connentor-java包并解压
cd ~/Downloads/
wget https://cdn.mysql.com/archives/mysql-connector-java-8.0/mysql-connector-java-8.0.30.tar.gz
tar -xvf mysql-connector-java-8.0.30.tar.gz
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • CentOS系统_CentOS Linux release 7.9.2009(Core)
# 安装java环境
sudo yum install -y java-11-openjdk java-11-openjdk-devel
java -version
# 安装mysql8
wget http://repo.mysql.com/mysql80-community-release-el7-1.noarch.rpm
sudo rpm -ivh mysql80-community-release-el7-1.noarch.rpm
cd /etc/yum.repos.d
# 进入后可以查看到mysql-community.repo、mysql-community-source.repo
sudo yum install -y mysql-server
# 如果此时有报错 GPG Keys are configured as: file:///xxx,按以下解决:
rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022
# 检查mysql是否安装成功
systemctl list-unit-files|grep mysqld
# 结果如下,表示开机自启动
mysqld.service                                    enabled
mysqld@.service                                   disabled 
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16

mysql配置修改

#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
# 
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#
[mysqld]
# Require clients to connect either using SSL
# or through a local socket file
#require_secure_transport = ON
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_bin_trust_function_creators = 1
includedir /etc/mysql/conf.d/
includedir /etc/mysql/mysql.conf.d/

[client]
default-character-set=utf8mb4
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
PS:CentOS的my.cnf 路径在/etc/my.cnf
cat /var/log/mysqld.log | grep temporary
# 通过这个可以获取数据库初始默认密码
2023-04-15T09:06:54.070479Z 6 [Note] [MY-010454] [Server] A temporary password is generated for root@localhost: aaaaft0&B+w#
  • 1
  • 2
  • 3
  • 4

Confluence数据库创建

初始化mysql数据库

# 初始化mysql账号密码
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>';
flush privileges;
exit;
# 重启数据库,使配置生效
sudo systemctl restart mysql
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

创建Confluence数据库

# 进入数据库
mysql -uroot -p
CREATE DATABASE confluencedb CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
# mysql8.0不能直接输 GRANT ALL PRIVILEGES ON confluence.* TO 'root'@'localhost' IDENTIFIED BY '<password>';
create user 'confluenceuser'@'localhost' identified by '密码';
grant all on confluencedb.* to 'confluenceuser'@'localhost';
alter user 'confluenceuser'@'localhost' identified with mysql_native_password by '密码';
flush privileges;
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8

软件包下载

sudo mkdir /data
# 下载altassian-agent jar包
wget https://github.com/haxqer/confluence/releases/download/v1.3.3/atlassian-agent.jar
# 下载 7.19.4安装包
wget https://product-downloads.atlassian.com/software/confluence/downloads/atlassian-confluence-8.2.1.tar.gz
# 解压并重命名
tar -xvf atlassian-confluence-8.2.1.tar.gz
mv atlassian-confluence-8:2.1 confluence
cp ~/Downloads/mysql-connector-java-8.0.30/mysql-connector-java-8.0.30.jar /data/conflence//confluence/WEB-INF/lib/
sudo chmod 777 * -R confluence
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

安装confluence

配置confluence home目录

将/data/confluence/confluence/WEB-INF/classes/confluence-init.properties中的confluence.home的值设置为/data/confluence/

cd /data/confluence/confluence/WEB-INF/classes
vi /data/confluence/confluence/WEB-INF/classes/confluence-init.properties
# 结果如下:
# This file allows you to set the directory for Confluence to store its configuration files.
#
###########################
# Note for Windows Users  #
###########################
#
# Each backslash in your path must be written as a forward slash.
# - For example:
# c:\confluence\data
#
# should be written as:
#
# c:/confluence/data

###########################
# Note for Unix Users     #
###########################
# - For example:
# confluence.home=/var/confluence
#
# NOTE: If the path of your confluence.home directory contains symlinks,
# please set confluence.home to the absolute path, otherwise problems may occur.
# - For example:
# confluence.home=/data/confluence/ (where /data is a symlink to -> /var/data/)
# should be written as:
confluence.home=/data/confluence/

###########################
# Configuration Directory #
###########################

# specify your directory below (don't forget to remove the '#' in front)

# confluence.home=c:/confluence/data
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37

防火墙开通端口

# 防火墙设置开通8090端口
firewall-cmd --permanent --add-port=8090/tcp
firewall-cmd --reload
  • 1
  • 2
  • 3

配置atlassian-agent

cd /data/confluence/bin
# 修改setenv.sh 文件,配置java启动
vim setenv.sh
# 在末尾添加JAVA_OPTS参数
export JAVA_OPTS="-javaagent:/data/atlassian-agent.jar ${JAVA_OPTS}"
# 启动 confluence
sudo sh /data/confluence/bin/start-confluence.sh
# stop-confluence.sh 关闭服务
# 查看atlassian-agent.jar是否生效
ps aux| grep java
如果包含了 -javaagent:/data/atlassian-agent.jar则表示生效
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

安装过程

  1. 通过浏览器访问 127.0.0.1:8090 启动安装,设置语言为【中文】,选择【产品安装】
    在这里插入图片描述
  2. 点击【下一步】,记录【服务器ID】保存下来,后续会用到。在这里插入图片描述
  3. 进入更新license

更新license

更新

  1. 获取license,将生成的license复制到第2步中
java -jar /data/atlassian-agent.jar -m demo@xxx.com -n conftest -p conf -o http://127.0.0.1:8090 -s 服务器ID

====================================================
=======     Atlassian Crack Agent v1.3.1     =======
=======           https://zhile.io           =======
=======          QQ Group: 30347511          =======
====================================================

Your license code(Don't copy this line!!!):

AAABkA0ODxxxxxxxxxxxxxQvesrmOkZWwKDwTOaKQbiUBvcxHHaHgVZgiYgiCRck68vtsmlk9Fe9
N7svrdvvx2YNoJOGsQxsLsi3sp2jDh6Mixs2SiUwDRvRcQ00Ati4oVJHBSfWN1fGVqyWgGKQBWSd
1fkKGrecA0vRs0LEAqMfDAqrTu1ms8/Kl7DjLdoL1+Z4Oo25MKOJLGWMzw+svKwj1HRinLGCs1PQ
LXsAYWt0OM/ThmvxxxxxxxxxxxxxxxxxxxxxxQN/4Z39z7vfli93hbDPsnXTaWaEt5YsHGzoHqsn
7fN++9k/oDfrXzzMWx/zfPaLhf5n1dKb7oHzaQGOe13hXY3kaehg4w1QMN9msaPYRLs0OhIaBBMF
BCfOy6HKTHPN/FyLDT1JhHdJdEhzswdcT3iOLZPHI8s0AHkCeRIr62ja2Z2ujadyL8zk4dgg95ge
AapLkkRF+Ml9mybfI78Wu9nL4uKKfj/clNQn+Os22ZZ3+Qg9+VRjTg1CRod0i9cTge4bn9p1KD0P
xbyuX4wLAIUMVFOJHejAb1QhcoCc2n+xH9lI2ExxxxxxxxxxxxxxxxxxmAX02jb
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18

【注】这里的-m后面的邮箱及-n后面的用户名都要记录保存下来,后续用到。

  • 点击下一步,选择【我自己的数据库】,配置数据库
    在这里插入图片描述
  • 配置自己的confluencedb,点击【测试链接】,成功后,点击【下一步】
    在这里插入图片描述
    在这里插入图片描述
    以上即安装成功。

插件更新

进入【查找新应用】,选择一应用–选择【立即购买】,如
在这里插入图片描述
点击【管理】,查看应用的密钥,如 com.mxgraph.confluence.plugins.diagramly
在这里插入图片描述
复制license,更新插件。

# license生成
 java -jar /data/atlassian-agent.jar -m demo@xxx.com -n conftest -p 应用密钥 -o http://127.0.0.1:8090 -s 服务器ID
  • 1
  • 2

在这里插入图片描述
以上内容仅供学习使用。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/126080?site
推荐阅读
相关标签
  

闽ICP备14008679号