安装包目录:
/data2/wiki/confluence_setup,里面分别为confluence安装包,破解工具,mysql-connector
下载路径,https://download.csdn.net/download/qq_14845119/86398301
安装:
本人使用的是docker安装,镜像可以使用任意的镜像,数据都挂载在data2目录下,
docker run -itd --network=host --name="wiki" -v /data2/wiki:/data2/wiki nvcr.io/nvidia/cuda:11.0.3-cudnn8-devel-ubuntu18.04 /bin/bash
#进入容器
docker exec -it 913ab9b96473 /bin/bash
apt-get update#更新系统
cd /data2/wiki/confluence_setup/ #进入安装包目录
apt install default-jre #安装java运行环境
apt install mysql-server #安装mysql数据库
service mysql start #启动mysql
#建表
mysql -u root -p #登录mysql
> create database confluence character set utf8mb4 collate utf8mb4_bin;
> grant all privileges on confluence.* to 'confluence'@'localhost' identified by 'confluence';
> flush privileges;
#修改字符集支持中文
> show variables like 'char%';
> set character_set_client=utf8;
> set character_set_connection=utf8;
> set character_set_database=utf8;
> set character_set_results=utf8;
> set character_set_server=utf8;
> flush privileges;
>quit;
但是上面的设置,重启mysql服务就会失效,
vim /etc/mysql/mysql.conf.d/mysqld.cnf
增加,
character-set-server=utf8
collation-server=utf8_bin
#保证所有用户都可以访问
>grant all on *.* to admin@'%' identified by '123456' with grant option;
> flush privileges;
#修改mysql配置文件
vim /etc/mysql/mysql.conf.d/mysqld.cnf
将bind-address = 127.0.0.1进行注释掉
#修改read
>set global transaction isolation level READ COMMITTED;
> flush privileges;
>quit;
#使用mysql自带的workbench进行连接测试,证明可以连接成功
#安装confluence
chmod 777 atlassian-confluence-7.4.0-x64.bin #权限最高
bash atlassian-confluence-7.4.0-x64.bin
全部enter,
#修改mysql java 连接jar包
tar -xvf mysql-connector-java-5.1.49.tar.gz
cp mysql-connector-java-5.1.49/mysql-connector-java-5.1.49-bin.jar /data2/wiki/atlassian/confluence/confluence/WEB-INF/lib/
#重启confluence服务
/data2/wiki/atlassian/confluence/bin/shutdown.sh
/data2/wiki/atlassian/confluence/bin/startup.sh
#浏览器安装
输入服务器ip:8090,比如我的http://192.168.3.62:8090/
#破解
将/data2/wiki/atlassian/confluence/confluence/WEB-INF/lib/atlassian-extras-decoder-v2-3.4.1.jar
拷贝到本地confluence破解工具
并且将atlassian-extras-decoder-v2-3.4.1.jar改名为atlassian-extras-2.4.jar
执行,java -jar confluence_keygen.jar
Server ID输入浏览器上的ID,先.gen再.patch,完成后生成新的jar包
还是将生成的atlassian-extras-2.4.jar改名为atlassian-extras-decoder-v2-3.4.1.jar,
同时复制到/data2/wiki/atlassian/confluence/confluence/WEB-INF/lib/目录下,将原来的进行替换。
cd /data2/wiki/atlassian/confluence/confluence/WEB-INF/lib/
mv atlassian-extras-decoder-v2-3.4.1.jar atlassian-extras-decoder-v2-3.4.1.jar_bak
然后将新的拷贝过去。
#重启confluence服务
/data2/wiki/atlassian/confluence/bin/shutdown.sh
/data2/wiki/atlassian/confluence/bin/startup.sh
Database URL:jdbc:mysql://192.168.3.62:3306/confluence?useUnicode=true&characterEncoding=UTF-8&useSSL=false&sessionVariables=tx_isolation='READ-COMMITTED'
Plus:
修改文件目录,/data2/wiki/atlassian/application-data/confluence/confluence.cfg.xml
安装完成!