미디어위키 이전

미디어위키 이전, 마이그레이션

1 출발지 서버[ | ]

PHP 소스 및 업로드된 파일 압축
[root@zetawiki1 ~]# cd /var/www/html/
[root@zetawiki1 html]# tar cfvj w.bz2 ./w
... (생략)
./w/thumb_handler.php
./w/LocalSettings.php
./w/opensearch_desc.php5
DB 덤프
[root@zetawiki1 html]# mysqldump -uroot -p --databases my_wiki > my_wiki.sql
Enter password:
[root@zetawiki1 html]# tar cfvj sql.bz2 my_wiki.sql
  • w.bz2와 sql.bz2를 목적지 서버로 업로드

2 목적지 서버[ | ]

[root@zetawiki2 html]# ll
total 24316
-rw-r--r-- 1 root root  3598388 Jun 18 17:41 sql.bz2
-rw-r--r-- 1 root root 21298364 Jun 18 17:41 w.bz2
압축 해제
[root@zetawiki2 html]# tar xfvj sql.bz2
my_wiki.sql
[root@zetawiki2 html]# tar xfvj w.bz2
... (생략)
./w/thumb_handler.php
./w/LocalSettings.php
./w/opensearch_desc.php5
[root@zetawiki2 html]# ll
total 42184
-rw-r--r--  1 root root 18292127 Jun 18 17:39 my_wiki.sql
-rw-r--r--  1 root root  3598388 Jun 18 17:41 sql.bz2
drwxr-xr-x 15 root root     4096 Jun  5 11:42 w
-rw-r--r--  1 root root 21298364 Jun 18 17:41 w.bz2
DB 생성
[root@zetawiki2 html]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1202
Server version: 5.1.66 Source distribution

Copyright (c) 2000, 2012, 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> create database my_wiki;
Query OK, 1 row affected (0.00 sec)
mysql> quit
Bye
DB 입력
[root@zetawiki2 html]# mysql -uroot -p my_wiki < my_wiki.sql
Enter password:
vi /var/www/html/w/LocalSettings.php
LocalSettings.php 수정
## The protocol and server name to use in fully-qualified URLs
$wgServer           = "http://135.79.246.80";
... (생략)
## Database settings
$wgDBtype           = "mysql";
$wgDBserver         = "localhost";
$wgDBname           = "my_wiki";
$wgDBuser           = "root";
$wgDBpassword       = "P@ssw0rd";

# MySQL specific settings
$wgDBprefix = "jm_";
→ 서버 및 DB접속 정보를 목적지 서버에 맞게 수정해준다.

3 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}