confluence迁移后文件打不开_Confluence迁移
测试wiki迁移@(wiki迁移测试)环境wiki测试环境:172.16.100.71Centos 6.5Confluence 5.8.10JDK 1.7.0Mysql 5.6.34恢复测试机:172.16.100.76Centos6.5JDK 1.7.0Mysql 5.6.34在wiki测试环境:172.16.100.71 的操作1、将wiki测试环境的confluence打包。及confl..
测试wiki迁移
@(wiki迁移测试)
环境
wiki测试环境:172.16.100.71
Centos 6.5
Confluence 5.8.10
JDK 1.7.0
Mysql 5.6.34
恢复测试机:172.16.100.76
Centos6.5
JDK 1.7.0
Mysql 5.6.34
在wiki测试环境:172.16.100.71 的操作
1、 将wiki测试环境的confluence打包。及confluence_home打包
[root@localhost /]# cd /usr/local/
[root@localhost local]# tar zcvf onfluence_2017_3_20.tar.gz confluence
[root@localhost local]# ls
confluence confluence_2017_3_20.tar.gz
[root@localhost local]# cd /data0/ #confluence_home路径
[root@localhost data0]# tar zcvf confluence_home_2017.tar.gz confluence_home
[root@localhost data0]# ll confluence_home_2017.tar.gz
-rw-r--r--. 1 root root 149608795 3月 20 16:21 confluence_home_2017.tar.gz
2、备份数据库
[root@localhost /]# mysqldump -uroot -p confluence > /confluence.sql
Enter password:
[root@localhost /]# ll confluence.sql
-rw-r--r--. 1 root root 3941956 3月 20 15:52 confluence.sql
3、将confluence的包及备份的数据库拷贝到恢复测试机上(172.16.100.76)
[root@localhost /]# pwd
/
[root@localhost /]# scp -P 22 confluence.sql 172.16.100.76:/
root@172.16.100.76's password:
confluence.sql 100% 3850KB 3.8MB/s 00:00
[root@localhost /]#
将confluence的包拷贝到恢复测试机上(172.16.100.76),并查看md5值
[root@localhost /]# cd /usr/local/
[root@localhost local]# ll confluence_2017_3_20.tar.gz
-rw-r--r--. 1 root root 442196259 3月 20 15:49 confluence_2017_3_20.tar.gz
[root@localhost local]# scp -P 22 confluence_2017_3_20.tar.gz 172.16.100.76:/
root@172.16.100.76's password:
confluence_2017_3_20.tar.gz 100% 422MB 4.1MB/s 01:44
[root@localhost local]# md5sum confluence_2017_3_20.tar.gz
cf04edb4720ff3d7ef01aa6c62198a07 confluence_2017_3_20.tar.gz
[root@localhost local]#
将confluence_home 拷贝到恢复测试机上,并查看md5
[root@localhost data0]# scp -P 22 confluence_home_2017.tar.gz 172.16.100.76:/
]root@172.16.100.76's password:
confluence_home_2017.tar.gz 100% 143MB 5.5MB/s 00:26
[root@localhost data0]# md5sum confluence_home_2017.tar.gz
591a59e77f4c51c4017cb846cdb8c903 confluence_home_2017.tar.gz
[root@localhost data0]#
在恢复测试机:172.16.100.76的操作
1、查看传过来包的md5
[root@localhost /]# md5sum confluence*
cf04edb4720ff3d7ef01aa6c62198a07 confluence_2017_3_20.tar.gz
591a59e77f4c51c4017cb846cdb8c903 confluence_home_2017.tar.gz
642f80eac435abb0b6a3ccbc31d61c1e confluence.sql
[root@localhost /]#
2、将confluence包解压放在相对应的位置,由于之前confluence配置文件confluence-init.properties 中的home路径为/data0/ 路径下,也可以修改该文件指定新的home路径,可以将confluence_home 拷贝到新的路径也行。(本示例是和原测试环境一样)
[root@localhost /]# tar zxvf confluence_2017_3_20.tar.gz -C /usr/local/
[root@localhost /]# tar zxvf confluence_home_2017.tar.gz -C /data0/
3、查看解压的文件,由于在原测试服务器上面该文件的属组和属主是atlassian 账号,所以启动的时候需要修改属组和属主或者在该机器上创建该账号
[root@localhost data0]# cd /usr/local/
[root@localhost local]# ll confluence/
总用量 276
drwxr-xr-x. 2 atlassian atlassian 4096 3月 3 17:38 bin
drwxr-xr-x. 3 atlassian atlassian 4096 3月 3 17:39 conf
drwxr-xr-x. 25 atlassian atlassian 4096 3月 3 17:38 confluence
-rw-rw-r--. 1 atlassian atlassian 77803 3月 3 17:39 install.reg
drwxrwxr-x. 6 atlassian atlassian 4096 3月 3 17:38 jre
drwxr-xr-x. 2 atlassian atlassian 4096 3月 3 17:38 lib
-rw-r--r--. 1 atlassian atlassian 58034 8月 28 2015 LICENSE
drwxr-xr-x. 2 atlassian atlassian 53248 3月 3 17:38 licenses
drwxr-xr-x. 2 atlassian atlassian 4096 3月 20 10:25 logs
-rw-r--r--. 1 atlassian atlassian 1442 8月 28 2015 NOTICE
-rw-r--r--. 1 atlassian atlassian 2294 8月 28 2015 README.html
-rw-r--r--. 1 atlassian atlassian 1204 8月 28 2015 README.txt
-rw-r--r--. 1 atlassian atlassian 6913 8月 28 2015 RELEASE-NOTES
-rw-r--r--. 1 atlassian atlassian 16682 8月 28 2015 RUNNING.txt
drwxr-xr-x. 5 atlassian atlassian 4096 3月 3 18:08 temp
-rwx------. 1 atlassian atlassian 11201 8月 28 2015 uninstall
drwxr-xr-x. 2 atlassian atlassian 4096 8月 28 2015 webapps
drwxr-xr-x. 3 atlassian atlassian 4096 3月 3 18:03 work
[root@localhost local]# cd /data0/
[root@localhost data0]# ll confluence_home
总用量 64
drwxrwxr-x. 2 atlassian atlassian 4096 3月 20 08:08 analytics-logs
drwxrwxr-x. 2 atlassian atlassian 4096 3月 3 18:06 attachments
drwxrwxr-x. 2 atlassian atlassian 4096 3月 20 02:00 backups
drwxrwxr-x. 2 atlassian atlassian 4096 3月 3 18:05 bundled-plugins
-rw-rw-r--. 1 atlassian atlassian 2459 3月 3 18:08 confluence.cfg.xml
drwxrwxr-x. 2 atlassian atlassian 4096 3月 3 18:06 imgEffects
drwxrwxr-x. 4 atlassian atlassian 4096 3月 17 21:51 index
drwxrwxr-x. 2 atlassian atlassian 4096 3月 17 21:51 journal
drwxrwxr-x. 2 atlassian atlassian 4096 3月 3 17:39 logs
drwxrwxr-x. 2 atlassian atlassian 4096 3月 3 18:08 plugins-cache
drwxrwxr-x. 5 atlassian atlassian 4096 3月 3 18:05 plugins-osgi-cache
drwxrwxr-x. 2 atlassian atlassian 4096 3月 3 18:05 plugins-temp
drwxrwxr-x. 3 atlassian atlassian 4096 3月 3 18:05 shared-home
drwxrwxr-x. 2 atlassian atlassian 4096 3月 20 04:00 temp
drwxrwxr-x. 3 atlassian atlassian 4096 3月 3 18:06 viewfile
drwxrwxr-x. 2 atlassian atlassian 4096 3月 16 21:54 webresource-temp
[root@localhost data0]#
4、创建数据库,先在本台主机添加confluence数据库
Mysql>create database confluence character set UTF8;
Mysql>grant all on confluence.* to confluence@"%"identified by "confluence";
Mysql>grant all on confluence.* to confluence@"localhost" identified by "confluence";
5、恢复数据库
[root@localhost /]# mysql -uconfluence -p confluence < confluence.sql
Enter password:
[root@localhost /]#
6、查看数据库,(看confluence数据库里面有表,说明已经导入成功)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| confluence |
| mysql |
| performance_schema |
| test |
+--------------------+
5 rows in set (0.00 sec)
mysql> use confluence;
Database changed
mysql> show tables;
+--------------------------------+
| Tables_in_confluence |
+--------------------------------+
| AO_187CCC_SIDEBAR_LINK |
| AO_21D670_WHITELIST_RULES |
| AO_26DB7F_ENTITIES_TO_ROOMS |
| AO_38321B_CUSTOM_CONTENT_LINK |
| AO_42E351_HEALTH_CHECK_ENTITY |
7、创建atlassian账号
[root@localhost /]# cat /etc/passwd | grep "atlassian"
atlassian:x:509:509::/home/atlassian:/bin/bash
8、切换账号登陆,并启用服务
[root@localhost /]# su atlassian
[atlassian@localhost /]$ /usr/local/confluence/bin/startup.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 /usr/local/confluence/logs/catalina.out
Using CATALINA_BASE: /usr/local/confluence
Using CATALINA_HOME: /usr/local/confluence
Using CATALINA_TMPDIR: /usr/local/confluence/temp
Using JRE_HOME: /usr/local/confluence/jre/
Using CLASSPATH: /usr/local/confluence/bin/bootstrap.jar:/usr/local/confluence/bin/tomcat-juli.jar
Using CATALINA_PID: /usr/local/confluence/work/catalina.pid
Existing PID file found during start.
Removing/clearing stale PID file.
Tomcat started.
9、查看confluence进程
[atlassian@localhost /]$ ps -ef | grep confluence
509 25338 1 58 17:03 pts/1 00:00:22 /usr/local/confluence/jre//bin/java -Djava.util.logging.config.file=/usr/local/confluence/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -XX:-UseAESIntrinsics -Xms1024m -Xmx1024m -XX:+UseG1GC -Djava.awt.headless=true -Xloggc:/usr/local/confluence/logs/gc-2017-03-20_17-03-41.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M -XX:-PrintGCDetails -XX:+PrintGCTimeStamps -XX:-PrintTenuringDistribution -Djava.endorsed.dirs=/usr/local/confluence/endorsed -classpath /usr/local/confluence/bin/bootstrap.jar:/usr/local/confluence/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/confluence -Dcatalina.home=/usr/local/confluence -Djava.io.tmpdir=/usr/local/confluence/temp org.apache.catalina.startup.Bootstrap start
509 25362 25306 0 17:04 pts/1 00:00:00 grep confluence
[atlassian@localhost /]$
10、测试 启动浏览器输入http://172.16.100.76:8090,
登陆界面
如果报错有htt 500错误有可能是权限问题,解决方法,然后重启服务
[root@localhost confluence_home]# chown -R atlassian:atlassian /usr/local/confluence
[root@localhost confluence_home]# chown -R atlassian:atlassian /data0/confluence_home
[root@localhost confluence_home]# ps -ef | grep confluence
509 25338 1 8 17:03 pts/1 00:00:24 /usr/local/confluence/jre//bin/java -Djava.util.logging.config.file=/usr/local/confluence/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -XX:-UseAESIntrinsics -Xms1024m -Xmx1024m -XX:+UseG1GC -Djava.awt.headless=true -Xloggc:/usr/local/confluence/logs/gc-2017-03-20_17-03-41.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M -XX:-PrintGCDetails -XX:+PrintGCTimeStamps -XX:-PrintTenuringDistribution -Djava.endorsed.dirs=/usr/local/confluence/endorsed -classpath /usr/local/confluence/bin/bootstrap.jar:/usr/local/confluence/bin/tomcat-juli.jar -Dcatalina.base=/usr/local/confluence -Dcatalina.home=/usr/local/confluence -Djava.io.tmpdir=/usr/local/confluence/temp org.apache.catalina.startup.Bootstrap start
root 25377 24984 0 17:08 pts/1 00:00:00 grep confluence
[root@localhost confluence_home]# kill -9 25338
[root@localhost confluence_home]# su atlassian
[atlassian@localhost confluence_home]$ /usr/local/confluence/bin/startup.sh
DEVPOD社区,旨在打造高质量的DevOps工具知识库。包括商业工具:Atlassian Jira,Confluence,Jfrog,极狐, CodeBeamer等。开源工具栈如:Gitlab,ArgoCD, Jenkins等。 致力于帮助企业建实现云原生时代DevOps转型。
更多推荐
所有评论(0)