■wordpressインストール
Linuxでブログのページが簡単に作れるソフトです。
wordpress
こちらのサイトを参考に作業しました。
・CentOSで自宅サーバ構築 ブログサイト構築(WordPress)
http://centossrv.com/wordpress.shtml
以下、作業ログです。
[bobchan@bobchan ~]$ su -
Password:
[root@bobchan ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 197832
Server version: 5.0.77 Source distribution
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> create database wordpress;
Query OK, 1 row affected (0.07 sec)
mysql> grant all privileges on wordpress.* to wordpress@localhost
identified by 'パスワード';
Query OK, 0 rows affected (0.08 sec)
mysql> exit
Bye
[root@bobchan ~]# wget http://ja.wordpress.org/wordpress-3.3.1-ja.zip
--2012-01-26 14:18:01-- http://ja.wordpress.org/wordpress-3.3.1-ja.zip
Resolving ja.wordpress.org... 72.233.56.139, 72.233.56.138
Connecting to ja.wordpress.org|72.233.56.139|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4696550 (4.5M) [application/octet-stream]
Saving to: `wordpress-3.3.1-ja.zip'
100%[============================================================================================================>] 4,696,550 406K/s in 10s
2012-01-26 14:18:12 (450 KB/s) - `wordpress-3.3.1-ja.zip' saved [4696550/4696550]
[root@bobchan ~]# unzip wordpress-3.3.1-ja.zip
Archive: wordpress-3.3.1-ja.zip
creating: wordpress/
inflating: wordpress/xmlrpc.php
inflating: wordpress/wp-cron.php
inflating: wordpress/readme.html
inflating: wordpress/wp-activate.php
:
[root@bobchan ~]# mv wordpress /var/www/.
[root@bobchan ~]# chown -R apache:apache /var/www/wordpress/
[root@bobchan ~]# cd /var/www/wordpress
[root@bobchan wordpress]# ls
index.php readme.html wp-app.php wp-config-sample.php wp-includes wp-login.php wp-register.php wp-trackback.php
license.txt wp-activate.php wp-blog-header.php wp-content wp-links-opml.php wp-mail.php wp-settings.php xmlrpc.php
readme-ja.html wp-admin wp-comments-post.php wp-cron.php wp-load.php wp-pass.php wp-signup.php
[root@bobchan wordpress]# cp /var/www/wordpress/wp-config-sample.php /var/www/wordpress/wp-config.php
[root@bobchan wordpress]# vi /var/www/wordpress/wp-config.php
"/var/www/wordpress/wp-config.php" [dos] 93L, 4289C<?php
/**
* The base configurations of the WordPress.
*
* 縷A~S縷Aョ縷C~U縷B。縷B、縷Cォ縷Aッ縷@~AMySQL縷@~A縷C~F縷Cシ縷C~V縷Cォ諧N・驂 ュ霎~^縷@~A遘~X蟇~F驃Mオ縷@~A險~@隱~^縷@~AABSPATH 縷Aョ險ュ螳~Z縷B~R蛬Pォ縷Aソ縷Aセ聽~A~Y縷@~B
* 縷B~H縷B~J詳縷A~W縷A~D諧C~E蛞 ア縷Aッ {@link
http://wpdocs.sourceforge.jp/wp-config.php_%E3%81%AE%E7%B7%A8%E9%9B%86
* wp-config.php 縷Aョ邱ィ驃[~F} 縷B~R蛬O~B轜Eァ縷A~W縷Aヲ縷A~O縷A| 縷A~U縷A~D縷@~BMySQL 縷Aョ險ュ螳~Z諧C~E蛞 ア縷Aッ縷C~[縷Bケ縷C~F縷B」縷Cウ縷Bー蛬E~H縷B~H縷B~JJ蛬E・諧I~K縷Aァ縷A~M縷Aセ縷A~Y縷@~B
*
文字化けしてる…
[root@bobchan wordpress]# echo $LANG
C
[root@bobchan wordpress]# LANG=utf-8
[root@bobchan wordpress]# vi /var/www/wordpress/wp-config.php
変更箇所
/** WordPress のためのデータベース名 */
define('DB_NAME', 'wordpress');
/** MySQL データベースのユーザー名 */
define('DB_USER', 'wordpress');
/** MySQL データベースのパスワード */
define('DB_PASSWORD', 'パスワード');
これでブラウザでアクセスすればいいはず
キャプチャをとるのを忘れたのですが、phpのバージョンアップが必要というメッセージが表示されました。
なので、phpのバージョンアップ
[root@bobchan wordpress]# yum -y install php
Failed to set locale, defaulting to C
Loaded plugins: downloadonly, fastestmirror, priorities, versionlock
Loading mirror speeds from cached hostfile
* base: www.ftp.ne.jp
* epel: ftp.iij.ad.jp
* extras: www.ftp.ne.jp
* rpmforge: apt.sw.be
* updates: www.ftp.ne.jp
301 packages excluded due to repository priority protections
Reading version lock configuration
Setting up Install Process
Package php-5.1.6-27.el5_7.4.i386 already installed and latest version
Nothing to do
ん?最新バージョンらしい…
調べるとCentOS5ではインストールのやり方が違うらしい。
以下を参考にしてphpのバージョンアップを実施。
・Cent OS 5.6にPHP 5.2.4を導入
http://www.starplatinum.jp/wordpress/install_php-5-2-4/
[root@bobchan wordpress]# rpm -qa | grep php
php-pdo-5.1.6-27.el5_7.4
php-mysql-5.1.6-27.el5_7.4
php-common-5.1.6-27.el5_7.4
php-cli-5.1.6-27.el5_7.4
php-5.1.6-27.el5_7.4
php-mbstring-5.1.6-27.el5_7.4
php-snmp-5.1.6-27.el5_7.4
php-gd-5.1.6-27.el5_7.4
一度phpを削除
[root@bobchan wordpress]# yum -y erase php
[root@bobchan wordpress]# yum -y erase php-common
phpインストール
[root@bobchan wordpress]# yum -y install php53
[root@bobchan wordpress]# yum -y install php53-devel
[root@bobchan wordpress]# yum -y install php53-mysql
[root@bobchan wordpress]# yum -y install php53-ldap
[root@bobchan wordpress]# yum -y install php53-mbstring
念のため、httpdをリロード
[root@bobchan wordpress]# service httpd reload
Reloading httpd: [ OK ]
こんなかんじで表示されました。