1.安装confluence
1. 软件环境说明
# 安装 jdk
[root@wiki_5-6-6 jar]# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core) [root@wiki_5-6-6 jar]# systemctl status firewalld.service ● firewalld.service - firewalld - dynamic firewall daemon Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled) Active: inactive (dead) Docs: man:firewalld(1) [root@wiki_5-6-6 jar]# getenforce Disabled [root@wiki_5-6-6 jar]# yum install java [root@wiki_5-6-6 jar]# java -version openjdk version "1.8.0_181" OpenJDK Runtime Environment (build 1.8.0_181-b13) OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
# 安装数据库,为confluence创建对应的数据库
[root@wiki_5-6-6 ~]# yum install mariadb-server
[root@wiki_5-6-6 ~]# systemctl enable mariadb.service
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service. [root@wiki_5-6-6 ~]# systemctl start mariadb.service
[root@wiki_5-6-6 ~]# mysqladmin -uroot password XXXXX
mysql配置
MariaDB [(none)]> create database confluence default character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> grant all on confluence.* to 'confluence'@'localhost' identified by 'confluence'; Query OK, 0 rows affected (0.00 sec)
2. 安装confluence
[root@wiki_5-6-6 ~]# wget "http://10.0.3.82:28080/atlassian-confluence-5.6.6-x64.bin" --2018-08-13 14:46:32-- http://10.0.3.82:28080/atlassian-confluence-5.9.9-x64.bin Connecting to 10.0.3.82:28080... connected. HTTP request sent, awaiting response... 200 OK Length: 465317024 (444M) [application/octet-stream] Saving to: ‘atlassian-confluence-5.6.6-x64.bin’ 100%[==================================================================================================================================================================================================================>] 465,317,024 112MB/s in 4.0s 2018-08-13 14:46:36 (112 MB/s) - ‘atlassian-confluence-5.6.6-x64.bin’ saved [465317024/465317024] [root@wiki_5-6-6 ~]# ls anaconda-ks.cfg atlassian-confluence-5.6.6-x64.bin sys_init.sh [root@wiki_5-6-6 ~]# chmod +x atlassian-confluence-5.6.6-x64.bin [root@localhost ~]# ./atlassian-confluence-5.6.6-x64.bin Unpacking JRE ... Starting Installer ... Aug 13, 2018 2:46:51 PM java.util.prefs.FileSystemPreferences$1 run INFO: Created user preferences directory. Aug 13, 2018 2:46:51 PM java.util.prefs.FileSystemPreferences$2 run INFO: Created system preferences directory in java.home. This will install Confluence 5.6.6 on your computer. OK [o, Enter], Cancel [c] o Choose the appropriate installation or upgrade option. Please choose one of the following: Express Install (uses default settings) [1], Custom Install (recommended for advanced users) [2, Enter], Upgrade an existing Confluence installation [3] 1 See where Confluence will be installed and the settings that will be used. Installation Directory: /opt/atlassian/confluence Home Directory: /var/atlassian/application-data/confluence HTTP Port: 8090 RMI Port: 8000 Install as service: Yes Install [i, Enter], Exit [e] i Extracting files ... Please wait a few moments while Confluence starts up. Launching Confluence ... Installation of Confluence 5.6.6 is complete Your installation of Confluence 5.6.6 is now ready and can be accessed via your browser. Confluence 5.6.6 can be accessed at http://localhost:8090 Finishing installation ...
安装完成浏览器访问 http://IP:8090
3. 破解confluence
通过上图,我们可以看到现在confluence要输入license key,下面进行破解。
1、停止 conflunce服务
[root@wiki_5-6-6 ~]# /etc/init.d/confluence stop executing using dedicated user If you encounter issues starting up Confluence, please see the Installation guide at http://confluence.atlassian.com/display/DOC/Confluence+Installation+Guide Server startup logs are located in /opt/atlassian/confluence/logs/catalina.out Using CATALINA_BASE: /opt/atlassian/confluence Using CATALINA_HOME: /opt/atlassian/confluence Using CATALINA_TMPDIR: /opt/atlassian/confluence/temp Using JRE_HOME: /opt/atlassian/confluence/jre/ Using CLASSPATH: /opt/atlassian/confluence/bin/bootstrap.jar:/opt/atlassian/confluence/bin/tomcat-juli.jar Using CATALINA_PID: /opt/atlassian/confluence/work/catalina.pid Tomcat stopped.
2、 删除原来的包文件
[root@wiki_5-6-6 ~]# cd /opt/atlassian/confluence/confluence/WEB-INF/lib [root@conflunce lib]# ll |grep atlassian-extra |wc -l 6 [root@wiki_5-6-6 lib]# ll |grep atlassian-extra -rw-r--r-- 1 root root 14935 12月 1 2014 atlassian-extras-api-3.2.jar -rw-r--r-- 1 root root 21788 12月 1 2014 atlassian-extras-common-3.2.jar -rw-r--r-- 1 root root 38244 12月 1 2014 atlassian-extras-core-3.2.jar -rw-r--r-- 1 root root 5171 12月 1 2014 atlassian-extras-decoder-api-3.2.jar -rw-r--r-- 1 root root 6668 12月 1 2014 atlassian-extras-decoder-v2-3.2.jar -rw-r--r-- 1 root root 68438 12月 1 2014 atlassian-extras-legacy-3.2.jar [root@wiki_5-6-6 lib]# rm -fr atlassian-extra*
3、把修改包里面的 atlassian-extras-3.2.jar、Confluence-5.6.6-language-pack-zh_CN.jar、mysql-connector-java-5.1.39-bin.jar 将三个jar文件复制到/opt/atlassian/confluence/confluence/WEB-INF/lib目录下
[root@wiki_5-6-6 ~]# wget "http://10.0.3.82:28080/confluence5.6.6-crack.zip" [root@wiki_5-6-6 ~]# unzip confluence5.6.6-crack.zip [root@wiki_5-6-6 ~]# cd confluence5.6.6-crack/jar/ [root@wiki_5-6-6 ~]# cp ./* /opt/atlassian/confluence/confluence/WEB-INF/lib/
[root@wiki_5-6-6 ~]# /etc/init.d/confluence start
其中atlassian-extras-3.2.jar文件是和license相关的, Confluence-5.6.6-language-pack-zh_CN.jar 是confluence中文语言包,而 mysql-connector-java-5.1.39-bin.jar 是confluence连接mysql数据库相关的jar包。
4、在windows上运行confluence_keygen.jar,windows上需要安装jdk运行环境。
Server ID填写浏览器上的,将生成的key复制到web界面即可
4. 配置数据库
选择direct JDBC
输入数据库用户密码
数据库初始化完毕后,会跳转到如下界面
配置confluence的管理员账号和密码
安装完成后的界面,到此Confluence就安装完成了。