利用confluence搭建wiki

参考:https://www.cnblogs.com/wishwzp/p/7113403.html
https://blog.51cto.com/caiyuanji/2115500
官方文档:
https://confluence.atlassian.com/doc/confluence-administrator-s-guide-138143.html
1、部署mysql:下载5.7的包:
wget https://dev.mysql.com/get/mysql57-community-release-el7-11.noarch.rpm
安装mysql源
yum -y localinstall mysql57-community-release-el7-11.noarch.rpm
在线安装Mysql
yum -y install mysql-community-server
下载的东西比较多 要稍微等会;
启动Mysql服务
systemctl start mysqld
设置开机启动
[root@localhost ~]# systemctl enable mysqld
[root@localhost ~]# systemctl daemon-reload
初次安装并登陆mysql如果提示需要密码,而我们又没有密码的话,我们可以通过临时密码登录,临时密码的获取方法如下
grep "temporary password" /var/log/mysqld.log
然后将获取到的密码输入即可
如果忘记了密码,可以通过在mysql配置文件/etc/my.cnf里的mysqld模块下添加skip-grant-tables,这样就可以免密登录mysql了,然后重启mysql服务
service mysqld restart
登陆进去以后,将root密码更换,使用如下mysql命令
报错的原因是因为5.7版本下的mysql数据库下已经没有password这个字段了,password字段改成了authentication_string
mysql> use mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> update mysql.user set authentication_string=password('123') where user='root';
Query OK, 1 row affected, 1 warning (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 1

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

就可以更换mysql的root密码了。
更换完以后出于安全考虑,需要将之前的skip-grant-tables免密登录设置删除,然后重启mysql服务。
推荐:接下来就可以通过mysql的root用户和新密码登录了
另一种修改密码的方式:grep "temporary password" /var/log/mysqld.log
mysql> alter user 'root'@'localhost' identified by 'yanxueli';
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
默认是1,即MEDIUM,所以刚开始设置的密码必须符合长度,且必须含有数字,小写或大写字母,特殊字符。
有时候,只是为了自己测试,不想密码设置得那么复杂,譬如说,我只想设置root的密码为123456。
必须修改两个全局参数:
mysql> set global validate_password_length=1;
Query OK, 0 rows affected (0.00 sec)

mysql> set global validate_password_policy=0;
Query OK, 0 rows affected (0.00 sec)
nt.mysql> alter user 'root'@'localhost' identified by 'yanxueli';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
重启mysql并登陆创建confluence所需的账户密码和数据库
[root@docker ~]# mysql -uroot -p
mysql> create database confluence character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)
mysql> grant all on confluence.* to 'confluence'@'192.168.%' identified by '*****';
Query OK, 0 rows affected, 1 warning (0.01 sec)
必须使用READ-COMMITTED作为默认隔离级别,隔离级别说明可参考:
https://blog.csdn.net/baidu_37107022/article/details/77481670
mysql> SET GLOBAL tx_isolation='READ-COMMITTED';
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
修改数据库的配置:
1.指定允许传输的最大数据包的值
默认是在[mysqldump]下 16M
max_allowed_packet = 32M
2.指定默认字符集为UTF-8、修改默认存储引擎为innodb
[mysqld]
#confluence character-set
character-set-server=utf8
collation-server=utf8_bin
#confluence storage engine
default-storage-engine=INNODB
在页面设置里>一般设置>保证所有字符编码设置为UTF-8.
confluence6.9的数据库设置:
max_allowed_packet = 34M
innodb_log_file_size=256M
1.0部署mysql5.5
mysql 5.6安装参考:https://www.jianshu.com/p/9da4ba898719
检查本地是否安装过其他版本的mysql
rpm -qa|grep -i mysql
下载服务器包:wget https://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-server-5.5.59-1.el7.x86_64.rpm
下载客户端包:wget https://dev.mysql.com/get/Downloads/MySQL-5.5/MySQL-client-5.5.59-1.el7.x86_64.rpm
安装 rpm -ivh --nodeps MySQL-server-5.5.59-1.el7.x86_64.rpm
rpm -ivh --nodeps MySQL-client-5.5.59-1.el7.x86_64.rpm
查看安装的mysql是否已安装成功 :rpm -qa|grep -i mysql
启动mysql:service mysql start
设置开机自启动:systemctl enable mysql
设置密码:
[root@docker ~]# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.59 MySQL Community Server (GPL)

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> set password=password('yanxueli');
Query OK, 0 rows affected (0.00 sec)
为什么没有这个文件而MySQL却也能正常启动和使用,这个有两说法:

