Last active
December 31, 2015 11:49
-
-
Save tikitikipoo/7981882 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- TotalTerminal | |
環境設定 | |
1. -> 設定 -> Pro デフォルト | |
2. -> 設定 -> テキスト -> フォント -> Monaco 14 pt | |
3. -> TotalTerminal -> Activation -> Command + @ | |
PHPのインストールは手動で行った。 | |
phpenv + php-build + phpenv-apache-version | |
参考 | |
http://blog.masu-mi.me/2013/11/23/construct_php_env.html | |
http://www29.atwiki.jp/m_shige1979/pages/1582.html | |
phpenvインストール | |
brew install --HEAD phpenv | |
以下を.bash_profileに追加 | |
export PATH=$PATH:$HOME/.phpenv/bin | |
if [ `which phpenv` ]; then | |
eval "$(phpenv init -)" | |
fi | |
exec $SHELL | |
mkdir -p .phpenv/plugins | |
git clone https://github.com/CHH/php-build/ ${HOME}/.phpenv/plugins/php-build | |
cp ~/.phpenv/plugins/php-build/bin/phpenv-install ~/.phpenv/plugins/php-build/bin/rbenv-install | |
sed -i -e "s/# Provide phpenv completions/# Provide rbenv completions/g" ~/.phpenv/plugins/php-build/bin/rbenv-install | |
vim ./.phpenv/plugins/php-build/share/php-build/default_configure_options | |
--without-pear | |
--with-gd | |
--with-jpeg-dir=/opt/boxen/homebrew/Cellar/jpeg/8d | |
--with-png-dir=/opt/boxen/homebrew/Cellar/libpng | |
--enable-sockets | |
--enable-exif | |
--enable-zip | |
--with-zlib | |
--with-zlib-dir=/usr | |
--with-kerberos | |
--with-openssl | |
--with-mcrypt=/opt/boxen/homebrew/Cellar/mcrypt/2.5.8 | |
--enable-soap | |
--enable-xmlreader | |
--with-xsl | |
--enable-ftp | |
--enable-cgi | |
--with-curl=/usr | |
--with-tidy | |
--with-xmlrpc | |
--enable-sysvsem | |
--enable-sysvshm | |
--enable-shmop | |
--with-mysql=mysqlnd | |
--with-mysqli=mysqlnd | |
--with-pdo-mysql=mysqlnd | |
--with-pgsql | |
--with-pdo-pgsql | |
--with-pdo-sqlite | |
--enable-pcntl | |
--with-readline | |
--enable-mbstring | |
--disable-debug | |
--enable-fpm | |
--enable-bcmath | |
--with-apxs2=/usr/sbin/apxs # 追加 | |
# 欲しいver.を探す | |
phpenv install | |
# インストール | |
phpenv install 5.4.23 | |
# インストールしたらお約束 | |
phpenv rehash | |
# 利用するPHP ver.を切り替える(システム全体) | |
phpenv global 5.4.23 | |
apacheモジュールのlibphp5.soを切り替えるプラグイン導入 | |
git clone https://github.com/garamon/phpenv-apache-version ~/.phpenv/plugins/phpenv-apache-version | |
cp /Users/tikitikipoo/.phpenv/versions/5.4.23/libexec/apache2/libphp5.so /Users/tikitikipoo/.phpenv/versions/5.4.23/libphp5.so | |
phpenv apache-version 5.4.23 | |
http.confの場所 | |
httpd -V | awk 'BEGIN{FS="\""} /SERVER_CONFIG_FILE/{print $2}' | |
http.conf修正(virtual hostの有効化、phpモジュールの有効化) | |
# Virtual hosts | |
Include /opt/boxen/homebrew/etc/apache2/extra/httpd-vhosts.conf | |
# Php conf | |
Include /opt/boxen/homebrew/etc/apache2/extra/php.conf | |
php.conf | |
vim /opt/boxen/homebrew/etc/apache2/extra/php.conf | |
# | |
# PHP is an HTML-embedded scripting language which attempts to make it | |
# easy for developers to write dynamically generated webpages. | |
# | |
LoadModule php5_module libexec/libphp5.so | |
# | |
# Cause the PHP interpreter to handle files with a .php extension. | |
# | |
AddHandler php5-script .php | |
AddType text/html .php | |
# | |
# Add index.php to the list of files that will be served as directory | |
# indexes. | |
# | |
DirectoryIndex index.php | |
# | |
# Uncomment the following line to allow PHP to pretty-print .phps | |
# files as PHP source code: | |
# | |
#AddType application/x-httpd-php-source .phps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment