Mac install phpmyadmin

Posted by wxianfeng Sun, 11 Sep 2011 05:09:00 GMT

环境:mac ox x lion

发现每次安装phpmyadmin都特别坑爹,windows , ubuntu , centos,mac 都不一样,这次是mac上安装 phpmyadmin,之前的

windows , centos

apache,php 默认是安装的

1,首先 进入 系统偏好设置 -》 共享 -》 web共享 打开

2,查看版本:

localhost:entos wangxianfeng$ /usr/sbin/httpd -v
Server version: Apache/2.2.19 (Unix)
Server built: Jun 16 2011 22:09:54

或者:

wxianfeng:system wangxianfeng$ apachectl -v
Server version: Apache/2.2.19 (Unix)
Server built: Jun 16 2011 22:09:54

查看php版本

>php -v

3,开启apache

sudo apachectl stop | start | restart | status

4,下载phpmyadmin

http://www.phpmyadmin.net/home_page/downloads.php

5,把下载的phpmyadmin 放到自己的某个目录下 ,我的路径

/usr/local/system/phpMyAdmin-3.4.4-all-languages

6,修改phpmyadmin配置

>cd /usr/local/system/phpMyAdmin-3.4.4-all-languages

>cp config.sample.inc.hp config.inc.php

>vim config.inc.php
$cfg['blowfish_secret'] = 'TypeAnything_for_Secure'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
$cfg['Servers'][$i]['auth_type'] = 'http';  # 延长登录时间
$cfg['Servers'][$i]['host'] = '127.0.0.1'; # 把localhost 改为 127.0.0.1

7,把phpmyadmin link到webserver上

> cd  /Library/WebServer/Documents
>sudo ln -nfs /usr/local/system/phpMyAdmin-3.4.4-all-languages /Library/WebServer/Documents/phpmyadmin

8,开启apache load php模块

>vim /etc/apache2/httpd.conf
# LoadModule php5_module libexec/apache2/libphp5.so 把注释去掉

9,重启apache

>sudo apachrctl restart

10,访问

http://localhost/phpmyadmin 

homebrew install imagemagick

Posted by wxianfeng Sat, 10 Sep 2011 14:02:00 GMT

环境:mac os x lion
homebrew是用ruby写的脚本,发现和rvm极其相似

安装 homebrew

>/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"

安装imagemagick

>brew install imagemagick

安装到libtiff 库时 出错

curl: (7) couldn't connect to host
Error: Failure while executing: /usr/bin/curl -f#LA Homebrew\ 0.8\ (Ruby\ 1.8.7-249;\ Mac\ OS\ X\ 10.7.1) ftp://ftp.remotesensing.org/pub/libtiff/tiff-3.9.5.zip -o /Users/wangxianfeng/Library/Caches/Homebrew/libtiff-3.9.5.zip

fixed :

>/usr/bin/curl http://download2.osgeo.org/libtiff/tiff-3.9.5.zip -o ~/Library/Caches/Homebrew/libtiff-3.9.5.zip

再次安装:

>brew install imagemagick

最后测试安装成功:

wxianfeng:inono wangxianfeng$ convert --version
Version: ImageMagick 6.7.1-1 2011-09-10 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP

可以查看出brew安装了下面的库:

wxianfeng:inono wangxianfeng$ brew list
imagemagick jasper jpeg libtiff little-cms

see:
https://github.com/mxcl/homebrew/wiki/installation
https://github.com/mxcl/homebrew/pull/5168