0
1

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.

お手軽Laravel環境構築(Virtualbox-Vagrant)(CentOS7+php7.2+mysql+apache)#1

Last updated at Posted at 2019-03-03

この記事ではCentOSを導入します。

(続き記事)お手軽Laravel環境構築#2

◆VirtualBoxとVagrantのインストール

VirtualBox 自分のPC上に仮想環境を作成できる
Vagrant VirtualBoxの操作を簡単にしてくれる・環境を配布できる・別の環境でも同じ設定で簡単に作れる

◆vagrantを利用していく

てきとうにそれ用のディレクトリを作成する

コマンドプロンプト
\MyVagrant>mkdir MyVagrant

今後いくつか作りたいときようにMyVagrant配下で

コマンドプロンプト
\MyVagrant>mkdir CentOS7

box OSのイメージ群・そのOSを元に色々設定した一つのパッケージ

vagrant init 実行したディレクトリをVagrant環境として初期化(設定ファイル作成)

box自動追加パターン

今回はvagrantFileを作るときに、box指定がある設定ファイルを使う。

コマンドプロンプト
\MyVagrant\CentOS7>vagrant init centos/7

(Vagrant 公式ドキュメント参照)
こうしておくことで、起動したときに自動でboxを追加してくれた。

共通

コマンドプロンプト
\MyVagrant\CentOS7>vagrant up
コマンドプロンプト
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.

こんな感じのエラーがでたら、box追加がうまくいってないっぽい。

vagrant up 最初の仮想環境を作成してくれる。

コマンドプロンプト
\MyVagrant\CentOS7>vagrant ssh

仮想環境にログイン完了

次は色々インストールして、いろいろ試してみたいです。

続き記事

お手軽Laravel環境構築#2

0
1
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
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?