1.要求安装ruby1.8.3以上,并且需要安装rails,版本也要匹配好,否则会出错。(下文用typo4.1和rails1.2.3安装成功)
2.下载并安装typo,gem install typo -v"=4.1"
3.升级rake,gem update rake
4.安装mongrel,gem install mongrel
5.进入mysql,建库和表
mysql -uroot -p'你的密码'
mysql>create database typo;
mysql>GRANT ALL ON typo.* to typo@localhost IDENTIFIED BY 'typo用户的密码'
mysql>use typo
source ....\typo-4.1\db\schema.mysql.sql
然后按照同样的顺序生成typo_dev和typo_test库,并在各库中用上面的sql文件生成表,并分配给用户typo所有权限
6.在typo目录下找到database.yml.example,改名为database.yml,并修改其内容为
login: &login
adapter: mysql
host: localhost
username: typo
password: 19761217
development:
database: typo_dev
<<: *login
test:
database: typo_tests
<<: *login
production:
database: typo
<<: *login
7.进入config/enviroments/development.rb,修改此文件,经config.breakpoint_server=true注释掉
8.进入typo目录,执行rake db:migrate
9.在typo目录下执行mongrel_rails start -e production -d -a 127.0.0.1 -p 8008,启动typo服务器
在浏览器中键入http://127.0.0.1:8008即可访问typo