이 설치 가이드는 크게 네 부분으로 나뉜다. MySQL 설치, Apache 설치, PHP 설치, WordPress 설치가 그것이다. WordPress를 설치하기로 마음먹고 나서 제일 먼저 한 일은 WordPress 사이트에 방문하여 바이너리를 받는 일이었다. 우선 사이트에 접속해 보자. 상단에 보면 DOWNLOAD 라는 메뉴가 있다. 윈도우즈에서 설치할 것이기 때문에 DOWNLOAD.ZIP을 선택하였다. 접속 당시 버전은 2.0.2 였다. 다운로드 페이지에 보면 두번째 단락에 Installation 이라는 링크가 보이는데 클릭해 보자. 클릭하면 설치 관련 문서 페이지로 이동한다. 순서대로 정리가 잘 되어 있는데, 내가 원하는 것은 기본적인 설치이기 때문에 두가지만 살펴 보았다. 설치천 알아야 하는 것들(Things to Know Before You Begin)과 5분 설치(Famous 5-Minute Install) 두 가지 였다. 설치전 필요한 내용을 보면 다음과 같은 3가지 항목이다.
* PHP 4.2 or greater
* MySQL 3.23.23 or greater
* The mod_rewrite Apache module
PHP, MySQL, Apache가 필요하다는 것을 알 수 있다. 설치해 보도록 하자. MySQL 설치 가이드 (In Windows XP) 먼저 MySQL 5.0 설치 방법에 대해서 설명한다. 아래 대로 따라한다면 무리없이 설치될 것이다. MySQL에서 Without Installer 바이너리를 다운로드 받는다.
Download URL :
http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-noinstall-5.0.19-win32.zip/from/http://mysql.new21.com/
다운로드 받은 파일을 압축 해제하여 특정 폴더(D:\Platform\MySQL)에 넣어 놓는다. 이제 콘솔창을 띄워서 작업해 보자. Window+R을 눌러 나타난 실행창에 cmd.exe라고 입력하고 Enter키를 쳐보자. 콘솔창이 나타난다. MySQL을 압축 해제한 곳의 bin 폴더(D:\Platform\MySQL\bin)로 이동한다. 이곳에서 MySQL 서버를 NT 서비스로 등록할 것이다. 그전에 우선 my.ini라는 설정 파일을 생성하여야 한다. my.ini라는 파일을 만들고 다음과 같은 내용을 적어준다. 설치 폴더 위치는 각자 원하는 곳으로 설정하면 된다.
[mysqld] # set basedir to your installation path basedir=D:PlatformMySQL # set datadir to the location of your data directory datadir=D:PlatformMySQLdata
생성된 파일을 C:\WINDOWS에 넣어준다. 이전에 실행한 콘솔창으로 돌아가서 다음과 같은 순서대로 NT 서비스로 등록한 후 서비스를 시작해보자.
D:PlatformMySQLbin>mysqld-max-nt --install Service successfully installed. D:PlatformMySQLbin>net start mysql The MySQL service was started successfully.
설치가 끝났다. 왜 mysqld-max-nt 인가? 다음 표를 추가하니 알아서 해석해주고, 제일 좋은것 같은 것을 이용하자.
| Binary | Description |
|---|---|
| mysqld-debug | Compiled with full debugging and automatic memory allocation checking, as well as InnoDB and BDB tables. |
| mysqld | Optimized binary with InnoDB support. |
| mysqld-nt | Optimized binary for Windows NT, 2000, and XP with support for named pipes. |
| mysqld-max | Optimized binary with support for InnoDB and BDB tables. |
| mysqld-max-nt | Like mysqld-max, but compiled with support for named pipes. |
이제 WordPress를 위한 Database를 생성한다. (사용자 생성 등의 잡다한 내용은 필요 없을것 같아서 생략하고 root 계정을 이용하기로 한다.)
D:PlatformMySQLbin>mysql --user=root --password
Enter password: # 초기 암호는 없다.
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 6 to server version: 5.0.19-nt-maxType 'help;'
or 'h' for help. Type 'c' to clear the buffer.
mysql> SET PASSWORD = PASSWORD('***'); # *** 부분은 원하는 암호로 설정하자.
Query OK, 0 rows affected (0.00 sec)
mysql> CREATE DATABASE wordpress;
Query OK, 1 row affected (0.05 sec)
mysql> exit
Bye
이제 MySQL 설치는 모두 끝났다. 자세한 내용이나 추가적인 내용을 알고 싶다면 MySQL 설치 폴더의 Docs에 있는 manual.chm을 활용하자. Apache 설치 가이드 (In Windows XP) Apache HTTPD 사이트에서 Apache 2.0.55 No SSL을 다운로드 받아 설치한다. 특정 설정은 이후에 설명하기로 한다. PHP 설치 가이드 (In Windows XP) PHP 사이트에서 PHP 5.1.2 Zip Package를 다운로드 받아 특정 폴더(D:\Platform\PHP)에 압축 해제한다. 해제한 폴더에서 php.ini-dist 파일을 php.ini로 복사하여 내용을 수정한다. 수정할 부분은 다음과 같다.
extension_dir="D:PlatformPHPext" # 설치한 위치로 변경 extension=php_mysql.dll # 앞의 ";" 주석을 제거
설치 문서에 따라서 설치해 보자. 설치 문서에서 I. 시작하기 -> 3. 설치 -> 서버-아파치 2.0 -> 윈도우즈에서 PHP와 아파치 2.0
을 참고한다. PHP 5 버전이기 때문에 다음과 같은 내용은 Apache 설치 폴더의 conf 아래에 있는 httpd.conf 파일의 마지막에 추가해 준다. CGI 혹은 모듈 방식중 원하는 것으로 설정하자.
# 모듈 방식 LoadModule php5_module "D:/Platform/PHP/php5apache2.dll" AddType application/x-httpd-php .php PHPIniDir "D:/Platform/PHP" # CGI 방식 ScriptAlias /php/ "D:/Platform/PHP/" AddType application/x-httpd-php .php Action application/x-httpd-php "/php/php-cgi.exe"
또 httpd.conf에서 다음과 같은 설정 부분을 찾아서 주석을 제거한다.
LoadModule rewrite_module modules/mod_rewrite.so
변경한 설정 파일을 내용을 적용하려면 Apache를 다시 시작해야 한다. (Apache 설치 후에 서비스에 등록되어 있을 것이다.)
D:PlatformApachebin>net stop apache2 The Apache2 service is stopping. The Apache2 service was stopped successfully. D:PlatformApachebin>net start apache2 The Apache2 service is starting. The Apache2 service was started successfully.
이제 WordPress를 설치한다. 이전에 다운받아 놓은 WordPress를 특정 폴더(D:\Platform\WordPress)에 압축 해제한다. 풀려진 파일중에 wp-config-sample.php 파일을 wp-config.php 파일로 복사한 후에 텍스트 에디터로 열어 MySQL 정보를 수정한다.
<?php
// ** MySQL settings ** //
define('DB_NAME', 'wordpress'); // The name of the database
define('DB_USER', 'root'); // Your MySQL username
define('DB_PASSWORD', '***'); // ...and password
define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value
// You can have multiple installations in one database if you give each a unique prefix
$table_prefix = 'wp_'; // Only numbers, letters, and underscores please!
// Change this to localize WordPress. A corresponding MO file for the
// chosen language must be installed to wp-includes/languages.
// For example, install de.mo to wp-includes/languages and set WPLANG to 'de'
// to enable German language support.
define ('WPLANG', '');
/* That's all, stop editing! Happy blogging. */
define('ABSPATH', dirname(__FILE__).'/');
require_once(ABSPATH.'wp-settings.php');
?>
Blog가 출판(Publish)될 폴더(D:\Platform\Blog)를 생성하고 Apache의 httpd.conf 파일을 열어 경로를 수정한다.
DocumentRoot "D:/Platform/WordPress"
Apache를 재기동하고 WordPress 설치 페이지에 접속한다. Welcome to WordPress installation. 마법사 페이지가 떳다. 이제는 웹에서 나머지 부분을 설정해 주면 된다. 웹에서의 설치 가이드는 Visual Tutorial on how to install WordPress를 참고하자.

No comments yet
Comments feed for this article