SSブログ
WordPress ブログトップ

CentOS6.3(x64)にWordPress3.5.1をインストールしてみた [WordPress]


今回はCentOS6.3(x64)にWordPress3.5.1をインストールする方法を書きます。
CentOS6.3のインストールは省きます。
はじめにOSの環境設定をします。
hostsファイルにホスト名、FQDNを書いておきます。
[root@wordpress ~]# vi /etc/hosts
[root@wordpress ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain
192.168.0.35  wordpress wordpress.local.localdomain.com



WordPressには80ポートでアクセスするためファイアウォールで80ポートを許可します。
[assimane@wordpress ~]$ su -
パスワード:********

[root@wordpress ~]# cat /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

[root@wordpress ~]# cp -p /etc/sysconfig/iptables /etc/sysconfig/iptables.org
[root@wordpress ~]# vi /etc/sysconfig/iptables
[root@wordpress ~]# diff /etc/sysconfig/iptables.org /etc/sysconfig/iptables
10a11
> -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

[root@wordpress ~]# /etc/init.d/iptables restart
iptables: ファイアウォールルールを消去中:                  [  OK  ]
iptables: チェインをポリシー ACCEPT へ設定中filter         [  OK  ]
iptables: モジュールを取り外し中:                          [  OK  ]
iptables: ファイアウォールルールを適用中:                  [  OK  ]




SELINUを無効化します。
[root@wordpress ~]# getenforce
Enforcing
[root@wordpress ~]# cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

[root@wordpress ~]# vi /etc/sysconfig/selinux
[root@wordpress ~]# cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted



リブートします。
[root@wordpress ~]# sync
[root@wordpress ~]# reboot

[assimane@wordpress ~]$ su -
パスワード:********
[root@wordpress ~]# getenforce
Disabled



WordPressに必要なapache,MySQL,PHPをインストールします。
まず、apacheをインストールします。
[root@wordpress ~]# yum install httpd
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package httpd.x86_64 0:2.2.15-15.el6.centos.1 will be installed
--> Processing Dependency: httpd-tools = 2.2.15-15.el6.centos.1 for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: apr-util-ldap for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: /etc/mime.types for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Processing Dependency: libapr-1.so.0()(64bit) for package: httpd-2.2.15-15.el6.centos.1.x86_64
--> Running transaction check
---> Package apr.x86_64 0:1.3.9-5.el6_2 will be installed
---> Package apr-util.x86_64 0:1.3.9-3.el6_0.1 will be installed
---> Package apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1 will be installed
---> Package httpd-tools.x86_64 0:2.2.15-15.el6.centos.1 will be installed
---> Package mailcap.noarch 0:2.1.31-2.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================================================================
 Package                          Arch                      Version                                      Repository                  Size
==========================================================================================================================================
Installing:
 httpd                            x86_64                    2.2.15-15.el6.centos.1                       base                       813 k
Installing for dependencies:
 apr                              x86_64                    1.3.9-5.el6_2                                updates                    123 k
 apr-util                         x86_64                    1.3.9-3.el6_0.1                              base                        87 k
 apr-util-ldap                    x86_64                    1.3.9-3.el6_0.1                              base                        15 k
 httpd-tools                      x86_64                    2.2.15-15.el6.centos.1                       base                        70 k
 mailcap                          noarch                    2.1.31-2.el6                                 base                        27 k

Transaction Summary
==========================================================================================================================================
Install       6 Package(s)

Total download size: 1.1 M
Installed size: 3.6 M
Is this ok [y/N]: y
Downloading Packages:
(1/6): apr-1.3.9-5.el6_2.x86_64.rpm                                                                                | 123 kB     00:00
(2/6): apr-util-1.3.9-3.el6_0.1.x86_64.rpm                                                                         |  87 kB     00:00
(3/6): apr-util-ldap-1.3.9-3.el6_0.1.x86_64.rpm                                                                    |  15 kB     00:00
(4/6): httpd-2.2.15-15.el6.centos.1.x86_64.rpm                                                                     | 813 kB     00:00
(5/6): httpd-tools-2.2.15-15.el6.centos.1.x86_64.rpm                                                               |  70 kB     00:00
(6/6): mailcap-2.1.31-2.el6.noarch.rpm                                                                             |  27 kB     00:00
------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                     2.3 MB/s | 1.1 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : apr-1.3.9-5.el6_2.x86_64                                                                                               1/6
  Installing : apr-util-1.3.9-3.el6_0.1.x86_64                                                                                        2/6
  Installing : apr-util-ldap-1.3.9-3.el6_0.1.x86_64                                                                                   3/6
  Installing : httpd-tools-2.2.15-15.el6.centos.1.x86_64                                                                              4/6
  Installing : mailcap-2.1.31-2.el6.noarch                                                                                            5/6
  Installing : httpd-2.2.15-15.el6.centos.1.x86_64                                                                                    6/6
  Verifying  : httpd-2.2.15-15.el6.centos.1.x86_64                                                                                    1/6
  Verifying  : apr-util-ldap-1.3.9-3.el6_0.1.x86_64                                                                                   2/6
  Verifying  : apr-1.3.9-5.el6_2.x86_64                                                                                               3/6
  Verifying  : httpd-tools-2.2.15-15.el6.centos.1.x86_64                                                                              4/6
  Verifying  : mailcap-2.1.31-2.el6.noarch                                                                                            5/6
  Verifying  : apr-util-1.3.9-3.el6_0.1.x86_64                                                                                        6/6

Installed:
  httpd.x86_64 0:2.2.15-15.el6.centos.1

Dependency Installed:
  apr.x86_64 0:1.3.9-5.el6_2                        apr-util.x86_64 0:1.3.9-3.el6_0.1       apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1
  httpd-tools.x86_64 0:2.2.15-15.el6.centos.1       mailcap.noarch 0:2.1.31-2.el6

Complete!




MySQLをインストールします。
[root@wordpress ~]# yum install mysql mysql-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package mysql.x86_64 0:5.1.67-1.el6_3 will be installed
---> Package mysql-server.x86_64 0:5.1.67-1.el6_3 will be installed
--> Processing Dependency: perl-DBI for package: mysql-server-5.1.67-1.el6_3.x86_64
--> Processing Dependency: perl-DBD-MySQL for package: mysql-server-5.1.67-1.el6_3.x86_64
--> Processing Dependency: perl(DBI) for package: mysql-server-5.1.67-1.el6_3.x86_64
--> Running transaction check
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
---> Package perl-DBI.x86_64 0:1.609-4.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================================================================
 Package                             Arch                        Version                               Repository                    Size
==========================================================================================================================================
Installing:
 mysql                               x86_64                      5.1.67-1.el6_3                        updates                      886 k
 mysql-server                        x86_64                      5.1.67-1.el6_3                        updates                      8.6 M
Installing for dependencies:
 perl-DBD-MySQL                      x86_64                      4.013-3.el6                           base                         134 k
 perl-DBI                            x86_64                      1.609-4.el6                           base                         705 k

Transaction Summary
==========================================================================================================================================
Install       4 Package(s)

Total download size: 10 M
Installed size: 29 M
Is this ok [y/N]: y
Downloading Packages:
(1/4): mysql-5.1.67-1.el6_3.x86_64.rpm                                                                             | 886 kB     00:01
(2/4): mysql-server-5.1.67-1.el6_3.x86_64.rpm                                                                      | 8.6 MB     00:03
(3/4): perl-DBD-MySQL-4.013-3.el6.x86_64.rpm                                                                       | 134 kB     00:00
(4/4): perl-DBI-1.609-4.el6.x86_64.rpm                                                                             | 705 kB     00:00
------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                     2.1 MB/s |  10 MB     00:04
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : perl-DBI-1.609-4.el6.x86_64                                                                                            1/4
  Installing : perl-DBD-MySQL-4.013-3.el6.x86_64                                                                                      2/4
  Installing : mysql-5.1.67-1.el6_3.x86_64                                                                                            3/4
  Installing : mysql-server-5.1.67-1.el6_3.x86_64                                                                                     4/4
  Verifying  : perl-DBD-MySQL-4.013-3.el6.x86_64                                                                                      1/4
  Verifying  : mysql-5.1.67-1.el6_3.x86_64                                                                                            2/4
  Verifying  : mysql-server-5.1.67-1.el6_3.x86_64                                                                                     3/4
  Verifying  : perl-DBI-1.609-4.el6.x86_64                                                                                            4/4

Installed:
  mysql.x86_64 0:5.1.67-1.el6_3                                    mysql-server.x86_64 0:5.1.67-1.el6_3

Dependency Installed:
  perl-DBD-MySQL.x86_64 0:4.013-3.el6                                    perl-DBI.x86_64 0:1.609-4.el6

Complete!




PHPをインストールします。
[root@wordpress ~]# yum install php-mysql php-common php php-cgi php-gd php-mbstring
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: ftp.iij.ad.jp
 * extras: ftp.iij.ad.jp
 * updates: ftp.iij.ad.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.3.3-14.el6_3 will be installed
---> Package php-cli.x86_64 0:5.3.3-14.el6_3 will be installed
---> Package php-common.x86_64 0:5.3.3-14.el6_3 will be installed
---> Package php-gd.x86_64 0:5.3.3-14.el6_3 will be installed
--> Processing Dependency: libXpm.so.4()(64bit) for package: php-gd-5.3.3-14.el6_3.x86_64
---> Package php-mbstring.x86_64 0:5.3.3-14.el6_3 will be installed
---> Package php-mysql.x86_64 0:5.3.3-14.el6_3 will be installed
--> Processing Dependency: php-pdo for package: php-mysql-5.3.3-14.el6_3.x86_64
--> Running transaction check
---> Package libXpm.x86_64 0:3.5.8-2.el6 will be installed
---> Package php-pdo.x86_64 0:5.3.3-14.el6_3 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================================================================
 Package                            Arch                         Version                              Repository                     Size
==========================================================================================================================================
Installing:
 php                                x86_64                       5.3.3-14.el6_3                       updates                       1.1 M
 php-cli                            x86_64                       5.3.3-14.el6_3                       updates                       2.2 M
 php-common                         x86_64                       5.3.3-14.el6_3                       updates                       523 k
 php-gd                             x86_64                       5.3.3-14.el6_3                       updates                       104 k
 php-mbstring                       x86_64                       5.3.3-14.el6_3                       updates                       453 k
 php-mysql                          x86_64                       5.3.3-14.el6_3                       updates                        79 k
Installing for dependencies:
 libXpm                             x86_64                       3.5.8-2.el6                          base                           59 k
 php-pdo                            x86_64                       5.3.3-14.el6_3                       updates                        73 k

Transaction Summary
==========================================================================================================================================
Install       8 Package(s)

Total download size: 4.6 M
Installed size: 16 M
Is this ok [y/N]: y
Downloading Packages:
(1/8): libXpm-3.5.8-2.el6.x86_64.rpm                                                                               |  59 kB     00:00
(2/8): php-5.3.3-14.el6_3.x86_64.rpm                                                                               | 1.1 MB     00:00
(3/8): php-cli-5.3.3-14.el6_3.x86_64.rpm                                                                           | 2.2 MB     00:00
(4/8): php-common-5.3.3-14.el6_3.x86_64.rpm                                                                        | 523 kB     00:00
(5/8): php-gd-5.3.3-14.el6_3.x86_64.rpm                                                                            | 104 kB     00:00
(6/8): php-mbstring-5.3.3-14.el6_3.x86_64.rpm                                                                      | 453 kB     00:00
(7/8): php-mysql-5.3.3-14.el6_3.x86_64.rpm                                                                         |  79 kB     00:00
(8/8): php-pdo-5.3.3-14.el6_3.x86_64.rpm                                                                           |  73 kB     00:00
------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                     3.1 MB/s | 4.6 MB     00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : php-common-5.3.3-14.el6_3.x86_64                                                                                       1/8
  Installing : php-pdo-5.3.3-14.el6_3.x86_64                                                                                          2/8
  Installing : php-cli-5.3.3-14.el6_3.x86_64                                                                                          3/8
  Installing : libXpm-3.5.8-2.el6.x86_64                                                                                              4/8
  Installing : php-gd-5.3.3-14.el6_3.x86_64                                                                                           5/8
  Installing : php-5.3.3-14.el6_3.x86_64                                                                                              6/8
  Installing : php-mysql-5.3.3-14.el6_3.x86_64                                                                                        7/8
  Installing : php-mbstring-5.3.3-14.el6_3.x86_64                                                                                     8/8
  Verifying  : php-common-5.3.3-14.el6_3.x86_64                                                                                       1/8
  Verifying  : php-mysql-5.3.3-14.el6_3.x86_64                                                                                        2/8
  Verifying  : php-pdo-5.3.3-14.el6_3.x86_64                                                                                          3/8
  Verifying  : php-5.3.3-14.el6_3.x86_64                                                                                              4/8
  Verifying  : php-gd-5.3.3-14.el6_3.x86_64                                                                                           5/8
  Verifying  : php-cli-5.3.3-14.el6_3.x86_64                                                                                          6/8
  Verifying  : libXpm-3.5.8-2.el6.x86_64                                                                                              7/8
  Verifying  : php-mbstring-5.3.3-14.el6_3.x86_64                                                                                     8/8

Installed:
  php.x86_64 0:5.3.3-14.el6_3               php-cli.x86_64 0:5.3.3-14.el6_3                 php-common.x86_64 0:5.3.3-14.el6_3
  php-gd.x86_64 0:5.3.3-14.el6_3            php-mbstring.x86_64 0:5.3.3-14.el6_3            php-mysql.x86_64 0:5.3.3-14.el6_3

Dependency Installed:
  libXpm.x86_64 0:3.5.8-2.el6                                       php-pdo.x86_64 0:5.3.3-14.el6_3

Complete!




PHPのバージョン確認をします。
[root@wordpress ~]# php --version
PHP 5.3.3 (cli) (built: Jul  3 2012 16:53:21)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies



MySQLのバージョン確認をします。
[root@wordpress ~]# mysql --version
mysql  Ver 14.14 Distrib 5.1.67, for redhat-linux-gnu (x86_64) using readline 5.1




MySQLを起動します。
[root@wordpress ~]# /etc/init.d/mysqld start
MySQL データベースを初期化中:  Installing MySQL system tables...
OK
Filling help tables...
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 wordpress.local.localdomain.com 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 /usr/mysql-test ; perl mysql-test-run.pl

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

                                                           [  OK  ]
mysqld を起動中:                                           [  OK  ]




MySQLの初期データの設定を行います。
[root@wordpress ~]# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):Enterキーのみ
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

Set root password? [Y/n] Y
New password:********
Re-enter new password:********
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] Y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] Y
 ... Success!

