系统环境centos8
官方文档:Installing Confluence | Confluence Data Center and Server 7.19 | Atlassian Documentation
本次是通过压缩包安装
1.下载程序包
a,访问下载连接,进行下载最新的安装包 Confluence Server 下载存档 | Atlassian
- # 软件包大概736M
-
- mkdir -p /data/
- cd /data/
- wget https://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-7.19.1.tar.gz
b,准备数据库,本次使用的是postgresql数据库 Connecting Jira applications to PostgreSQL | Administering Jira applications Data Center and Server 9.1 | Atlassian Documentation
postgresql 数据库安装可以参考 安装postgresql 数据库_第九系艾文的博客-CSDN博客
- su - postgres
-
- psql
- CREATE USER confdbuser WITH ENCRYPTED PASSWORD 'confdbpwd..';
- CREATE DATABASE confluence WITH ENCODING 'UNICODE' LC_COLLATE 'C' LC_CTYPE 'C' TEMPLATE template0;
- grant all privileges on database confluence to confdbuser;
c,准备jdk环境,如有可忽略
Jira requires 1.8 or 11 to run.Centos 8 默认安装就是1.8的,可以通过dnf直接安装
dnf install java -y
2.安装
mkdir -pv /data/{confluence,confluence-home}
tar xvf atlassian-confluence-7.19.1.tar.gz -C /data/confluence/
- useradd --create-home --comment 'Account for running confluence Software' --shell /bin/bash confluence
-
- chown -R confluence /data/confluence /data/confluence-home/
- chmod -R u=rwx,go-rwx /data/confluence /data/confluence-home/
vim /data/confluence/atlassian-confluence-7.19.1/confluence/WEB-INF/classes/confluence-init.properties
增加下面配置
confluence.home=/data/confluence-home
3配置启动agent【建议使用第一种,直接使用编译好的agent】
- cd /data/confluence-home/
- wget https://github.com/nineaiyu/atlassian-agent/releases/download/v1.0.0/atlassian-agent.jar
a.编译并添加agent
git clone https://github.com/nineaiyu/atlassian-agent.git
b.安装maven环境
dnf install maven -y
c.增加国内pom源,可以增加阿里云
vim /etc/maven/settings.xml
- <id>aliyun
-
central -
aliyun -
http://maven.aliyun.com/nexus/content/groups/public/ -
d.执行编译命令
mvn clean && mvn install -Dmvn.test.skip=true
e.将编译好的jar包,复制到 /data/confluence-home/atlassian-agent.jar
cp target/atlassian-agent-jar-with-dependencies.jar /data/confluence-home/atlassian-agent.jar
4.启动服务
定义类库lib地址
export LIB_PATH="/data/confluence/atlassian-confluence-7.19.1/confluence/WEB-INF/lib/"
- su - confluence
- export LIB_PATH="/data/confluence/atlassian-confluence-7.19.1/confluence/WEB-INF/lib/"
- export JAVA_OPTS="-javaagent:/data/confluence-home/atlassian-agent.jar=${LIB_PATH}"
- cd /data/confluence/atlassian-confluence-7.19.1/bin/
- ./start-confluence.sh
5.配置
服务器端口是8090,通过浏览器打开,并进行配置
需要授权,来到服务器进行操作
java -jar /data/confluence-home/atlassian-agent.jar -m 'conf@qq.com' -p conf -o 'http://10.66.66.79:8090/' -s 'BANG-SOUC-3I6G-38GE'
回到浏览器继续操作
设置数据库
配置管理用户