当前位置:   article > 正文

搭建confluence服务器(详细操作+踩坑说明)_confluence 示范站点 空白站点

confluence 示范站点 空白站点

linux服务器配置推荐

前提:web服务,文件服务,数据库服务部署在同一台服务器上。

推荐配置

2核 + 4G8G内存 + 300G硬盘

经过实践,4G内存还是不够用。

部署资源

  • atlassian-confluence-6.9.1-x64.bin
  • confluence破解工具
  • mysql-8.0.20-linux-glibc2.12-i686.tar.xz
  • mysql-connector-java-8.0.20.jar
  • JDK1.8 ⬆(安装在本地windows上面,支持运行破解工具的jar文件)

部署过程

  • 上传atlassian-confluence-6.9.1-x64.bin到服务器

  • 给atlassian-confluence-6.9.1-x64.bin文件赋执行权限
  1. cd /home/confluence
  2. chmod 777 atlassian-confluence-6.9.1-x64.bin
  • 执行atlassian-confluence-6.9.1-x64.bin文件进行安装
  1. [root@localhost confluence]# ./atlassian-confluence-6.9.1-x64.bin
  2. Unpacking JRE ...
  3. Starting Installer ...
  4. #是否要安装:是
  5. This will install Confluence 6.9.1 on your computer.
  6. OK [o, Enter], Cancel [c]
  7. o
  8. Click Next to continue, or Cancel to exit Setup.
  9. #如何安装:自定义
  10. Choose the appropriate installation or upgrade option.
  11. Please choose one of the following:
  12. Express Install (uses default settings) [1],
  13. Custom Install (recommended for advanced users) [2, Enter],
  14. Upgrade an existing Confluence installation [3]
  15. 2
  16. #默认安装目录?:否 /home/confluence/app
  17. Select the folder where you would like Confluence 6.9.1 to be installed,
  18. then click Next.
  19. Where should Confluence 6.9.1 be installed?
  20. [/opt/atlassian/confluence]
  21. /home/confluence/app
  22. #默认数据目录?:否 /home/confluence/data
  23. Default location for Confluence data
  24. [/var/atlassian/application-data/confluence]
  25. /home/confluence/data
  26. #默认端口?:是
  27. Configure which ports Confluence will use.
  28. Confluence requires two TCP ports that are not being used by any other
  29. applications on this machine. The HTTP port is where you will access
  30. Confluence through your browser. The Control port is used to Startup and
  31. Shutdown Confluence.
  32. Use default ports (HTTP: 8090, Control: 8000) - Recommended [1, Enter], Set custom value for HTTP and Control ports [2]
  33. 1
  34. #确认安装confluence作为服务?:是
  35. Confluence can be run in the background.
  36. You may choose to run Confluence as a service, which means it will start
  37. automatically whenever the computer restarts.
  38. Install Confluence as Service?
  39. Yes [y, Enter], No [n]
  40. y
  41. Extracting files ...
  42. Please wait a few moments while we configure Confluence.
  43. #安装完成,是否启动?是
  44. Installation of Confluence 6.9.1 is complete
  45. Start Confluence now?
  46. Yes [y, Enter], No [n]
  47. y
  48. Please wait a few moments while Confluence starts up.
  49. Launching Confluence ...
  50. Installation of Confluence 6.9.1 is complete
  51. Your installation of Confluence 6.9.1 is now ready and can be accessed via
  52. your browser.
  53. Confluence 6.9.1 can be accessed at http://localhost:8090
  54. Finishing installation ...
  • 防火墙开放两个默认端口8090和8000 并重启防火墙
  1. [root@localhost confluence]# firewall-cmd --zone=public --add-port=8090/tcp --permanent
  2. success
  3. [root@localhost confluence]# firewall-cmd --zone=public --add-port=8000/tcp --permanent
  4. success
  5. [root@localhost confluence]# systemctl reload firewalld

 

  • 验证安装画面可以访问 地址:http://服务器IP:8090

  • 停止服务
  1. [root@localhost ~]# /home/confluence/app/bin/shutdown.sh
  2. If you encounter issues starting up Confluence, please see the Installation guide at http://confluence.atlassian.com/display/DOC/Confluence+Installation+Guide
  3. Server startup logs are located in /home/confluence/app/logs/catalina.out
  4. ---------------------------------------------------------------------------
  5. Using Java: /home/confluence/app/jre//bin/java
  6. 2020-09-17 08:22:40,784 INFO [main] [atlassian.confluence.bootstrap.SynchronyProxyWatchdog] A Context element for ${confluence.context.path}/synchrony-proxy is found in /home/confluence/app/conf/server.xml. No further action is required
  7. ---------------------------------------------------------------------------
  8. Using CATALINA_BASE: /home/confluence/app
  9. Using CATALINA_HOME: /home/confluence/app
  10. Using CATALINA_TMPDIR: /home/confluence/app/temp
  11. Using JRE_HOME: /home/confluence/app/jre/
  12. Using CLASSPATH: /home/confluence/app/bin/bootstrap.jar:/home/confluence/app/bin/tomcat-juli.jar
  13. Using CATALINA_PID: /home/confluence/app/work/catalina.pid
  14. Tomcat stopped.
  15. [root@localhost ~]#

  • 把atlassian-extras-decoder-v2-3.3.0.jar 下载到本地并重命名为atlassian-extras-2.4.jar
  • 在本地windows系统上启动启动破解程序


 

 

  • 保留破解工具的窗口,一定不能关闭
  • 重命名刚才的文件为atlassian-extras-decoder-v2-3.3.0.jar(原先的名字),上传到linux服务器原来的位置/home/confluence/app/confluence/WEB-INF/lib
  • 把mysql-connector-java-8.0.20.jar同样上传到/home/confluence/app/confluence/WEB-INF/lib(踩过的坑,后面需要用它连接数据库,在这里提前放进去,后面就不需要重启了)
  • 启动服务(tomcat已启动不代表web服务已经启动完成,需要稍等一会儿)

 

  1. [root@localhost ~]# /home/confluence/app/bin/startup.sh
  2. If you encounter issues starting up Confluence, please see the Installation guide at http://confluence.atlassian.com/display/DOC/Confluence+Installation+Guide
  3. Server startup logs are located in /home/confluence/app/logs/catalina.out
  4. ---------------------------------------------------------------------------
  5. Using Java: /home/confluence/app/jre//bin/java
  6. 2020-09-17 08:29:19,271 INFO [main] [atlassian.confluence.bootstrap.SynchronyProxyWatchdog] A Context element for ${confluence.context.path}/synchrony-proxy is found in /home/confluence/app/conf/server.xml. No further action is required
  7. ---------------------------------------------------------------------------
  8. Using CATALINA_BASE: /home/confluence/app
  9. Using CATALINA_HOME: /home/confluence/app
  10. Using CATALINA_TMPDIR: /home/confluence/app/temp
  11. Using JRE_HOME: /home/confluence/app/jre/
  12. Using CLASSPATH: /home/confluence/app/bin/bootstrap.jar:/home/confluence/app/bin/tomcat-juli.jar
  13. Using CATALINA_PID: /home/confluence/app/work/catalina.pid
  14. Tomcat started.
  • 在本地windows系统访问 http://服务器IP:8090 并进行下一步安装
  • 选择中文语言(响应时间较长),选择产品安装, 下一步

 

  • 使用之前的破解工具获取key,填好Name,和Server ID然后点击.gen!

  • 将生成的key复制到web页面进行下一步

 

 

  • 接下来要进行数据库的安装,先不要点击下一步

 

  • 在服务器上装mariadb

