• Stars
    star
    110
  • Rank 314,940 (Top 7 %)
  • Language
    PHP
  • Created over 11 years ago
  • Updated almost 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Vagrantfile for php5.5 as php-fpm with nginx, mysql, postgres, imagemagick.

php5-nginx-vagrant-sample

English Readme

Vagrantを使ってPHPとMySQLが動作する環境を自動で設定します。OSなどに依存しないXAMPP/MAMPのようなものと考えてください。 またPostgreSQLやImageMagickもセットアップしてあります。

OS Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)
PHP PHP 5.5.6-1+debphp.org~precise+2
Nginx 1.1.19
MySQL 5.5.31-0ubuntu0.12.04.2 (Ubuntu)
PostgreSQL 9.1.9
curl 7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8y zlib/1.2.5
ImageMagick 8:6.6.9.7

update

クックブックの管理をBerkshelfで行うように変更し、PHP5.5を導入するように変更しました。利用の際はvagrant-berkshelfプラグインのインストールをお願いします。 また、パッケージの取得にかかる時間が少し長くなりましたので、元に戻したい方はPHPのバージョンを指定している部分をコメントアウトしてください。

  config.vm.provision :chef_solo do |chef|
    chef.add_recipe "apt"
    chef.add_recipe "php5_ppa::from_ondrej"
    chef.add_recipe "omusubi"
    versions = {};
    # if you would use php5.3 family with fast boot,  comment out lines bellow.
    versions['php5'] = '5.5.*'
    versions['php5-mysql'] = '5.5.*'
    versions['php5-pgsql'] = '5.5.*'
    versions['php5-curl'] = '5.5.*'
    versions['php5-mcrypt'] = '5.5.*'
    versions['php5-cli'] = '5.5.*'
    versions['php5-fpm'] = '5.5.*'
    versions['php-pear'] = '5.5.*'
    versions['php5-imagick'] = '3.*'
    chef.json = {doc_root: doc_root, 'versions' => versions}
  end

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

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

使い方

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

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

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

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

Vagrant Berkshelfプラグインをインストール

コマンドでインストールします。

$ vagrant plugin install vagrant-berkshelf

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

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://127.0.0.1:8080 にアクセスする。IPアドレスを変更する場合はVagrantfileを編集します。 またサーバ内にSSHしたい場合はvagrantコマンドを使います。

vagrant ssh

終了

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

一旦止めるだけの場合。

vagrant halt

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

vagrant destroy

More Repositories

1

candycane

a port of Redmine to CakePHP from Ruby on Rails
PHP
512
star
2

php-warrior

php implementation of ruby-warrior
PHP
94
star
3

phpinfo-heroku

PHP
23
star
4

cakephp-heroku-plugin

This Plugin helps reading configuration from heroku config vars.
PHP
20
star
5

md2backlog

text converter for markdown to backlog wiki
Ruby
12
star
6

composer-cakephp-sample

Ruby
8
star
7

cakephp-guidebook

sample sources of cakephp-guidebook (japanese)
PHP
7
star
8

omusubi

omusubi is simple php based devlopment box based on precise64.
Ruby
5
star
9

shimokita

Extract examples of source code from markdown text.
Ruby
5
star
10

teacare

Tiny question and answer application which is developed on #li3 (Lithium)
PHP
4
star
11

phpfriends

Let's friend!
PHP
4
star
12

php-warrior-maze

maze experimental
PHP
3
star
13

php-ml-example

PHP
3
star
14

chef-amimoto

Ruby
3
star
15

matsutter

cakematsuri-sample CakePHP based tiny twitter clone. (branched contains steps of workshop)
PHP
3
star
16

heroku-php-sample

sample codes for heroku meetup
PHP
3
star
17

phpunit-class

PHP
2
star
18

cc_nyancat

nyancat plugin for CandyCane
PHP
2
star
19

KanaelMobile

My first Titanium application.
JavaScript
2
star
20

cc_weather

PHP
2
star
21

cc_epicsax

PHP
2
star
22

ey-yaml2json

Ruby
1
star
23

engineyard-php-mongo-sample

1
star
24

covid19-setagaya

monitor and tweet COVID-19 stats from Setagaya ward's website
TypeScript
1
star
25

CcFacebook

PHP
1
star
26

shimokita8

sample source for cakephp2 workshop at Shimokitazawa OSS Cafe.
PHP
1
star
27

pages-test

1
star
28

cc_moriyoshi

JavaScript
1
star
29

php-form-sample

Form handling samples for PHP
PHP
1
star
30

selenium-grid

Ruby
1
star
31

ey-cloud-recipes-mongo

Ruby
1
star
32

engineyard-composer-sample

PHP
1
star
33

php-class-class

Sample source codes of PHP OOP workshop.
PHP
1
star
34

cc_like_it

PHP
1
star
35

CcCocoiti

個々一番さん結婚おめでとう!
PHP
1
star
36

cakephp_skeleton

PHP
1
star
37

CcOctoland

Collect all Octocat stickers on CandyCane
PHP
1
star
38

php-sdk

We have created a new repository for this project: https://github.com/facebook/facebook-php-sdk. Please update anything you have pointing at this repostory to this location before April 1, 2012.
PHP
1
star
39

yandod.github.com

1
star
40

candycane-stats

Ruby
1
star
41

cakephp3_todo

PHP
1
star
42

photzou-fan

make bigger photos in Photozou RSS
Ruby
1
star
43

yando-test-one

facebook app test
PHP
1
star