linux下部署ROR

client让我远程 帮他把项目部署到服务器上。什么都没给,只好自己想办法,边查资料边部署。
首先把代码给搞下来。
[yzhang@localhost ~]$ mkdir trust
[yzhang@localhost ~]$ cd trust
[yzhang@localhost trust]$ svn checkout
用户名:
密码:
[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 还原数据库。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值