せっかくドメインもとったのでWordpressをインストールしてみた

WordPressのソースをダウンロード

$ wget http://ja.wordpress.org/wordpress-2.9.2-ja.tar.gz

解凍して公開ようのフォルダにうつす

$ tar zxvf wordpress-2.9.2-ja.tar.gz
$ mkdir -p /home/www/blog.eumayng.net
$ mv wordpress /hoem/www/blog.eumyang.net/html

apacheのバーチャルホストを設定

$ sudo vi /etc/httpd/conf.d/blog.eumyang.net.conf

DocumentRoot /home/www/blog.eumyang.net/html
ServerName blog.eumyang.net
CustomLog logs/blog_access_log combined
ErrorLog logs/blog_error_log

Apacheを再起動

Mysqlがはいってなかったのでインストール

$ sudo yum install mysql mysql-server php-mysql

設定ファイルの修正

# vi /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
default-character-set = utf8 ← 追加(MySQLサーバーの文字コードをUTF-8にする)

以下を追加(MySQLクライアントの文字コードをUTF-8にする)
[mysql]
default-character-set = utf8

Mysqlを起動 初回はDBのインストールが行われる

# /etc/init.d/mysqld start
Initializing MySQL database: Installing MySQL system tables…
100306 19:59:59 [Warning] option ‘max_join_size’: unsigned value 18446744073709551615 adjusted to 4294967295
100306 19:59:59 [Warning] option ‘max_join_size’: unsigned value 18446744073709551615 adjusted to 4294967295
OK
Filling help tables…
100306 20:00:00 [Warning] option ‘max_join_size’: unsigned value 18446744073709551615 adjusted to 4294967295
100306 20:00:00 [Warning] option ‘max_join_size’: unsigned value 18446744073709551615 adjusted to 4294967295
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mysqladmin -u root password ‘new-password’
/usr/bin/mysqladmin -u root -h eumyang.net password ‘new-password’

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

The latest information about MySQL is available on the web at
http://www.mysql.com
Support MySQL by buying support/licenses at http://shop.mysql.com
[ OK ]
Starting MySQL: [ OK ]

自動起動を設定しておく

# chkconfig –list mysql
error reading information on service mysql: No such file or directory
[root@eumyang ~]# chkconfig –list mysqld
mysqld 0:off 1:off 2:off 3:off 4:off 5:off 6:off
# chkconfig –level 35 mysqld on
# chkconfig –list mysqld
mysqld 0:off 1:off 2:off 3:on 4:off 5:on 6:off

mysqlのルートアカウントにパスワードを設定

$ mysqladmin -u root password ‘パスワード’

wordpress用のDBとアカウントを作成

$ create database wordpressdb;
grant all on wordpressdb.* to ‘wordpress’@’localhost’ identified by ‘ぱすわーど;

WordPress用のURLにアクセスして初回インストール