Tips:When you deploy Atlassian Confluence(*.tar.gz)
在过去的日志中,我记录了在RHEL5上配置Confluence的方法:http://d-prototype.com/archives/376
在过去的那篇日志中,我使用的介质是*.bin,它需要你执行“./*.bin”的方式安装。
刚刚,我在局域网中搭建了另一个Confluence的应用,和上次不同的是,这次使用的是“*.tar.gz”的介质。
.tar.gz的介质和.bin不同的是:.tar.gz解压后即可使用,而不需要像.bin那样要执行诸如MS Windows中的安装引导过程(“下一步”,…)。
简而言之,.tar.gz是绿色版的。
在.tar.gz的介质包部署的过程中,有几点是需要注意的,否则很容易遇到意外而导致安装失败或异常。
具体描述如下:
首先,是关于安装介质的官方下载页面(官方的下载页面的地址,个人感觉还是比较不容易找到的):
Confluence Download Page:https://www.atlassian.com/software/confluence/download
下载完成后,你可以看到如下所示的介质:
1 2 3 |
[root@adamhuanlinux atlassian-confluence]# du -sh /software/* | grep confluence 289M /software/atlassian-confluence-5.7.1.tar.gz [root@adamhuanlinux atlassian-confluence]# |
该介质解压后是这样子的:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
[root@adamhuanlinux atlassian-confluence]# pwd /home/atlassian-confluence [root@adamhuanlinux atlassian-confluence]# ll total 192 drwxr-xr-x 2 root root 69 Apr 20 14:31 analytics-logs drwxr-xr-x 3 root root 19 Apr 20 14:32 attachments drwxr-xr-x 2 root root 6 Apr 20 14:31 backups drwxr-xr-x 3 500 www 4096 Apr 20 13:09 bin drwxr-xr-x 2 root root 6 Apr 20 14:30 bundled-plugins drwxr-xr-x 3 500 www 4096 Apr 20 16:40 conf drwxr-xr-x 25 500 www 4096 Mar 5 12:14 confluence -rw-r--r-- 1 root root 2341 Apr 20 14:33 confluence.cfg.xml drwxr-xr-x 3 root root 4096 Apr 20 15:49 index drwxr-xr-x 2 root root 40 Apr 20 15:49 journal drwxr-xr-x 2 500 www 4096 Apr 20 13:05 lib -rw-r--r-- 1 500 www 57862 Feb 13 2014 LICENSE drwxr-xr-x 2 500 www 32768 Apr 20 13:05 licenses drwxr-xr-x 2 500 www 4096 Apr 20 14:29 logs -rw-r--r-- 1 500 www 1228 Feb 13 2014 NOTICE drwxr-xr-x 2 root root 141 Apr 20 15:03 plugins-cache drwxr-xr-x 5 root root 68 Apr 20 14:30 plugins-osgi-cache drwxr-xr-x 2 root root 6 Apr 20 14:30 plugins-temp -rw-r--r-- 1 500 www 2291 Mar 5 12:14 README.html -rw-r--r-- 1 500 www 1202 Mar 5 12:14 README.txt -rw-r--r-- 1 500 www 9195 Feb 13 2014 RELEASE-NOTES -rw-r--r-- 1 500 www 16682 Feb 13 2014 RUNNING.txt drwxr-xr-x 3 root root 19 Apr 20 14:30 shared-home drwxr-xr-x 10 500 www 4096 Apr 20 15:17 temp drwxr-xr-x 3 root root 17 Apr 20 14:32 viewfile drwxr-xr-x 2 500 www 6 Feb 13 2014 webapps drwxr-xr-x 2 root root 4096 Apr 20 15:49 webresource-temp drwxr-xr-x 3 500 www 42 Apr 20 14:29 work [root@adamhuanlinux atlassian-confluence]# |
上面有几个目录是需要被关注的:
./bin,启动或停止confluence服务的命令在该目录
./confluence/WEB-INF/lib,Confluence需要的支持包都位于该目录
./confluence/WEB-INF/classes,Confluence的配置文件位于该目录
查看当前Confluence的版本信息:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
[root@adamhuanlinux bin]# pwd /home/atlassian-confluence/bin [root@adamhuanlinux bin]# ./version.sh 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 /home/atlassian-confluence/logs/catalina.out Using CATALINA_BASE: /home/atlassian-confluence Using CATALINA_HOME: /home/atlassian-confluence Using CATALINA_TMPDIR: /home/atlassian-confluence/temp Using JRE_HOME: /usr/java/jdk1.8.0_45 Using CLASSPATH: /home/atlassian-confluence/bin/bootstrap.jar:/home/atlassian-confluence/bin/tomcat-juli.jar Using CATALINA_PID: /home/atlassian-confluence/work/catalina.pid Server version: Apache Tomcat/7.0.52 Server built: Feb 13 2014 10:24:25 Server number: 7.0.52.0 OS Name: Linux OS Version: 3.10.0-229.1.2.el7.x86_64 Architecture: amd64 JVM Version: 1.8.0_45-b14 JVM Vendor: Oracle Corporation [root@adamhuanlinux bin]# |
启动或停止Confluence服务:
1 2 3 4 5 6 7 8 |
[root@adamhuanlinux bin]# pwd /home/atlassian-confluence/bin [root@adamhuanlinux bin]# ls | grep confluence start-confluence.bat start-confluence.sh stop-confluence.bat stop-confluence.sh [root@adamhuanlinux bin]# |
如果你使用的是Linux系统,执行:*.sh;如果你使用的是MS Windows,执行:*.bat。
在start-confluence.sh之前,你需要配置一下Confluence的主目录(HOME):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
[root@adamhuanlinux atlassian-confluence]# pwd /home/atlassian-confluence [root@adamhuanlinux atlassian-confluence]# ls analytics-logs backups bundled-plugins confluence index lib licenses NOTICE plugins-osgi-cache README.html RELEASE-NOTES shared-home viewfile webresource-temp attachments bin conf confluence.cfg.xml journal LICENSE logs plugins-cache plugins-temp README.txt RUNNING.txt temp webapps work [root@adamhuanlinux atlassian-confluence]# [root@adamhuanlinux atlassian-confluence]# cat 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 confluence.home=/home/atlassian-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=/var/data/confluence/ ########################### # Configuration Directory # ########################### # specify your directory below (don't forget to remove the '#' in front) # confluence.home=c:/confluence/data # confluence.home=c:/confluence/data [root@adamhuanlinux atlassian-confluence]# |
如果这里你不正确的声明“confluence.home”的指向,那么当你“start-confluence.sh”后,浏览网页时,你会遇到奇怪的WEB容器报错。
————————————————————————————
Done。