OCNメール&ウェブPro2 WordPressをインストールするの巻!

スポンサーリンク

1. MySQLサーバのインストールとデータベースの作成

まずはMySQLサーバのインストールを行ないます。作業にはSSHでの接続が必要となります
SSH接続を行なったことが無い方は各種マニュアルまたはサポート窓口まで問合せ「SSH接続方法」の
案内を受けてください。

案内する手順はアドミンユーザIDでSSH接続したのち、rootに切り替わっての作業となります。

1. アドミンユーザID(c******)でSSH接続を行い、「su –」コマンドを実行しrootに切り替わります。

[c*******@hostname ~]$ su -
Password:  パスワード入力(不可視)
[root@hostname ~]#

 

2. MySQLサーバをインストールします。

既にMySQLサーバをインストール済みの場合はインストール作業を飛ばし次へ。

[root@hostname ~]# vinstall mysql

installing mysql

Checking for conflicting packages
Installing MySQL 5.1.55.   Please wait....
Checking to see if DB is created
Setting mysqld to start every time.
and starting mysqld now.
Enter the new MySQL root password: パスワード入力(不可視)
Enter the new MySQL root password (again): パスワード入力(不可視)
Installation of MySQL 5.1.55 succeeded.

vinstall done

上記設定したMySQLのrootパスワードは忘れずに。忘れてしまってもサーバ上のroot権限が有れば変更は可能ですが、面倒ですのでメモしておきましょう。

インストールが完了し、起動しているか念のために確認します。

[root@hostname ~]#ps auxww | grep mysql | grep -v grep
root     11729  0.0  0.1  2356 1132 pts/1    S    12:32   0:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --basedir=/usr --user=mysql
mysql    11828  0.0  0.7 29272 6004 pts/1    Sl   12:32   0:00 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock
[root@hostname ~]#

 

3. MySQLサーバに接続し、WordPressのブログ情報を管理するデータベースを作成します。

以下の条件で作成しておりますので、状況に合わせ変更してください。

データベース名:    wp
データベースユーザ: wp_user
パスワード:       Passw0rddayo!

[root@hostname ~]# mysql -u root -p
Enter password: パスワード入力(不可視)
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 3
Server version: 5.1.55 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql> create database wp;Query OK, 1 row affected (0.00 sec)

mysql> grant all on wp.* to wp_user@localhost identified by 'Passw0rddayo!';Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye
[root@hostname ~]#

 

4. 作成したユーザとパスワードで希望のデータベースにアクセスできることを確認します。

mysql>」の表示が確認できれば問題ありません。

[root@hostname ~]#mysql -u wp_user -p
Enter password: パスワード入力(不可視)
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 8
Server version: 5.1.55 Source distribution

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL v2 license
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql>exitBye
[root@hostname ~]#

 

以上でMySQLデータベースの作成とユーザの作成が完了しました。

次は、「2. PHP5のインストールと設定の変更」です。
引き続きSSHでの作業となりますので、このまま続けてみましょう。

コメント

  1. ノッチ より:

    この記事のおかげで本当に助かりました。ありがとうございました。

  2. ハクシュ より:

    こちらの記事のおかげで、丸1日格闘してたことが1時間でクリアできました!
    感謝です。
    OCNはこちらの記事を紹介するべきだよ、本当…。

タイトルとURLをコピーしました