mac下快速安装php 5.4

手头的笔记本升级到了OS X 10.8了,但是偶尔还需要写点php调剂一下。看看自带的php版本? PHP 5.3.13 with Suhosin-Patch (cli) (built: Jun 20 2012 17:05:20) Copyright (c) 1997-2012 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies 对于追新族来说,必须得升级到php 5.4才开心。借助homebrew很快完成升级: 安装过程 三行即可。 brew tap homebrew/dupes brew tap josegonzalez/homebrew-php brew install php54 这样安装的php路径在/usr/local/bin/php,版本信息: /usr/local/bin/php -v PHP 5.4.4 (cli) (built: Jul 27 2012 08:42:32) Copyright (c) 1997-2012 The […]

如何安装Node.js

下面分别介绍在Mac, Ubuntu,Centos以及Windows下安装Node.js. Mac 在Mac下,如果你喜欢用homebrew,那么只用一行就可以装好: brew install node 否则,只能考虑手工安装了,步骤如下: 安装Xcode 安装git 运行下面的命令行编译node.js git clone git://github.com/joyent/node.git cd node ./configure make sudo make install Ubuntu 安装依赖包 sudo apt-get install g++ curl libssl-dev apache2-utils sudo apt-get install git-core 运行下面的命令行: git clone git://github.com/joyent/node.git cd node ./configure make sudo make install Windows 用cygwin来安装node,步骤如下: 安装cygwin 在cygwin的目录下,运行setup.exe安装下面列表中的包 devel → openssl devel → g++-gcc […]

mac下的tree命令

在默认安装安装的mac下没有找到tree命令,找了一下原来有个比较流氓的解决办法: find . -print | sed -e ‘s;[^/]*/;|____;g;s;____|; |;g’ 这个命令行跑起来类似平常tree的效果,比如: . |____extra | |____httpd-autoindex.conf | |____httpd-dav.conf | |____httpd-default.conf | |____httpd-info.conf | |____httpd-languages.conf | |____httpd-manual.conf | |____httpd-mpm.conf | |____httpd-multilang-errordoc.conf | |____httpd-ssl.conf | |____httpd-userdir.conf | |____httpd-vhosts.conf |____httpd.conf |____magic |____mime.types |____original | |____extra | | |____httpd-autoindex.conf | | |____httpd-dav.conf | | |____httpd-default.conf | | |____httpd-info.conf | | |____httpd-languages.conf […]