LoginSignup
0
0

More than 5 years have passed since last update.

[初めての]Wordpressのインストール メモ

Posted at

色々な所にインストール方法は載っているけど自分の勉強用にWordpressのインストール方法をメモ

前提

ApacheとPHPとMySQLがインストールされてなければインストールする。インストールされてあればDB作成から。

ApacheとPHPとMySQLのインストール

Apacheのインストール

  • 以前インストールしてたので割愛・・・^^;

PHPのインストール

$ yum -y install php php-mbstring php-pear php-mysql
  • PHPの設定変更
    • short_open_tagをOffからOnにする。
    • そのほかも必要であれば。
$ vi /etc/php.ini
short_open_tag = On に変更

MySQLのインストール

$ yum install mysql*

MySQLを起動

$ service mysqld start

または

$ /etc/init.d/mysqld start

起動時にMySQLを自動起動するように設定

$ chkconfig mysqld on

MySQL初期設定

$ mysql_secure_installation

パスワードなどを設定。(以下が表示されている所で各入力)

Enter current password for root (enter for none): 空ENTER
Set root password? [Y/n]:空ENTER
New password:パスワードを入力
Re-enter new password:パスワードを再入力

Remove anonymous users? [Y/n]:空ENTER
Disallow root login remotely? [Y/n]:空ENTER
Remove test database and access to it? [Y/n]:空ENTER
Reload privilege tables now? [Y/n]:空ENTER

Wordpressインストール

MySQLにWordpress用DBを作成

  • MySQLに接続
$ mysql -u root -p
  • DB名をwordpressに(任意な名前)
$ create database wordpress;
  • データベースを操作するユーザーを作成
    • wpuserがユーザ
    • passwordがパスワード
$ grant all on wordpress.* to 'wpuser'@'localhost' identified by 'password';

MySQL終了

$ quit;

Wordpressをダウンロード

$ cd /var/www/html
$ wget https://ja.wordpress.org/latest-ja.tar.gz
  • 解凍
$ tar zxvf latest-ja.tar.gz
  • 配置したい場所へ移動して権限変更
* mv wordpress /var/www/html/wordpress
* chown -R apache.apache /var/www/html/wordpress

Wordpress設定ファイル

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0