#mariadb是mysql的一个分支,具体内容参考百科

#https://baike.baidu.com/item/mariaDB/6466119?fr=aladdin

 

yum -y install mariadb mariadb-server

systemctl start mariadb

接下来进行MariaDB的相关简单配置

执行命令

mysql_secure_installation

首先是设置密码,会提示先输入密码

Enter current password for root (enter for none):<–初次运行直接回车

设置密码

Set root password? [Y/n] <– 是否设置root用户密码,输入y并回车或直接回车

New password: <– 设置root用户的密码

Re-enter new password: <– 再输入一次你设置的密码

其他配置

Remove anonymous users? [Y/n] <– 是否删除匿名用户,回车

Disallow root login remotely? [Y/n] <–是否禁止root远程登录,回车,

Remove test database and access to it? [Y/n] <– 是否删除test数据库,回车

Reload privilege tables now? [Y/n] <– 是否重新加载权限表,回车

初始化MariaDB完成,接下来测试登录

mysql -u root -p

修改my.cnf文件设置字符集等配置

my.cnf文件配置的坑:

坑1:

# Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0

应该是分两行展示了,修改该行为一行显示,或者把这两行全部注释掉即可

坑2:

以下红色部分提前配置一下,否则后面会有进行配置和重启数据库服务的操作。

