系统相关
首页 > 系统相关> > CentOS7 部署 Confluence 7.4

CentOS7 部署 Confluence 7.4

作者:互联网

CentOS7 部署 Confluence 7.4

Confluence是一个专业的企业知识管理与协同软件,也可以用于构建企业wiki。使用简单,但它强大的编辑和站点管理特征能够帮助团队成员之间共享信息、文档协作、集体讨论,信息推送

部署Confluence前,需确认服务器已部署Nginx+MySQL环境,可以参考我之前写过的《CentOS7搭建LNMP环境》进行部署

部署Confluence

① 下载所需安装包

建议下载enterprise版本,Atlassian官方会长期维护

  1. wget https://product-downloads.atlassian.com/software/confluence/downloads/atlassian-confluence-7.4.0-x64.bin
  2. wget https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java-5.1.49.tar.gz
  3. wget https://raw.githubusercontent.com/pmkol/atlassian-agent/master/atlassian-agent-v1.2.3.tar.gz(这是破解包下不了可以在github上下载atlassian-agent压缩包解压后到pom文件目录执行mvn package  需要装mvn环境)

 

② 安装JAVA 1.8

1 部署Java环境,安装JDK

下载好jdkl压缩包

mkdir -pv /usr/local/java

tar xf jdk-8u201-linux-x64.tar.gz -C /usr/local/java

cd /usr/local/java/

mv ./jdk1.8.0_201 jdk

 

 

 

vim /etc/profile  添加如下环境变量

export JAVA_HOME=/usr/local/java/jdk                               

export CLASSPATH=$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar

export PATH="$PATH:$JAVA_HOME/bin"                            

                                                                                  

source /etc/profile.d/java.sh                        //生效

java -version                                //检查是否生效  

 

 二进制部署mysql-5.6

Mysql官网下载二进制mysql-5.6.34-linux-glibc2.5-x86_64.tar.gz

安装mysql5.6(安装在/usr/local/mysql)

useradd -s /sbin/nologin -M mysql

tar xf mysql-5.6.34-linux-glibc2.5-x86_64.tar.gz -C /usr/local/

cd /usr/local

mv mysql-5.6.34-linux-glibc2.5-x86_64 mysql

cp /data/mysql56/support-files/my-default.cnf /etc/my.cnf

 

修改my.cnf配置并使用官方建议的参数

[client]

port = 3306

socket = /usr/local/mysql/mysql.sock

default-character-set = utf8

[mysqld]

skip-name-resolve

user = mysql

basedir = /usr/local/mysql

datadir = /usr/local/mysql/data

port = 3306

server_id = 10

socket = /usr/local/mysql/mysql.sock

pid-file = /usr/local/mysql/mysql.pid

log-error = /usr/local/mysql/mysql.err

log-bin = /usr/local/mysql/mysql-bin

character-set-server=utf8

collation-server=utf8_bin

 

 

yum -y install autoconf  (此包安装时会安装Data:Dumper模块)

chown mysql:mysql -R /usr/local/mysql

/usr/local/mysql/scripts/mysql_install_db \

--defaults-file=/etc/my.cnf \

--user=mysql \

--basedir=/usr/local/mysql \

--datadir=/usr/local/mysql/data

 

配置并启动mysql

cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld

chmod 777 /etc/init.d/mysqld

(*注意,mysql二进制安装默认的路径为/usr/local/mysql,如果不是这个路经需要修改启动脚本里/usr/local/mysql需要替换)

 

service mysqld start

 

添加自启动

chkconfig --add mysqld

chkconfig mysqld on

chkconfig --list mysqld

 

配置环境变量

vim /etc/profile (添加变量) export PATH="$PATH:/usr/local/mysql/bin"

source /etc/profile

修改mysql密码(mysql5.6安装默认root密码为空)

> mysqladmin -u root password '123456'  (根据自己情况修改)

如果找初始密码不是空可以这样来跳过密码重新设置

停止数据库

[root@k8s-node03 ~]# vim /etc/my.cnf

[mysqld] 下添加如下内容

skip-grant-tables

[root@k8s-node03 ~]# mysql -u root -p (直接回车修改密码后再退出删除skip重启数据库)

update user set authentication_string=password("spms") where user="root";

清理无用的mysql用户及库
登陆mysql

> select user,host from mysql.user;  (查看现有的用户)

> drop user "root"@"::1";

> drop user ""@"localhost";

> drop user ""@"localhost.localdomain";

> drop user "root"@"localhost.localdomain";

 

 

配置confluence环境

优化数据库配置confluence介意参数

添加到my.cnf的[mysqld]下面  添加然后重启

