今日も今日とてMacをいじいじしていますが、
Boxenを使ってのセットアップがなんとか完了しました。
基本的にはこちらのページを参考に進めましたので、
変更点とつまった点を備忘録としてまとめます。
Puppetfileに追記した内容
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
## custmize github "osx", "2.2.2" github "autoconf", "1.0.0" # lib github "python", "1.1.0" github "java", "1.2.0" #github "php", "1.1.0" github "libtool", "1.0.0" # use for php github "pkgconfig", "1.0.0" # use for php github "pcre", "1.0.0" # use for php github "libpng", "1.0.0" # use for php github "wget", "1.0.0" github "zsh", "1.0.0" github "heroku", "2.0.0" github "mysql", "1.1.0" github "postgresql", "2.0.0" # via homebrew github "imagemagick", "1.2.1" # via homebrew # local application for develop github "sequel_pro", "1.0.0" github "iterm2", "1.0.4" github "sublime_text_2", "1.1.2" github "chrome", "1.1.0" github "firefox", "1.1.7" # local application for utility github "dropbox", "1.2.0" github "skype", "1.0.8" github "evernote", "2.0.4" |
modules/people/manifests/$login.pp の内容はこちら
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
class people::ohwakana { ## osx # Finder include osx::finder::unhide_library class osx::finder::show_all_files { include osx::finder boxen::osx_defaults { 'Show all files': user => $::boxen_user, domain => 'com.apple.finder', key => 'AppleShowAllFiles', value => true, notify => Exec['killall Finder']; } } include osx::finder::show_all_files # Dock include osx::dock::autohide class osx::dock::kill_dashbord{ include osx::dock boxen::osx_defaults { 'kill dashbord': user => $::boxen_user, domain => 'com.apple.dashboard', key => 'mcx-disabled', value => YES, notify => Exec['killall Dock']; } } include osx::dock::kill_dashbord # Universal Access include osx::universal_access::ctrl_mod_zoom include osx::universal_access::enable_scrollwheel_zoom # Miscellaneous include osx::no_network_dsstores # disable creation of .DS_Store files on network shares include osx::software_update # download and install software updates # include turn-off-dashboard # lib include python include java # include php::5_4 include mysql include wget include zsh include heroku include phantomjs include imagemagick # local application for develop include sequel_pro include iterm2::stable include sublime_text_2 sublime_text_2::package { 'Emmet': source => 'sergeche/emmet-sublime' } include firefox include chrome # local application for utility include dropbox include skype include evernote # via homebrew package { [ 'readline', # use for rails 'tmux', 'reattach-to-user-namespace', # use tmux to clipbord 'tree', 'proctools', # kill by process name. like $ pkill firefox 'tig', 'git-extras', 'z', 'ec2-api-tools', 'ec2-ami-tools', 're2c', ]: } # dotfile setting $home = "/Users/${::boxen_user}" $dotfiles = "${home}/dotfiles" repository { $dotfiles: source => '${::boxen_user}/dotfiles' # require => File[$my] } exec { "sh ${dotfiles}/bootstrap.sh": cwd => $dotfiles, creates => "${home}/.zshrc", require => Repository[$dotfiles], notify => Exec['submodule-clone'], } exec { "submodule-clone": cwd => $dotfiles, command => 'git submodule init && git submodule update', require => Repository[$dotfiles], } } |
phpをインストールしたところ、以下のエラーが出たでのコメントアウト。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
DESTROYING PHP 5.4.17 Error: Could not set 'present' on ensure: uncaught throw `Error occured while configuring PHP 5.4.17' at 119:/opt/boxen/repo/shared/php/manifests/version.pp Error: Could not set 'present' on ensure: uncaught throw `Error occured while configuring PHP 5.4.17' at 119:/opt/boxen/repo/shared/php/manifests/version.pp Wrapped exception: uncaught throw `Error occured while configuring PHP 5.4.17' Error: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/Php_version[5.4.17]/ensure: change from absent to present failed: Could not set 'present' on ensure: uncaught throw `Error occured while configuring PHP 5.4.17' at 119:/opt/boxen/repo/shared/php/manifests/version.pp Notice: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/Exec[pear-5.4.17-temp_dir]: Dependency Php_version[5.4.17] has failures: true Warning: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/Exec[pear-5.4.17-temp_dir]: Skipping because of failed dependencies Notice: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/Exec[pear-5.4.17-cache_dir]: Dependency Php_version[5.4.17] has failures: true Warning: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/Exec[pear-5.4.17-cache_dir]: Skipping because of failed dependencies Notice: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/Exec[pear-5.4.17-download_dir]: Dependency Php_version[5.4.17] has failures: true Warning: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/Exec[pear-5.4.17-download_dir]: Skipping because of failed dependencies Notice: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/File[/opt/boxen/phpenv/versions/5.4.17]: Dependency Php_version[5.4.17] has failures: true Warning: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/File[/opt/boxen/phpenv/versions/5.4.17]: Skipping because of failed dependencies Notice: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/File[/opt/boxen/phpenv/versions/5.4.17/modules]: Dependency Php_version[5.4.17] has failures: true Warning: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/File[/opt/boxen/phpenv/versions/5.4.17/modules]: Skipping because of failed dependencies Notice: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/Exec[phpenv-rehash-post-install-5.4.17]: Dependency Php_version[5.4.17] has failures: true Warning: /Stage[main]/Php::5_4_17/Php::Version[5.4.17]/Exec[phpenv-rehash-post-install-5.4.17]: Skipping because of failed dependencies Notice: /Stage[main]/Php::5_4/File[/opt/boxen/phpenv/versions/5.4]: Dependency Php_version[5.4.17] has failures: true Warning: /Stage[main]/Php::5_4/File[/opt/boxen/phpenv/versions/5.4]: Skipping because of failed dependencies |
ちょっと調べてみたけどややこしそう・・・
Issue #46: Error while configuring PHP 5.4.17
Issue #885: error freetype.h not found installing php53
という事でphpについては、以下の方法でhomebrewでインストールした。
(brew tap便利!)
%brew tap homebrew/dupes
%brew tap josegonzalez/php
%brew info php55
# 依存パッケージが2つほどあったけどまとめてインストール
%brew install php55
追記:brewのphpは削除してboxenにPHPを追加しました
%brew uninstall php55
%brew untap homebrew/dupes
%brew untap josegonzalez/php
Puppetfile
1 |
github "php", "1.2.0" |
modules/people/manifests/$login.pp
1 2 3 4 5 |
include php::5_4_11 include php::composer class { 'php::global': version => '5.4.11' } |
/Users/${user}/dotfiles に必要なものを追加
※必要最低限のものです
.zshenv
1 |
source /opt/boxen/env.sh |
.zshrc
export PATH=”$(brew –prefix josegonzalez/php/php55)/bin:$PATH”
これで新しいMacがたくさん届いても大丈夫になりました。
私の設定はこちらです。
ohwakana/my-boxen
ohwakana/dotfiles