赞
踩
Confluence是一个企业级的Wiki软件,可用于在企业、部门、团队内部进行信息共享和协同编辑。
# 安装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
# 安装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
# # 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
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#
初始化mysql数据库
# 初始化mysql账号密码
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>';
flush privileges;
exit;
# 重启数据库,使配置生效
sudo systemctl restart mysql
创建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;
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
将/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
# 防火墙设置开通8090端口
firewall-cmd --permanent --add-port=8090/tcp
firewall-cmd --reload
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则表示生效
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
【注】这里的-m后面的邮箱及-n后面的用户名都要记录保存下来,后续用到。
进入【查找新应用】,选择一应用–选择【立即购买】,如
点击【管理】,查看应用的密钥,如 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
以上内容仅供学习使用。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。