Skip to main content
追記部分のシンタックスハイライトが効くように言語指定を追加
ソース リンク
holywise
  • 1,652
  • 1
  • 13
  • 27

開発環境は
centOS 7.1
CakePHP 2.X

  • centOS 7.1
  • CakePHP 2.X
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
  config.vm.define "hoge" do |node|
    node.vm.box = "bento/centos-7.1"
    node.vm.hostname = "hoge"
    node.vm.network :private_network, ip: "192.168.33.61"
    node.vm.network :public_network, ip: "192.168.11.61"
    node.vm.provision "ansible" do |ansible|
      ansible.playbook = "playbook.yml"
    end
    node.vm.synced_folder "./webroot", "/webroot", type: "nfs", mount_options: ["async", "nolock", "nfsvers=3", "vers=3", "tcp", "noatime", "soft", "rsize=8192", "wsize=8192"]
  end

end
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
  config.vm.define "hoge" do |node|
    node.vm.box = "bento/centos-7.1"
    node.vm.hostname = "hoge"
    node.vm.network :private_network, ip: "192.168.33.61"
    node.vm.network :public_network, ip: "192.168.11.61"
    node.vm.provision "ansible" do |ansible|
      ansible.playbook = "playbook.yml"
    end
    node.vm.synced_folder "./webroot", "/webroot", type: "nfs", mount_options: ["async", "nolock", "nfsvers=3", "vers=3", "tcp", "noatime", "soft", "rsize=8192", "wsize=8192"]
  end

end
{
    "name": "hoge",
    "repositories": [
        {
            "type": "pear",
            "url": "http://pear.cakephp.org"
        }
    ],
    "require": {
        "cakephp/cakephp": ">=2.4.9",
        "cakedc/search": "dev-master"
    },
    "require-dev": {
        "phpunit/phpunit": "3.7.*",
        "cakephp/debug_kit" : "2.2.*"
    },
    "config": {
        "vendor-dir": "Vendor/"
    }
}
{
    "name": "hoge",
    "repositories": [
        {
            "type": "pear",
            "url": "http://pear.cakephp.org"
        }
    ],
    "require": {
        "cakephp/cakephp": ">=2.4.9",
        "cakedc/search": "dev-master"
    },
    "require-dev": {
        "phpunit/phpunit": "3.7.*",
        "cakephp/debug_kit" : "2.2.*"
    },
    "config": {
        "vendor-dir": "Vendor/"
    }
}
Cache::config('_cake_core_', array(
    'engine' => $engine,
    'prefix' => $prefix . 'cake_core_',
    'path' => CACHE . 'persistent' . DS,
    'serialize' => ($engine === 'File'),
    'duration' => $duration,
    'mask' => 0777,
));

Cache::config('_cake_model_', array(
    'engine' => $engine,
    'prefix' => $prefix . 'cake_model_',
    'path' => CACHE . 'models' . DS,
    'serialize' => ($engine === 'File'),
    'duration' => $duration,
    'mask' => 0777,
));
Cache::config('_cake_core_', array(
    'engine' => $engine,
    'prefix' => $prefix . 'cake_core_',
    'path' => CACHE . 'persistent' . DS,
    'serialize' => ($engine === 'File'),
    'duration' => $duration,
    'mask' => 0777,
));

Cache::config('_cake_model_', array(
    'engine' => $engine,
    'prefix' => $prefix . 'cake_model_',
    'path' => CACHE . 'models' . DS,
    'serialize' => ($engine === 'File'),
    'duration' => $duration,
    'mask' => 0777,
));

開発環境は
centOS 7.1
CakePHP 2.X

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
  config.vm.define "hoge" do |node|
    node.vm.box = "bento/centos-7.1"
    node.vm.hostname = "hoge"
    node.vm.network :private_network, ip: "192.168.33.61"
    node.vm.network :public_network, ip: "192.168.11.61"
    node.vm.provision "ansible" do |ansible|
      ansible.playbook = "playbook.yml"
    end
    node.vm.synced_folder "./webroot", "/webroot", type: "nfs", mount_options: ["async", "nolock", "nfsvers=3", "vers=3", "tcp", "noatime", "soft", "rsize=8192", "wsize=8192"]
  end

end
{
    "name": "hoge",
    "repositories": [
        {
            "type": "pear",
            "url": "http://pear.cakephp.org"
        }
    ],
    "require": {
        "cakephp/cakephp": ">=2.4.9",
        "cakedc/search": "dev-master"
    },
    "require-dev": {
        "phpunit/phpunit": "3.7.*",
        "cakephp/debug_kit" : "2.2.*"
    },
    "config": {
        "vendor-dir": "Vendor/"
    }
}
Cache::config('_cake_core_', array(
    'engine' => $engine,
    'prefix' => $prefix . 'cake_core_',
    'path' => CACHE . 'persistent' . DS,
    'serialize' => ($engine === 'File'),
    'duration' => $duration,
    'mask' => 0777,
));

Cache::config('_cake_model_', array(
    'engine' => $engine,
    'prefix' => $prefix . 'cake_model_',
    'path' => CACHE . 'models' . DS,
    'serialize' => ($engine === 'File'),
    'duration' => $duration,
    'mask' => 0777,
));

