7
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Drupal をVagrantで動かしてみる。

Posted at

最近人気になってきたDrupalがどんなものか使ってみたくて、仮想環境に設定をしてみる。

環境

OS : Mac OS X
VirtualBox + Vagrant

設定

以下のサイトからvagrantのファイルを一式ダウンロードする。
https://www.drupal.org/project/vdd

ダウンロードしたzipファイルを展開し、展開したファイルの中へ移動する。

cd droup_dir

何も考えずに以下のコマンドを打つ

vagrant up

hostsの編集

sudo vi /etc/hosts
# 下記を追加
192.168.44.44 drupal8.dev
192.168.44.44 www.drupal8.dev
192.168.44.44 drupal7.dev
192.168.44.44 www.drupal7.dev

全て終了したら192.168.44.44 にアクセスしてアパッチの画面が表示されることを確認。

仮想サーバにアクセス

vagrant ssh

最新のファイルを取得

cd sites/drupal8/
git clone --branch 8.0.x git://git.drupal.org/project/drupal.git .
# httpではなくgitを使っていることに注意

mysql の設定

mysql -u root

> create database drupal_db;
> grant all privileges on drupal_db.* to 'drupal'@'localhost' identified by '1234';

以上、作業が終わったら、ブラウザで「www.drupal8.dev」にアクセスする。
あとは、インストールガイドにそってインストール作業を行う。

7
8
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
7
8

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?