在linux下部署ROR项目

client让我远程 帮他把项目部署到服务器上。什么都没给,只好自己想办法,边查资料边部署。
首先把代码给搞下来。
[yzhang@localhost ~]$ mkdir trust
[yzhang@localhost ~]$ cd trust
[yzhang@localhost trust]$ svn checkout http://........
用户名:
密码:
[yzhang@localhost trust]$ cd trunk
[yzhang@localhost trunk]$ ls
app         config  doc       lib  public    README  sendmails.rb  tmp
components  db      document  log  Rakefile  script  test          vendor
[yzhang@localhost trunk]$ vi config/database.yml

从命令行模式转到末行模式用 “:”,然后用wq保存修改并推出。

[yzhang@localhost trunk]$ vi config/database.yml
[yzhang@localhost trunk]$ pwd   
查看当前目录路径
/home/yzhang/trust/trunk
[yzhang@localhost trunk]$  mongrel_rails cluster::configure -e development -p 8090 -N 4 -c /home/yzhang/trust/trunk -a 127.0.0.1
Writing configuration file to config/mongrel_cluster.yml.
[yzhang@localhost trunk]$ mongrel_rails cluster::start
starting port 8090
starting port 8091
starting port 8092
starting port 8093
[yzhang@localhost trunk]$ pwd
/home/yzhang/trust/trunk
[yzhang@localhost trunk]$ mysql -u wwsr_user -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 57
Server version: 5.0.45 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database trust_develop
    -> ;
Query OK, 1 row affected (0.01 sec)

mysql> GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP
    ->       ON trust_develop.*
    ->       TO 用户名@localhost
    ->       IDENTIFIED BY '密码';
Query OK, 0 rows affected (0.09 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| test               |
| trust_develop      |
+--------------------+
3 rows in set (0.00 sec)

mysql> use trust_develop
Database changed
mysql>source /home/yzhang/trust/tags/trust.sql  还原数据库。