1.Homebrew
参考网址:http://dev.enekoalonso.com/2011/08/09/uninstalling-brew-so-i-can-reinstall/
卸载
cd `brew --prefix` rm -rf Cellar brew prune rm -rf Library .git .gitignore bin/brew README.md share/man/man1/brew rm -rf ~/Library/Caches/Homebrew
安装
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
sudo su curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C /usr/local
执行 brew 命令
注意
MacPorts 和 Homebrew不能同时存在
2.MacPorts
卸载
sudo port -f uninstall installed
安装
网上下载直接一步一步安装就可以了:http://www.macports.org/install.php
软件更新 sudo port -v selfupdate
安装: sudo port install python27 py27-yaml py27-cheetah
ERROR:
Failed to install sqlite3
解决:
sudo port deactivate readline
sudo port install sqlite3
再重新执行 sudo port install python27 py27-yaml py27-cheetah位置:/opt/local/var/macports
3.修改Apache端口
/Users/admin/Documents/work/server/apache-tomcat-7.0.42/conf/server.xml
server.xml 8080端口改成别的即可
tomcat:http://www.himigame.com/java-servlet/845.html
如果当 startup.sh后出现类似 “Permission denied”字样,那么需要你对此目录进行权限设置:
启动终端:输入 sudo chmod 755 xxx/bin/*.sh (xxx表示你tomcat放至的路径)回车;
OK,再次在终端输入 startup.sh进行启动tomcat;
4.MySql
http://www.himigame.com/mysql/749.html
启动mysql命令
sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
mysql -u root -p
5. mac lua环境
下载 lua 地址:Lua
1.进入 lua 目录
2.make macosx
3.sudo make install
6.python 缺少 模块
(1) yaml
http://codyaray.com/2011/12/pyyaml-using-easy_install-on-mac-os-x-lion
1.报错
ImportError: No module named yaml
2.安装
sudo easy_install pyyaml
error
执行:sudo python -m easy_install pyyaml
执行:sudo easy_install pyyaml
(2) Cheetah
下载cheetah:http://pythonhosted.org//Cheetah/
进入目录执行 sudo python setup.py install