Upgrade MacPorts
  1. First installed the latest XCode via the Mac App Store
  2. Install latest XCode command line tools via Xcode (install xcode tools)
  3. $ sudo port -d selfupdate
  4. $ sudo port upgrade outdated

Install Ruby Version Manager(RVM) & latest Ruby

$ \curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled # Or, --ruby=1.9.3

Install cocoapods
  $ sudo gem install cocoapods
  $ sudo pod setup

Install With PodFile



To install the necessary Xcode tools using Xcode on the Mac:
  1. Start Xcode on the Mac.
  2. Choose Preferences from the Xcode menu.
  3. In the General panel, click Downloads.
  4. On the Downloads window, choose the Components tab.
  5. Click the Install button next to Command Line Tools.


find process id with name: pgrep [processname]

kill process by name: kill `pgrep [processname]`

1. 新增使用者:
  mysql > create user 'UserName'@'Host' identified by 'Password';

2. 給予權限:
  mysql > grant OPTION on TARGET to USER;

3. 刪除使用者:
  mysql > drop user OPTION 'UserName'@'Host';

註:
 1. UserName 為使用者名稱,例如 root , joey , jackey ...,請注意,要加單引號(')
 2. Password 為密碼,請注意,要加單引號(')

Example:
 1. 新增使用者:
   mysql > create user 'joey'@'localhost' identified by 'abcd2345';
   mysql > create user 'joey'@'%' identified by 'abcd2345';

 2. 給予權限:
   mysql > grant all on *.* to 'joey'@'localhost';
     (注意:joey 對整個資料庫的所有資料表都擁有全部的權利)

   mysql > grant select,insert on myFirstDB.* to 'joey'@'localhost';
     (joey 只擁有對 myFirstDB 這個資料檔[的所有表格]的查詢及新增權利)
     (權利:SELECT,INSERT,UPDATE,DELETE,CREATE,DROP)

 3. 刪除使用者:
   mysql > drop user 'joey'@'localhost';

安裝python
安裝資料庫(mysql-server)
安裝python-mysqldb (如果使用其它資料庫則使用python-xxxxx)
安裝apache2
安裝Django 有兩個方法
tar xzvf Django-1.3.tar.gz
cd Django-1.3
sudo python setup.py install
  • 或下指令 svn co http://code.djangoproject.com/svn/django/trunk/ 最新開發板本
接下來安裝 libapache-mod_python (讓 apache能執行python)