16
17

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.

開発環境構築手順

Last updated at Posted at 2014-04-01

#開発環境構築手順

準備

必要なアプリケーションの一括インストール

OS Mavericks

AppStoreよりダウンロード
apple id が必要

Xcode

AppStoreよりダウンロード
apple id が必要

起動・認証

Xcode Command Line Tools

$ xcode-select —install

Homebew

$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"

brew bundle

Brewfile をどこかから持ってくる (下記記載例から作成で可)
~/Brewfile

$ cd
$ brew bundle

必要であれば下記へ独自caskファイルを設置
/usr/local/Library/Taps/phinze-cask/Casks/

インストール内容

update
upgrade

# Add Repository
tap phinze/homebrew-cask || true

# Memo:
# mcrypt:     for PHP
install brew-cask
install tmux
install wget
install mysql
install node
install mcrypt
install autoconf
install vim

cask install google-chrome
cask install google-japanese-ime
cask install google-hangouts
cask install firefox
cask install java
cask install flash
cask install vmware-fusion
cask install iterm2
cask install kobito
cask install dropbox
cask install bettertouchtool
cask install path-finder
cask install macvim-kaoriya
cask install diff-fork

zsh

デフォルトでインストール済み

デフォルトシェルの切り替え

$ chsh -s /bin/zsh

.zshrc をどこかから持ってくる
~/.zshrc

$ source ~/.zshrc

vim

homebrewでインストール済み

.vimrc をどこかから持ってくる
~/.vimrc

$ source ~/.vimrc

プラグイン管理

$ mkdir -p ~/.vim/bundle
$ git clone git://github.com/Shougo/neobundle.vim ~/.vim/bundle/neobundle.vim

インストール

:NeoBundleInstall

LAMP環境

ローカル開発環境の構築

Apache

デフォルトでインストール済み

設定

/etc/apache2/httpd.conf
#LoadModule php5_module libexec/apache2/libphp5.so
↓
LoadModule php5_module libexec/apache2/libphp5.so

~

#Include /etc/apache2/extra/httpd-vhosts.conf
↓
Include /etc/apache2/extra/httpd-vhosts.conf

phpMyAdmin設定

$ cd ~
$ mkdir www
$ cd www
$ ln -s /var/lib/phpmyadmin phpmyadmin

バーチャルホスト設定追記

/etc/apache2/extra/httpd-vhosts.conf
<VirtualHost *:80>
  ServerName local.phpmyadmin.com
  DocumentRoot "/Users/username/www/phpmyadmin"

  <Directory "/Users/username/www/phpmyadmin/">
    Options -Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory>
</VirtualHost>

MySQL

homebrewでインストール済み

~/.zshrc_mac
export PATH=$PATH:/usr/local/mysql/bin
$ source ~/.zshrc
$ mysqladmin -u root password 'example_password'

PHP

デフォルトでインストール済み

php.iniの作成

$ sudo cp /etc/php.ini.default /etc/php.ini
$ sudo vi /etc/php.ini

編集内容のみ記載

/etc/php.ini
date.timezone = Asia/Tokyo
pdo_mysql.default_socket=/tmp/mysql.sock
mysql.default_socket = /tmp/mysql.sock
mysqli.default_socket = /tmp/mysql.sock

phpMyAdmin

$ cd /usr/local
$ mkdir sources
$ cd /usr/local/sources
$ wget http://sourceforge.net/projects/phpmyadmin/files/phpMyAdmin/4.1.12/phpMyAdmin-4.1.12-all-languages.tar.gz
$ tar xzf phpMyAdmin-4.1.12-all-languages.tar.gz
$ sudo cp -a phpMyAdmin-4.1.12-all-languages /var/lib/phpmyadmin
$ cd /var/lib/phpmyadmin
$ sudo cp config.sample.inc.php config.inc.php
$ sudo vim config.inc.php

hosts

/etc/hostsにlocal.phpmyadmin.comを追加

127.0.0.1 local.phpmyadmin.com

キャッシュ削除

$ sudo dscacheutil -flushcache
16
17
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
16
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?