開発環境は

  • centOS 7.1
  • CakePHP 2.X
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
  config.vm.define "hoge" do |node|
    node.vm.box = "bento/centos-7.1"
    node.vm.hostname = "hoge"
    node.vm.network :private_network, ip: "192.168.33.61"
    node.vm.network :public_network, ip: "192.168.11.61"
    node.vm.provision "ansible" do |ansible|
      ansible.playbook = "playbook.yml"
    end
    node.vm.synced_folder "./webroot", "/webroot", type: "nfs", mount_options: ["async", "nolock", "nfsvers=3", "vers=3", "tcp", "noatime", "soft", "rsize=8192", "wsize=8192"]
  end

end
{
    "name": "hoge",
    "repositories": [
        {
            "type": "pear",
            "url": "http://pear.cakephp.org"
        }
    ],
    "require": {
        "cakephp/cakephp": ">=2.4.9",
        "cakedc/search": "dev-master"
    },
    "require-dev": {
        "phpunit/phpunit": "3.7.*",
        "cakephp/debug_kit" : "2.2.*"
    },
    "config": {
        "vendor-dir": "Vendor/"
    }
}
Cache::config('_cake_core_', array(
    'engine' => $engine,
    'prefix' => $prefix . 'cake_core_',
    'path' => CACHE . 'persistent' . DS,
    'serialize' => ($engine === 'File'),
    'duration' => $duration,
    'mask' => 0777,
));

Cache::config('_cake_model_', array(
    'engine' => $engine,
    'prefix' => $prefix . 'cake_model_',
    'path' => CACHE . 'models' . DS,
    'serialize' => ($engine === 'File'),
    'duration' => $duration,
    'mask' => 0777,
));
本文に 1218 文字追加
ソース リンク
user76333
  • 507
  • 2
  • 8
  • 25

追記:以下の設定で環境構築をしています。

Vagratnfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
  config.vm.define "hoge" do |node|
    node.vm.box = "bento/centos-7.1"
    node.vm.hostname = "hoge"
    node.vm.network :private_network, ip: "192.168.33.61"
    node.vm.network :public_network, ip: "192.168.11.61"
    node.vm.provision "ansible" do |ansible|
      ansible.playbook = "playbook.yml"
    end
    node.vm.synced_folder "./webroot", "/webroot", type: "nfs", mount_options: ["async", "nolock", "nfsvers=3", "vers=3", "tcp", "noatime", "soft", "rsize=8192", "wsize=8192"]
  end

end

composer.json ファイル

{
    "name": "hoge",
    "repositories": [
        {
            "type": "pear",
            "url": "http://pear.cakephp.org"
        }
    ],
    "require": {
        "cakephp/cakephp": ">=2.4.9",
        "cakedc/search": "dev-master"
    },
    "require-dev": {
        "phpunit/phpunit": "3.7.*",
        "cakephp/debug_kit" : "2.2.*"
    },
    "config": {
        "vendor-dir": "Vendor/"
    }
}

core.php

Cache::config('_cake_core_', array(
    'engine' => $engine,
    'prefix' => $prefix . 'cake_core_',
    'path' => CACHE . 'persistent' . DS,
    'serialize' => ($engine === 'File'),
    'duration' => $duration,
    'mask' => 0777,
));

Cache::config('_cake_model_', array(
    'engine' => $engine,
    'prefix' => $prefix . 'cake_model_',
    'path' => CACHE . 'models' . DS,
    'serialize' => ($engine === 'File'),
    'duration' => $duration,
    'mask' => 0777,
));

追記:以下の設定で環境構築をしています。

Vagratnfile

# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
  config.vm.define "hoge" do |node|
    node.vm.box = "bento/centos-7.1"
    node.vm.hostname = "hoge"
    node.vm.network :private_network, ip: "192.168.33.61"
    node.vm.network :public_network, ip: "192.168.11.61"
    node.vm.provision "ansible" do |ansible|
      ansible.playbook = "playbook.yml"
    end
    node.vm.synced_folder "./webroot", "/webroot", type: "nfs", mount_options: ["async", "nolock", "nfsvers=3", "vers=3", "tcp", "noatime", "soft", "rsize=8192", "wsize=8192"]
  end

end

composer.json ファイル

{
    "name": "hoge",
    "repositories": [
        {
            "type": "pear",
            "url": "http://pear.cakephp.org"
        }
    ],
    "require": {
        "cakephp/cakephp": ">=2.4.9",
        "cakedc/search": "dev-master"
    },
    "require-dev": {
        "phpunit/phpunit": "3.7.*",
        "cakephp/debug_kit" : "2.2.*"
    },
    "config": {
        "vendor-dir": "Vendor/"
    }
}

core.php

Cache::config('_cake_core_', array(
    'engine' => $engine,
    'prefix' => $prefix . 'cake_core_',
    'path' => CACHE . 'persistent' . DS,
    'serialize' => ($engine === 'File'),
    'duration' => $duration,
    'mask' => 0777,
));

Cache::config('_cake_model_', array(
    'engine' => $engine,
    'prefix' => $prefix . 'cake_model_',
    'path' => CACHE . 'models' . DS,
    'serialize' => ($engine === 'File'),
    'duration' => $duration,
    'mask' => 0777,
));
スタックトレースの改行箇所を調整
ソース リンク
holywise
  • 1,652
  • 1
  • 13
  • 27
読み込んでいます
ソース リンク
user76333
  • 507
  • 2
  • 8
  • 25
読み込んでいます