[root@heaven00 soft]# cat /etc/my.cnf

[mysqld]

init_connect='SET collation_connection = utf8_unicode_ci'

init_connect='SET NAMES utf8'

character-set-server=utf8

collation-server=utf8_unicode_ci

skip-character-set-client-handshake

max_allowed_packet=256M

innodb_log_file_size=1G

[client]

default-character-set=utf8

[mysql]

default-character-set=utf8

重启数据库

systemctl restart mariadb.service

#如果重启失败了,删除以下log再重启

cd /var/lib/mysql

rm -rf ib_logfile*

systemctl restart mariadb.service

  • 创建confluence使用的数据库,以及创建连接的用户,及授权
  1. [root@localhost ~]# mysql -u root -p
  2. Enter password:
  3. Welcome to the MariaDB monitor. Commands end with ; or \g.
  4. Your MariaDB connection id is 2
  5. Server version: 5.5.65-MariaDB MariaDB Server
  6. Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
  7. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  8. MariaDB [(none)]> create database confluence default character set utf8 collate utf8_bin;
  9. Query OK, 1 row affected (0.00 sec)
  10. MariaDB [(none)]> grant all on confluence.* to 'confluence'@'%' identified by '123456';
  11. Query OK, 0 rows affected (0.00 sec)
  12. MariaDB [(none)]> flush privileges;
  13. Query OK, 0 rows affected (0.00 sec)
  14. MariaDB [(none)]> SET GLOBAL tx_isolation='READ-COMMITTED';
  15. Query OK, 0 rows affected (0.00 sec)
  16. MariaDB [(none)]>

 

  • 在画面上接着下一步

  • 填写好数据库连接信息,测试连接,下一步

 

  • 需要一些时间,等待一下

  • 选择示范站点就是在confluence里面创建一个sample,空白站点就是从0开始。此处我选择了空白站点。

官网找demo: https://gitee.com/enterprises/demo

 

  • 配置管理用户与组

 

 

  • 按照网上常见的流程,  点击开始以后还会遇到这3个问题,这里我们应该是只遇到第一个问题
  1. 寿命终止检查:意思就是版本不受支持,要求更新到最新版本,作为破解版的使用,可以让它不要再提醒了。
  2. 最大允许数据包检查:在前面【坑2】处已经提前做了处理,这边可能不会再出现
  3. InnoDB日志文件大小检查:在前面【坑2】处已经提前做了处理,这边可能不会再出现

  • 用新session访问 http://服务器IP:8090 就能访问到以下画面了。

       用管理员创建用户什么的就不在此细说了。

 

  • 登陆之后会遇到这样的问题

设置一下就可以了

  1. mysql -u root -p
  2. Enter password:
  3. Welcome to the MariaDB monitor. Commands end with ; or \g.
  4. Your MariaDB connection id is 416
  5. Server version: 5.5.65-MariaDB MariaDB Server
  6. Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
  7. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  8. MariaDB [(none)]> use confluence
  9. Reading table information for completion of table and column names
  10. You can turn off this feature to get a quicker startup with -A
  11. Database changed
  12. MariaDB [confluence]> set @@session.tx_isolation='read-committed';
  13. Query OK, 0 rows affected (0.00 sec)
  14. MariaDB [confluence]> select @@session.tx_isolation;
  15. +------------------------+
  16. | @@session.tx_isolation |
  17. +------------------------+
  18. | READ-COMMITTED |
  19. +------------------------+
  20. 1 row in set (0.00 sec)

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/126096?site
推荐阅读
相关标签
  

闽ICP备14008679号