Code Monkey home page Code Monkey logo

php5-nginx-vagrant-sample's Introduction

php5-nginx-vagrant-sample

English Readme

Vagrantを使ってPHPとMySQLが動作する環境を自動で設定します。OSなどに依存しないXAMPP/MAMPのようなものと考えてください。

OS Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)
PHP PHP 5.3.10-1ubuntu3.6 with Suhosin-Patch
Nginx 1.1.19
MySQL 5.5.31-0ubuntu0.12.04.2 (Ubuntu)

PHPカンファレンス関西2013の講演で使ったコードなど

スライドはこちらです。 Chef + Vagrantで作るこれからの開発環境とクラウド

使い方

VirtualBoxをダウンロードしてインストール

VirtualBoxをセットアップしてください。 https://www.virtualbox.org/wiki/Downloads

Vagrantをダウンロードしてインストール

最新版をインストールしてください。 http://downloads.vagrantup.com/

このリポジトリをクローン

gitでクローンするか、ZIPなどでダウンロードしてください。

git clone git://github.com/yandod/php5-nginx-vagrant-sample.git

ソースコードの準備

./sandbox以下に動作させたいPHPのソースなどを置く又はVagrantfileの設定を書き換えて任意のディレクトリを指します。これでソースコードが仮想マシン内に同期するのでローカルで編集できます。

vagrantを起動

クローンしたリポジトリ内でvagrantを起動。初回のみOSのダウンロードに時間がかかります。

cd php5-nginx-vagrant-sample
vagrant up

動作確認

http://192.168.33.10 にアクセスする。IPアドレスを変更する場合はVagrantfileを編集します。 またサーバ内にSSHしたい場合はvagrantコマンドを使います。

vagrant ssh

終了

vagrantコマンドで仮想マシンを終了、又は破棄出来ます。

一旦止めるだけの場合。

vagrant halt

データを破棄する場合。次回、vagrant upの際にはまっさらなマシンが作成される。

vagrant destroy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.