By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] Y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] Y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!




rootのパスワードとユーザーの作成を行います。
(○○○○にはパスワードを入力します。)
[root@wordpress ~]# mysql -uroot -p
Enter password:********
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 5.1.67 Source distribution

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database wordpress;
Query OK, 1 row affected (0.01 sec)

mysql> grant all privileges on wordpress.* to wordpress@localhost identified by '○○○○';
Query OK, 0 rows affected (0.01 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye




apacheの設定をします。
[root@wordpress ~]# cp -p /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.org
[root@wordpress ~]# vi /etc/httpd/conf/httpd.conf
[root@wordpress ~]# diff /etc/httpd/conf/httpd.conf.org /etc/httpd/conf/httpd.conf
276c276
< #ServerName www.example.com:80
---
> ServerName wordpress.local.localdomain.com:80




PHPの確認用ファイルを作成します。
[root@wordpress ~]# cd /var/www/html
[root@wordpress html]# echo ' <?php echo phpinfo(); ?>' > index.php



apacheを起動します。
[root@wordpress html]# /etc/init.d/httpd start
httpd を起動中:                                            [  OK  ]


http://ホスト名/index.phpにアクセスして、情報が正しく表示されることを確認します。

WordPressをインストールします。
[root@wordpress html]# cd
[root@wordpress ~]# wget http://ja.wordpress.org/wordpress-3.5.1-ja.zip
--2013-03-03 11:13:41--  http://ja.wordpress.org/wordpress-3.5.1-ja.zip
ja.wordpress.org をDNSに問いあわせています... 72.233.56.138, 72.233.56.139
ja.wordpress.org|72.233.56.138|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 6636356 (6.3M) [application/octet-stream]
`wordpress-3.5.1-ja.zip' に保存中

100%[================================================================================================>] 6,636,356   1.92M/s 時間 3.4s

2013-03-03 11:13:45 (1.83 MB/s) - `wordpress-3.5.1-ja.zip' へ保存完了 [6636356/6636356]

[root@wordpress ~]# ls
anaconda-ks.cfg  install.log  install.log.syslog  wordpress-3.5.1-ja.zip
[root@wordpress ~]# mv wordpress-3.5.1-ja.zip /var/www/html/.
[root@wordpress ~]# cd /var/www/html/
[root@wordpress html]# unzip wordpress-3.5.1-ja.zip
Archive:  wordpress-3.5.1-ja.zip
   creating: wordpress/
  inflating: wordpress/wp-trackback.php
  inflating: wordpress/wp-blog-header.php
(省略)
  inflating: wordpress/wp-content/languages/admin-network-ja.mo
  inflating: wordpress/wp-content/languages/continents-cities-ja.mo
  inflating: wordpress/wp-content/languages/admin-network-ja.po
[root@wordpress html]# ls
index.php  wordpress  wordpress-3.5.1-ja.zip




WordPressの設定を行います。
(○○○○にはパスワードを入力します。)
[root@wordpress html]# cd wordpress
[root@wordpress wordpress]# cp wp-config-sample.php wp-config.php
[root@wordpress wordpress]# vi wp-config.php
[root@wordpress wordpress]# diff wp-config-sample.php wp-config.php
24c24
< define('DB_NAME', 'database_name_here');
---
> define('DB_NAME', 'wordpress');
27c27
< define('DB_USER', 'username_here');
---
> define('DB_USER', 'wordpress');
30c30
< define('DB_PASSWORD', 'password_here');
---
> define('DB_PASSWORD', '○○○○');



WordPressのディレクトリ配下をapacheユーザーで書き込みできるように変更します。
[root@wordpress wordpress]# chown -R apache:apache /var/www/html/wordpress
[root@wordpress wordpress]# vi /etc/httpd/conf.d/wordpress.conf
[root@wordpress wordpress]# cat /etc/httpd/conf.d/wordpress.conf
<Directory /var/www/html/wordpress>
  AllowOverride All
</Directory>
[root@wordpress wordpress]# /etc/init.d/httpd stop
httpd を停止中:                                            [  OK  ]
[root@wordpress wordpress]# /etc/init.d/httpd start
httpd を起動中:                                            [  OK  ]




これでインストールは完了です。
ブラウザでinstall.phpにアクセスします。
http://ホスト名/wordpress/wp-admin/install.php
wp01.png

タイトルやパスワード、メールアドレスを入力して、WordPressをインストールをクリックします。
wp02.png

成功を確認して、ログインをクリックします。
wp03.png

adminでログインします。
wp04.png

正常にログインできると、ダッシュボードが開きます。
あとはユーザーを作成したり、設定をするだけです。
wp05.png

最後に自動起動をonにします。
[root@wordpress wordpress]# chkconfig --list httpd
httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
[root@wordpress wordpress]# chkconfig httpd on
[root@wordpress wordpress]# chkconfig --list httpd
httpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@wordpress wordpress]# chkconfig --list mysqld
mysqld          0:off   1:off   2:off   3:off   4:off   5:off   6:off
[root@wordpress wordpress]# chkconfig  mysqld on
[root@wordpress wordpress]# chkconfig --list mysqld
mysqld          0:off   1:off   2:on    3:on    4:on    5:on    6:off



次回もお楽しみに!!

WordPress ブログトップ

この広告は前回の更新から一定期間経過したブログに表示されています。更新すると自動で解除されます。