王果子 发表于 2015-12-30 08:36:53

mac os develop

1. 安装PCRE
Download latest PCRE. After download go to download directory from terminal.
$ cd ~/Download $ tar xvzf pcre-8.12.tar.gz
$ cd pcre-8.12
$ sudo ./configure --prefix=/usr/local
$ sudo make $ sudo install
2. 安装Nginx
Download latest nginx from Nginx.org. After download, let install
$ cd ~/Download $ tar xvzf nginx-1.0.0.tar.gz
$ cd nginx-1.0.0
$ sudo ./configure --prefix=/usr/local --with-http_ssl_module --with-ld-opt="-L /usr/local/lib"
$ sudo make $ sudo make install
3. 运行Nginx
$ cd /usr/local/sbin
$ sudo ./nginx
访问http://localhost
4. 关闭Nginx
$ cd /usr/local/sbin
$ sudo ./nginx -s stop

  
  
  
  



Generating phar.php
Generating phar.phar
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
clicommand.inc
directorygraphiterator.inc
directorytreeiterator.inc
invertedregexiterator.inc
pharcommand.inc
phar.inc
Build complete.
Don't forget to run 'make test'.
admindeiMac:php-5.6.1 nihao$
admindeiMac:php-5.6.1 nihao$
admindeiMac:php-5.6.1 nihao$
admindeiMac:php-5.6.1 nihao$
admindeiMac:php-5.6.1 nihao$
admindeiMac:php-5.6.1 nihao$
admindeiMac:php-5.6.1 nihao$
admindeiMac:php-5.6.1 nihao$ sudo make install-sh
make: Nothing to be done for `install-sh'.
admindeiMac:php-5.6.1 nihao$ sudo make install
Installing shared extensions:   /usr/local/lib/php/extensions/no-debug-non-zts-20131226/
Installing PHP CLI binary:      /usr/local/bin/
Installing PHP CLI man page:      /usr/local/php/man/man1/
Installing PHP CGI binary:      /usr/local/bin/
Installing PHP CGI man page:      /usr/local/php/man/man1/
Installing build environment:   /usr/local/lib/php/build/
Installing header files:          /usr/local/include/php/
Installing helper programs:       /usr/local/bin/
program: phpize
program: php-config
Installing man pages:             /usr/local/php/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment:      /usr/local/lib/php/
Archive_Tar    - installed: 1.3.12
Console_Getopt - installed: 1.3.1
Structures_Graph- installed: 1.0.4
XML_Util       - installed: 1.2.3
PEAR         - installed: 1.9.5
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
/server/php-5.6.1/build/shtool install -c ext/phar/phar.phar /usr/local/bin
ln -s -f /usr/local/bin/phar.phar /usr/local/bin/phar
Installing PDO headers:          /usr/local/include/php/ext/pdo/
  
  
  
  Mac OS安装brew工具



#终端下命令安装brew工具:
sudo su
curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C /usr/local



#然后就可以使用brew工具安装或卸载各种软件了,常用的brew命令如下:
$ brew search <pkg_name>#查找软件包
$ brew install <pkg_name>#安装软件包
$ brew list #列出软件包
$ brew uninstall <pkg_name> #卸载软件包
$ brew update #更新
$ brew info <pkg_name> #查看软件包的基本资料
  
  不想被误导?直接看官方文档:




http://mxcl.github.com/homebrew/



先安装Git,打开一个shell





cd /usr/local
sudo mkdir homebrew
curl -L https://github.com/mxcl/homebrew/tarball/master | sudo tar xz --strip 1 -C homebrew
cd homebrew/bin
./brew -v
file brew
cat brew | more
sudo ./brew update
  
  




如果“brew update”命令执行出错,请确保文件夹/usr/local的所有者权限是你本人而不是root:

sudo chown $USER /usr/localbrew updat


在".bash_profile"中更新路径配置

(如果~下没有文件".bash_profile" 请执行: touch '.bash_profile' )

vim '.bash_profile'加入


export PATH=$PATH:/usr/local/homebrew/bin
  之后可以直接执行brew(不用./brew)




如果有了Git可以这样安装(未测试)




git clone https://github.com/mxcl/homebrew.git
cd homebrew/bin
cd homebrew/bin
./brew -v
  


安装测试

./brew install wget

./brew uninstall wget



./brew searc /apache*/  
  
  
  
  
  
  
  
  
  
  
  --
页: [1]
查看完整版本: mac os develop