1、my.cnf只是MySQL启动时的一个参数文件,可以没有它,这时MySQL会用内置的默认参数启动;

2、MySQL在启动时自动使用/usr/share/mysql/my-medium.cnf文件,这种说法仅限于rpm包安装的MySQL。

解决方法很简单,只需复制/usr/share/mysql/my-medium.cnf文件到/etc目录,并改名为my.cnf即可:

cp /usr/share/mysql/my-medium.cnf /etc/my.cnf
2、下载confluence:
包地址:
https://cn.atlassian.com/software/confluence/download-archives
本次使用6.13版本
添加运行权限
chmod a+x atlassian-confluence-5.4.4-x64.bin
运行文件得到下面的内容,需要注意的是Confluence的安装路径,
默认程序:/opt/atlassian/confluence
默认数据:/var/atlassian/application-data/confluence
在安装的最后,会问Start Confluence now?我这里选择的是n,当然如果心急,输入y也是可以的,反正待会也是要重启服务。

执行安装程序,进行安装:

./atlassian-confluence-6.8.5-x64.bin
Unpacking JRE ...
Starting Installer ...

o确定安装,c取消

This will install Confluence 6.8.5 on your computer.
OK [o, Enter], Cancel [c]
o
Click Next to continue, or Cancel to exit Setup.

选择1是使用默认安装路径,2为自定义安装

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]
2

指定安装的目录,会自动创建,不输入直接回车就是使用默认路径

Select the folder where you would like Confluence 6.8.5 to be installed,
then click Next.
Where should Confluence 6.8.5 be installed?
[/opt/atlassian/confluence]
/usr/local/atlassian/confluence

使用默认的路径存储数据 confluence.home目录

Default location for Confluence data
[/var/atlassian/application-data/confluence]

使用默认的端口,8090和8000

Configure which ports Confluence will use.
Confluence requires two TCP ports that are not being used by any other
applications on this machine. The HTTP port is where you will access
Confluence through your browser. The Control port is used to Startup and
Shutdown Confluence.
Use default ports (HTTP: 8090, Control: 8000) - Recommended [1, Enter], Set custom value for HTTP and Control ports [2]
1

安装为后台进程,可后台运行

Confluence can be run in the background.
You may choose to run Confluence as a service, which means it will start
automatically whenever the computer restarts.
Install Confluence as Service?
Yes [y, Enter], No [n]
y

Extracting files ...

Please wait a few moments while we configure Confluence.

是否启动Confluence

Installation of Confluence 6.8.5 is complete
Start Confluence now?
Yes [y, Enter], No [n]
y

Please wait a few moments while Confluence starts up.
Launching Confluence ...

安装完成,访问本机的8090端口进行web端安装

Installation of Confluence 6.8.5 is complete
Your installation of Confluence 6.8.5 is now ready and can be accessed via
your browser.
Confluence 6.8.5 can be accessed at http://localhost:8090
Finishing installation ...

通过以上可以看出confluence安装到了/opt/atlassian/confluence和/var/atlassian/application-data/confluence目录下,并且confluence默认监听的端口是8090.一路默认安装即可!
注意:confluence的主要配置文件为/opt/atlassian/confluence/conf/server.xml,和jira类似。此server.xml相当于tomcat中的server.xml配置文件,如果要修改访问端口,可以这里修改。
如果要修改confluence的数据目录,可以在安装的时候,在安装过程中进行更换(默认是/var/atlassian/application-data/confluence)
设置firewalld 开放相关port
[root@docker ~]# firewall-cmd --zone=public --add-port={3306/tcp,8000/tcp,8090/tcp} --permanent
success
[root@docker ~]# firewall-cmd --reload
success
[root@docker ~]# firewall-cmd --list-port
3306/tcp 8000/tcp 8090/tcp

