`
PBFox
  • 浏览: 66259 次
  • 性别: Icon_minigender_1
  • 来自: China
文章分类
社区版块
存档分类
最新评论

在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 还原数据库。
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics