3k3wt89aaf 发表于 2016-5-17 08:11:25

mac使用笔记

  安装macport
  从此处下载镜像http://www.macports.org/ 
之后设置环境变量
  vi .bash_profile
  增加macport的安装路径 /opt/local/bin:/opt/local/sbin 
  完整的如下
  # Setting PATH for MacPython 2.5
  # The orginal version is saved in .bash_profile.pysave
  PATH="/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"
  export PATH
  ~                
  之后关闭Terminal,并重新打开Terminal
  sudo port selfupdate 
  you can run port installed to see the packages and the versions that are installed. 


  安装django环境 
  下载安装python2.5.4版本,http://www.python.org/ 
  下载django 1.0.2 final版本,http://www.djangoproject.com/
  进入django文件夹下使用sudo python setup.py install
  创建项目webdiary  
  django-admin.py startproject webdiary
  设置settings.py
  python manage.py syncdb#同步
  python manage.py runserver 8080#运行服务器
  python manage.py startapp polls#创建投票APP
  撰写model类 
  python manage.py sql polls
  python manage.py shell #交互模式
  
  php apache开启

  http://foundationphp.com/tutorials/php_leopard.php
  安装phpMyAdmin 3.2.1
  将phpMyAdmin解压出来的文件夹放置在/Library/WebServer/Documents/下

  根据phpMyAdmin中的Documentation.html来进行设置

  安装MySql 
  http://matthewcarriere.com/2008/04/02/installing-mysql-on-mac-os-x-leopard-using-macports/ 
  做为一个深受windows独害的中年人士,想转到mac下或是*nix下来做开发真是不太容易,有点像用惯了.net突然又要叫你用java,
  在mac,或是*nix下,浏览网页什么的也没什么,真要做点深入的事情,就没什么资源了,加上英文不怎么的,身边没多少人用,很成问题.
  突然有点觉得,mac这个本买的有点不值当,前一个富士通的本子,每天死命的在用,感觉很划算,这个mac本,感觉没有发挥它实际的价值来.
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
页: [1]
查看完整版本: mac使用笔记