default-storage-engine=INNODB

max_allowed_packet=256M

innodb_log_file_size=2GB

sql_mode=ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

transaction-isolation=READ-COMMITTED

binlog_format=row

 

创建confluence用户和库(根据情况使用密码)

mysql> CREATE DATABASE confluence CHARACTER SET utf8 COLLATE utf8_bin;

mysql> CREATE USER 'confluence'@'%' IDENTIFIED BY 'dqz123456';

mysql> GRANT ALL PRIVILEGES ON confluence.* TO 'confluence '@'localhost' IDENTIFIED BY 'dqz123456';

 mysql> GRANT ALL PRIVILEGES ON confluence.* TO 'confluence'@'%' IDENTIFIED BY 'dqz123456';

 

安装confluence

将最开始下载的包进行授权并执行

chmod +x atlassian-confluence-7.4.0-x64.bin

./atlassian-confluence-7.4.0-x64.bin

安装后默认的文件路径/opt/atlassian/confluence

安装MySQL驱动

tar zxvf mysql-connector-java-5.1.49.tar.gz

mv

mysql-connector-java-5.1.49/mysql-connector-java-5.1.49-bin.jar /opt/atlassian/confluence/confluence/WEB-INF/lib/mysql-connector-java-5.1.49-bin.jar

安装配置atlassian-agent 的jar包

tar zxvf atlassian-agent-v1.2.3.tar.gz

mv atlassian-agent-v1.2.3/atlassian-agent.jar /opt/atlassian/atlassian-agent.jar

echo -e '\nexport JAVA_OPTS="-javaagent:/opt/atlassian/atlassian-agent.jar ${JAVA_OPTS}"\n' >> /opt/atlassian/confluence/bin/setenv.sh

重启confluence服务

service confluence restart

 

验证atlassian-agent

#如果有-javaagent参数输出证明atlassian-agent安装成功

ps aux|grep javaagent

 

⑤ 配置confluence

浏览器访问 IP:8090 打开confluence的配置页面

如无法访问,请临时关闭iptables、FirewallD防火墙,一些云主机在管理页面也会有防火墙设置,安装完成后记得手动开启systemctl stop iptablessystemctl stop firewalld

进入配置页面,语言选择中文,按提示进行安装,扩展应用Questions与Team Calendars如有需求可以勾选

进入授权码页面后,需人工记录服务器ID,返回ssh命令行

使用atlassian-agent生成授权码

#查看参数用法

java -jar /data0/htdocs/atlassian/atlassian-agent.jar

 

#参数说明

#-m 邮箱 -n 用户名 -o 公司名 -s 服务器ID(注意这里id是web页面授权码上的ID)

 

#Confluence授权码生成

java -jar /opt/atlassian/atlassian-agent.jar -p conf -m mail@apad.com -n Confluence -o Atlassian -s xxxx-xxxx-xxxx-xxxx

 

#Team Calendars授权码生成

java -jar /opt/atlassian/atlassian-agent.jar -p tc -m mail@apad.com -n Confluence -o Atlassian -s xxxx-xxxx-xxxx-xxxx

 

#Questions授权码生成

java -jar /opt/atlassian/atlassian-agent.jar -p questions -m mail@apad.com -n Confluence -o Atlassian -s xxxx-xxxx-xxxx-xxxx

 

r然后就是web界面点点点配置

破解方法二

下载破解工具到win10

[root@wiki-test ~]# cd /opt/atlassian/confluence/confluence/WEB-INF/lib/

将该目录下的atlassian-extras-decoder-v2-3.4.1.jar拷贝到自己的电脑上并进行重命名为atlassian-extras-2.4.jar

将该.jar文件跟破解工具放在一起,然后运行破解工具

参考地址https://www.dqzboy.com/atlassian-confluence%E5%AE%89%E8%A3%85%E5%92%8C%E7%A0%B4%E8%A7%A3

Win10 cmd终端运行破解工具

文件里面有破解工具可以下载使用

C:\Users\powell\Desktop\confluence破解工具>java -jar confluence_keygen.jar

 

 

 

<html>

    <head>

        <meta charset="UTF-8">

        <title>marquee</title>

    </head>

 

    <body style="background: white;padding: 0px;">

        <marquee><span style="font-weight: bolder;font-size: 20px;color: white;"><font color="#FF0000">平台对各项目的访问做了限制,没有项目权限的账号请联系相关项目的管理员添加权限</font></span></marquee>

    </body>

</html>

 

标签:Confluence,confluence,jar,atlassian,CentOS7,usr,7.4,mysql,local
来源: https://www.cnblogs.com/powell/p/15419464.html