3、破解confluence
浏览器访问本机IP:8090
系统服务server _Id 并需要用户输入 授权码,如下所示:
利用confluence搭建wiki
4、 接下来需要破解confluence,首先停止confluence服务,如下所示:
[root@vm2 confluence]# /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 Java: /opt/atlassian/confluence/jre//bin/java
2018-05-03 17:31:28,470 INFO [main] [atlassian.confluence.bootstrap.SynchronyProxyWatchdog] A Context element for ${confluence.context.path}/synchrony-proxy is found in /opt/atlassian/confluence/conf/server.xml. No further action is required

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.
下载破解工具:
参考:https://blog.51cto.com/moerjinrong/2149177?utm_source=oschina-app
https://files.cnblogs.com/files/Javame/confluence%E7%A0%B4%E8%A7%A3%E5%B7%A5%E5%85%B7.zip

http://down.51cto.com/data/2449733
将/opt/atlassian/confluence/confluence/WEB-INF/lib下面的一个atlassian-extras-decoder-v2-3.3.0.jar(具体看自己版本)移到Windows任何一个目录里待会要用
在Windows将其改名为atlassian-extras-2.4.jar(因为破解工具只认这个版本的名称)
将新的atlassian-extras-2.4.jar移动到/opt/atlassian/confluence/confluence/WEB-INF/lib,并且删除旧的atlassian-extras-decoder-v2-3.2.jar。
在windows下,生成License Key。
打开下载好的破解工具(Windows必须提前配置好jdk)
然后本地电脑操作:
① 打开下载的破解工具,运行confluence_keygen.jar
②将记录的server ID填入,Name随便填。
③点击gen, 生成key并记录。
④点击patch,选择刚下传到本地的atlassian-extras-2.4.jar文件进行破解。
利用confluence搭建wiki
5、生成新的atlassian-extras-2.4.jar,旧的jar包会被改为.bak。将atlassian-extras-2.4.jar移回/opt/atlassian/confluence/confluence/WEB-INF/lib/ 下
OK,破解完成后,将破解后的文件传回服务器(不要关闭破解工具,过会需复制key里面的密钥)
利用confluence搭建wiki
6、配置修改mysql并上传mysql驱动
Confluence本身是没有集成mysql驱动的,需要自己下载并上传,原本在你安装的时候,输入key之后,会需要填入mysql连接信息,那里会有链接指向官方文档,教你如何配置mysql。但是配置完成后需要重启,会导致前面的破解出问题,所以,这里要一起完成后再重新启动。官方教程文档地址如下:
https://confluence.atlassian.com/doc/database-setup-for-mysql-128747.html
下载路径:https://dev.mysql.com/downloads/connector/j/5.1.html
建议使用官网https://confluence.atlassian.com/conf510/database-jdbc-drivers-829078053.html推荐的,在破解完confluence以后登录网页会提供相应的数据驱动程序的链接,如果要将confluence升级到最高版本,并且未使用推荐的mysql驱动程序,在升级之前从现有的confluence安装中复制驱动程序到新的文件夹中,路径:/opt/atlassian/confluence/confluence/WEB-INF/lib/
例如下载:
wget https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java-5.1.46.tar.gz
解压后把mysql-connector-java-5.1.46-bin.jar传到服务器上,放到confluence的类目录下:
cp mysql-connector-java-5.1.39-bin.jar /opt/atlassian/confluence/confluence/WEB-INF/lib/

7、完成上述步骤后,重启confluence
[root@jenkins lib]# ls mysql-connector-java-5.1.46-bin.jar
[root@jenkins lib]# /etc/init.d/confluence restart

To run Confluence in the foreground, start the server with start-confluence.sh -fg
executing using dedicated user: confluence
If you encounter issues starting up Confluence, please see the Installation guide at http://conflue
nce.atlassian.com/display/DOC/Confluence+Installation+Guide
Server startup logs are located in /opt/atlassian/confluence/logs/catalina.out

Using Java: /opt/atlassian/confluence/jre//bin/java
2019-01-14 23:38:24,042 INFO [main] [atlassian.confluence.bootstrap.SynchronyProxyWatchdog] A Conte
xt element for ${confluence.context.path}/synchrony-proxy is found in /opt/atlassian/confluence/conf/server.xml. No further action is required---------------------------------------------------------------------------
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/to
mcat-juli.jarUsing CATALINA_PID: /opt/atlassian/confluence/work/catalina.pid
Tomcat started.

8、confluence配置,配置confluence web连接数据库
利用confluence搭建wiki
5.4.3的
利用confluence搭建wiki

利用confluence搭建wiki
利用confluence搭建wiki

转载于:https://blog.51cto.com/13576471/2359101

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值