WordPress 설치기

 한국에선 사이트관리도구로 XE(구. 제로보드)가 많이 사용되고 있지만, 세계적으로 볼 땐 WordPress가 많이 사용되고 있다. 물론, 한국형 게시판 스타일은 제로보드가 적합하지만 각종 플러그인등의 지원은 워드프레스가 압도적으로 많다. 이번에 서울시 홈페이지가 워드프레스 기반으로 만들어져 한국에서도 그 입지를 넓히고 있다. WordPress를 서버에 설치하는 과정을 알아보자.
http://wordpress.org/

WordPress 최신 설치 파일을 받아서 /var/www/wp.withover.com에 압축을 푼다.
$ cd /var/www
$ wget http://ko.wordpress.org/wordpress-3.2.1-ko_KR.tar.gz
$ tar xvfz wordpress-3.2.1-ko_KR.tar.gz
$ mv wordpress wp.withover.com
 자신이 사용하는 도메인이 있다면 DNS에 등록한다. 필자는 DNS Ever(www.dnsever.com)에 wp.withover.com 등록하여 사용하고 있다.
http://www.dnsever.com 에 접속하여 wp.withover.com 을 등록한다.

withover.com의 하위 도메인인 wp.withover.com을 사용하기 위하여 아파치서버 가상호스트를 등록한다.
$ sudo vi /etc/apache2/sites-available/default
...
# wp.withover.com wordpress
<VirtualHost *:80>
    ServerAdmin withover@gmail.com
    DocumentRoot /var/www/wp.withover.com
    ServerName wp.withover.com

    <Directory /var/www/wp.withover.com>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/wp.withover.com_error.log
    LogLevel warn
    CustomLog ${APACHE_LOG_DIR}/wp.withover.com_access.log combined
</VirtualHost>

아파치 서버를 재시작 한다.
$ sudo service apache2 restart
WordPress를 설치하기 위한 기본적인 서버 세팅은 끝이 났다.
웹브라우져에서 가상호스트로 설정한 http://wp.withover.com 으로 접속을 하면 아래와 같은 메시지가 뜰 것이다.
There doesn't seem to be a wp-config.php file. I need this before we can get started.

Need more help? We got it.

You can create a wp-config.php file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.

Create a Configuration File
 Create a Configuration File을 눌러서 WP설치를 본격적으로 시작한다. 설치가 시작되면 다음과 같은 사항이 필요하다.
Database name
Database username
Database password
Database host
Table prefix (if you want to run more than one WordPress in a single database)
다시 터미널로 돌아가서 wordpress라는 이름의 DB를 생성한다.
$   mysql -uroot -p (root가 사용자ID라고 가정합니다.)
mysql> CREATE DATABASE wordpress;

그리고 다시 WordPress설치 페이지로 돌아와서 아래 그림과 같은 형태로 입력한다.
DB설정

DB와 관련된 내용을 알맞게 입력 하였다면, 다음 단계로 진행될 것이다. 만약, 파일 생성 권한이 적절하지 않다면 다음과 같은 오류가 나타날 수 있다.
Sorry, but I can't write the wp-config.php file.
You can create the wp-config.php manually and paste the following text into it.
이러면서 위 메시지 아래에 나온 내용을 "wp-config.php"에 넣으라는 메시지가 뜬다.
$ vi wp-config.php
vi를 이용해서 wp-config.php 파일을 직접 생성해줘도 상관없다. 아니면 WordPress가 설치된 폴더의 권한을 777로 변경한다.
$ chmod 777 /var/www/wp.withover.com
 설정파일이 정상적으로 생성이 되면 다음 단계가 진행된다.
설치화면
Install WordPress 버튼을 누르면 끝이다. 설치 과정이 매우 단순하다. 설치 단계에서 만들었던 관리자 계정으로 로그인을 한다.
관리자 화면
기본 페이지
 관리자 페이지가 영어로 생성되어 약간 어려움이 있지만, 전반적으로 깔끔한 느낌이다. 앞으로 조금씩 WordPress에 관해서 알아보자.

댓글 쓰기